|
Packit |
857059 |
/* BEGIN_ICS_COPYRIGHT7 ****************************************
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Copyright (c) 2015-2017, Intel Corporation
|
|
Packit |
857059 |
|
|
Packit |
857059 |
Redistribution and use in source and binary forms, with or without
|
|
Packit |
857059 |
modification, are permitted provided that the following conditions are met:
|
|
Packit |
857059 |
|
|
Packit |
857059 |
* Redistributions of source code must retain the above copyright notice,
|
|
Packit |
857059 |
this list of conditions and the following disclaimer.
|
|
Packit |
857059 |
* Redistributions in binary form must reproduce the above copyright
|
|
Packit |
857059 |
notice, this list of conditions and the following disclaimer in the
|
|
Packit |
857059 |
documentation and/or other materials provided with the distribution.
|
|
Packit |
857059 |
* Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
857059 |
may be used to endorse or promote products derived from this software
|
|
Packit |
857059 |
without specific prior written permission.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
857059 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
857059 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
857059 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
857059 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
857059 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
857059 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
857059 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
857059 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
857059 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
** END_ICS_COPYRIGHT7 ****************************************/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* [ICS VERSION STRING: unknown] */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#ifndef __IBA_STL_MAD_TYPES_H__
|
|
Packit |
857059 |
#define __IBA_STL_MAD_TYPES_H__
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#include "iba/public/datatypes.h"
|
|
Packit |
857059 |
#include "iba/stl_types.h"
|
|
Packit |
857059 |
#include "iba/ib_mad.h"
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#if defined (__cplusplus)
|
|
Packit |
857059 |
extern "C" {
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#define STL_BASE_VERSION 0x80
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* STL equivalents of IBA_NODE_CHANNEL_ADAPTER and IBA_NODE_SWITCH.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
#define STL_NODE_FI 1
|
|
Packit |
857059 |
#define STL_NODE_SW 2
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* The following MADs are generic across all management classes.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
#define STL_MCLASS_ATTRIB_ID_CLASS_PORT_INFO 0x0001
|
|
Packit |
857059 |
#define STL_MCLASS_ATTRIB_ID_NOTICE 0x0002
|
|
Packit |
857059 |
#define STL_MCLASS_ATTRIB_ID_INFORM_INFO 0x0003
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Common ClassPortInfo Capability Bits
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
#define STL_CLASS_PORT_CAPMASK_TRAP 0x0001 /* Can generate traps */
|
|
Packit |
857059 |
#define STL_CLASS_PORT_CAPMASK_NOTICE 0x0002 /* Implements Get/Set Notice */
|
|
Packit |
857059 |
#define STL_CLASS_PORT_CAPMASK_CM2 0x0004 /* Implements Additional Class Specific Capabilities (CapMask2) */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#include "iba/public/ipackon.h"
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Class Port Info:
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This attribute is needed only for use in fabrics that need long LIDs or
|
|
Packit |
857059 |
* more than 16 SLs or VLs. The default should be to continue to use the IB
|
|
Packit |
857059 |
* version. While Storm Lake does not support redirect, this attribute
|
|
Packit |
857059 |
* continues to contain redirect fields such that it can be a canonical
|
|
Packit |
857059 |
* representation of both IB and STL devices. The assorted redirect fields
|
|
Packit |
857059 |
* shall be 0 when the response is supplied by an STL device.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* STL Differences:
|
|
Packit |
857059 |
* RedirectLID is now 32 bits.
|
|
Packit |
857059 |
* TrapLID is now 32 bits.
|
|
Packit |
857059 |
* Redirect_P_Key moved for qword alignment.
|
|
Packit |
857059 |
* Trap_P_Key moved for qword alignment.
|
|
Packit |
857059 |
* RedirectSL and TrapSL moved to handle longer lengths.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
|
|
Packit |
857059 |
typedef struct {
|
|
Packit |
857059 |
uint8 BaseVersion; // RO: Must be STL_BASE_VERSION
|
|
Packit |
857059 |
uint8 ClassVersion; // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint16 CapMask; // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION2(u1, 32,
|
|
Packit |
857059 |
CapMask2:27, // RO
|
|
Packit |
857059 |
RespTimeValue:5); // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 8 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
//Redirect attributes.
|
|
Packit |
857059 |
IB_GID RedirectGID; // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 24 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION3(u2, 32,
|
|
Packit |
857059 |
RedirectTClass:8, // RO
|
|
Packit |
857059 |
Reserved:4, // Old SL. Must be zero.
|
|
Packit |
857059 |
RedirectFlowLabel:20); // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_LID RedirectLID; // Lengthened for STL. P_Key moved.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 32 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION3(u3, 32,
|
|
Packit |
857059 |
RedirectSL:5, // RO: Moved from old location.
|
|
Packit |
857059 |
Reserved2:3, // Must be zero.
|
|
Packit |
857059 |
RedirectQP:24) ; // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint32 Redirect_Q_Key; // RO
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 40 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
//Settable attributes to tell Class agent where to send traps.
|
|
Packit |
857059 |
IB_GID TrapGID; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 56 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION3(u4, 32,
|
|
Packit |
857059 |
TrapTClass:8, // RW
|
|
Packit |
857059 |
Reserved3:4, // Must be zero.
|
|
Packit |
857059 |
TrapFlowLabel:20); // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_LID TrapLID; // Lengthened for STL.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 64 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION2(u5, 32,
|
|
Packit |
857059 |
TrapHopLimit:8, // RW
|
|
Packit |
857059 |
TrapQP:24); // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint32 Trap_Q_Key; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 72 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint16 Trap_P_Key; // Moved for STL qword alignment.
|
|
Packit |
857059 |
uint16 Redirect_P_Key; // Moved for STL qword alignment.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION2(u6, 8,
|
|
Packit |
857059 |
TrapSL:5, // RW: Moved to accommodate larger size.
|
|
Packit |
857059 |
Reserved4:3); // Must be zero.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint8 Reserved5[3]; // Must be zero.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 80 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
} STL_CLASS_PORT_INFO;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* InformInfoRecord
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* This should only be used for fabrics that need long LIDs. Smaller
|
|
Packit |
857059 |
* fabrics should continue to use the IB version.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* STL Differences:
|
|
Packit |
857059 |
* LIDRangeBegin is now 32 bits.
|
|
Packit |
857059 |
* LIDRangeEnd is now 32 bits.
|
|
Packit |
857059 |
* Reserved removed after LIDRangeEnd and added after Type
|
|
Packit |
857059 |
* to qword/word align bit fields.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef struct {
|
|
Packit |
857059 |
IB_GID GID; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 16 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_LID LIDRangeBegin; // RW
|
|
Packit |
857059 |
STL_LID LIDRangeEnd; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 24 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint8 IsGeneric; // RW
|
|
Packit |
857059 |
uint8 Subscribe; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint16 Type; // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
uint16 Reserved1; // Must be zero.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 30 bytes */
|
|
Packit |
857059 |
|
|
Packit |
857059 |
union {
|
|
Packit |
857059 |
struct {
|
|
Packit |
857059 |
uint16 TrapNumber; // RW
|
|
Packit |
857059 |
/* 32 bytes */
|
|
Packit |
857059 |
STL_FIELDUNION3(u1, 32,
|
|
Packit |
857059 |
QPNumber:24, // RW
|
|
Packit |
857059 |
Reserved2:3, // Must be zero.
|
|
Packit |
857059 |
RespTimeValue:5); // RO
|
|
Packit |
857059 |
STL_FIELDUNION2(u2, 32,
|
|
Packit |
857059 |
Reserved3:8, // Must be zero.
|
|
Packit |
857059 |
ProducerType:24); // RW
|
|
Packit |
857059 |
} Generic;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
struct {
|
|
Packit |
857059 |
uint16 DeviceID; // RW
|
|
Packit |
857059 |
/* 32 bytes */
|
|
Packit |
857059 |
STL_FIELDUNION3(u1, 32,
|
|
Packit |
857059 |
QPNumber:24, // RW
|
|
Packit |
857059 |
Reserved4:3, // Must be zero.
|
|
Packit |
857059 |
RespTimeValue:5); // RO
|
|
Packit |
857059 |
STL_FIELDUNION2(u2, 32,
|
|
Packit |
857059 |
Reserved5:8, // Must be zero.
|
|
Packit |
857059 |
VendorID:24); // RW
|
|
Packit |
857059 |
} Vendor;
|
|
Packit |
857059 |
} u;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 40 bytes */
|
|
Packit |
857059 |
} STL_INFORM_INFO;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/*
|
|
Packit |
857059 |
* Notice
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* All STL fabrics should use the STL Notice structure when communicating with
|
|
Packit |
857059 |
* STL devices and applications. When forwarding notices to IB applications,
|
|
Packit |
857059 |
* the SM shall translate them into IB format, when IB equivalents exist.
|
|
Packit |
857059 |
*
|
|
Packit |
857059 |
* STL Differences:
|
|
Packit |
857059 |
* IssuerLID is now 32 bits.
|
|
Packit |
857059 |
* Moved fields to maintain word alignment.
|
|
Packit |
857059 |
* Data and ClassTrapSpecificData combined into a single field.
|
|
Packit |
857059 |
*/
|
|
Packit |
857059 |
typedef struct {
|
|
Packit |
857059 |
union {
|
|
Packit |
857059 |
/* Generic Notice attributes */
|
|
Packit |
857059 |
struct /*_GENERIC*/ {
|
|
Packit |
857059 |
STL_FIELDUNION3(u, 32,
|
|
Packit |
857059 |
IsGeneric:1, // RO
|
|
Packit |
857059 |
Type:7, // RO
|
|
Packit |
857059 |
ProducerType:24); // RO
|
|
Packit |
857059 |
uint16 TrapNumber; // RO
|
|
Packit |
857059 |
} PACK_SUFFIX Generic;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* Vendor specific Notice attributes */
|
|
Packit |
857059 |
struct /*_VENDOR*/ {
|
|
Packit |
857059 |
STL_FIELDUNION3(u, 32,
|
|
Packit |
857059 |
IsGeneric:1, // RO
|
|
Packit |
857059 |
Type:7, // RO
|
|
Packit |
857059 |
VendorID:24); // RO
|
|
Packit |
857059 |
uint16 DeviceID; // RO
|
|
Packit |
857059 |
} PACK_SUFFIX Vendor;
|
|
Packit |
857059 |
} PACK_SUFFIX Attributes;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
STL_FIELDUNION2(Stats, 16,
|
|
Packit |
857059 |
Toggle:1, // RW
|
|
Packit |
857059 |
Count:15); // RW
|
|
Packit |
857059 |
|
|
Packit |
857059 |
/* 8 bytes */
|
|
Packit |
857059 |
uint32 IssuerLID; // RO: Extended for STL
|
|
Packit |
857059 |
uint32 Reserved2; // Added for qword alignment
|
|
Packit |
857059 |
/* 16 bytes */
|
|
Packit |
857059 |
IB_GID IssuerGID; // RO
|
|
Packit |
857059 |
/* 32 bytes */
|
|
Packit |
857059 |
uint8 Data[64]; // RO.
|
|
Packit |
857059 |
/* 96 bytes */
|
|
Packit |
857059 |
uint8 ClassData[0]; // RO. Variable length.
|
|
Packit |
857059 |
} PACK_SUFFIX STL_NOTICE;
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#include "iba/public/ipackoff.h"
|
|
Packit |
857059 |
|
|
Packit |
857059 |
static __inline void
|
|
Packit |
857059 |
StlCommonClassPortInfoCapMask(char buf[80], uint16 cmask)
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
if (!cmask) {
|
|
Packit |
857059 |
snprintf(buf, 80, "-");
|
|
Packit |
857059 |
} else {
|
|
Packit |
857059 |
snprintf(buf, 80, "%s%s%s",
|
|
Packit |
857059 |
(cmask & STL_CLASS_PORT_CAPMASK_TRAP) ? "Trap " : "",
|
|
Packit |
857059 |
(cmask & STL_CLASS_PORT_CAPMASK_NOTICE) ? "Notice " : "",
|
|
Packit |
857059 |
(cmask & STL_CLASS_PORT_CAPMASK_CM2) ? "CapMask2 " : "");
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
static __inline void
|
|
Packit |
857059 |
StlCommonClassPortInfoCapMask2(char buf[80], uint32 cmask)
|
|
Packit |
857059 |
{
|
|
Packit |
857059 |
if (!cmask) {
|
|
Packit |
857059 |
snprintf(buf, 80, "-");
|
|
Packit |
857059 |
} else {
|
|
Packit |
857059 |
buf[0] = '\0';
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#if defined (__cplusplus)
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
#endif
|
|
Packit |
857059 |
#endif
|