#define IB_SUBNET_PATH_HOPS_MAX 64\r
/*********/\r
\r
+/****d* IBA Base: Constants/IB_HOPLIMIT_MAX\r
+* NAME\r
+* IB_HOPLIMIT_MAX\r
+*\r
+* DESCRIPTION\r
+* Maximum number of router hops allowed.\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_HOPLIMIT_MAX 255\r
+/*********/\r
+\r
+/*********/\r
+/****d* IBA Base: Constants/IB_MC_SCOPE_*\r
+* NAME\r
+* IB_MC_SCOPE_*\r
+*\r
+* DESCRIPTION\r
+* Scope component definitions from IBA 1.2.1 (Table 3 p. 148)\r
+*/\r
+#define IB_MC_SCOPE_LINK_LOCAL 0x2\r
+#define IB_MC_SCOPE_SITE_LOCAL 0x5\r
+#define IB_MC_SCOPE_ORG_LOCAL 0x8\r
+#define IB_MC_SCOPE_GLOBAL 0xE\r
+/*********/\r
+\r
/****d* IBA Base: Constants/IB_PKEY_MAX_BLOCKS\r
* NAME\r
* IB_PKEY_MAX_BLOCKS\r
#define IB_NOTICE_NODE_TYPE_ROUTER (CL_NTOH32(0x000003))\r
/**********/\r
\r
+/****d* IBA Base: Constants/IB_NOTICE_PRODUCER_TYPE_CLASS_MGR\r
+* NAME\r
+* IB_NOTICE_PRODUCER_TYPE_CLASS_MGR\r
+*\r
+* DESCRIPTION\r
+* Encoded generic producer type used in Notice attribute (13.4.8.2)\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_NOTICE_PRODUCER_TYPE_CLASS_MGR (CL_HTON32(0x000004))\r
+/**********/\r
+\r
/****d* IBA Base: Constants/IB_NOTICE_NODE_TYPE_SUBN_MGMT\r
* NAME\r
* IB_NOTICE_NODE_TYPE_SUBN_MGMT\r
*/\r
#define IB_PATH_REC_SL_MASK 0x000F\r
\r
+/****d* IBA Base: Constants/IB_MULTIPATH_REC_SL_MASK\r
+* NAME\r
+* IB_MILTIPATH_REC_SL_MASK\r
+*\r
+* DESCRIPTION\r
+* Mask for the sl field for MultiPath record\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MULTIPATH_REC_SL_MASK 0x000F\r
+\r
/****d* IBA Base: Constants/IB_PATH_REC_QOS_CLASS_MASK\r
* NAME\r
* IB_PATH_REC_QOS_CLASS_MASK\r
*/\r
#define IB_PATH_REC_QOS_CLASS_MASK 0xFFF0\r
\r
+/****d* IBA Base: Constants/IB_MULTIPATH_REC_QOS_CLASS_MASK\r
+* NAME\r
+* IB_MULTIPATH_REC_QOS_CLASS_MASK\r
+*\r
+* DESCRIPTION\r
+* Mask for the QoS class field for MultiPath record\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MULTIPATH_REC_QOS_CLASS_MASK 0xFFF0\r
+\r
/****d* IBA Base: Constants/IB_PATH_REC_SELECTOR_MASK\r
* NAME\r
* IB_PATH_REC_SELECTOR_MASK\r
* ib_node_info_t\r
*********/\r
\r
+static const char *const __ib_producer_type_str[] = {\r
+ "UNKNOWN",\r
+ "Channel Adapter",\r
+ "Switch",\r
+ "Router",\r
+ "Class Manager"\r
+};\r
+\r
+/****f* IBA Base: Types/ib_get_producer_type_str\r
+* NAME\r
+* ib_get_producer_type_str\r
+*\r
+* DESCRIPTION\r
+* Returns a string for the specified producer type\r
+* 13.4.8.2 Notice\r
+* 13.4.8.3 InformInfo\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline const char *AL_API\r
+ib_get_producer_type_str(IN ib_net32_t producer_type)\r
+{\r
+ if (cl_ntoh32(producer_type) >\r
+ CL_NTOH32(IB_NOTICE_PRODUCER_TYPE_CLASS_MGR))\r
+ producer_type = 0;\r
+ return (__ib_producer_type_str[cl_ntoh32(producer_type)]);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* producer_type\r
+* [in] Encoded producer type from the Notice attribute\r
+\r
+* RETURN VALUES\r
+* Pointer to the producer type string.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_notice_get_prod_type\r
+*********/\r
+\r
static const char* const __ib_port_state_str[] =\r
{\r
"No State Change (NOP)",\r
#define IB_MPR_COMPMASK_RATE (CL_HTON64(((uint64_t)1)<<13))\r
#define IB_MPR_COMPMASK_PKTLIFETIMESELEC (CL_HTON64(((uint64_t)1)<<14))\r
#define IB_MPR_COMPMASK_PKTLIFETIME (CL_HTON64(((uint64_t)1)<<15))\r
-#define IB_MPR_COMPMASK_RESV2 (CL_HTON64(((uint64_t)1)<<16))\r
+#define IB_MPR_COMPMASK_SERVICEID_MSB (CL_HTON64(((uint64_t)1)<<16))\r
#define IB_MPR_COMPMASK_INDEPSELEC (CL_HTON64(((uint64_t)1)<<17))\r
#define IB_MPR_COMPMASK_RESV3 (CL_HTON64(((uint64_t)1)<<18))\r
#define IB_MPR_COMPMASK_SGIDCOUNT (CL_HTON64(((uint64_t)1)<<19))\r
#define IB_MPR_COMPMASK_DGIDCOUNT (CL_HTON64(((uint64_t)1)<<20))\r
-#define IB_MPR_COMPMASK_RESV4 (CL_HTON64(((uint64_t)1)<<21))\r
+#define IB_MPR_COMPMASK_SERVICEID_LSB (CL_HTON64(((uint64_t)1)<<21))\r
\r
/* SMInfo Record Component Masks */\r
#define IB_SMIR_COMPMASK_LID (CL_HTON64(((uint64_t)1)<<0))\r
ib_net16_t p_key_violations;\r
ib_net16_t q_key_violations;\r
uint8_t guid_cap;\r
- uint8_t subnet_timeout; /* cli_rereg(1b), resrv(\r
-2b), timeout(5b) */\r
+ uint8_t subnet_timeout; /* cli_rereg(1b), mcast_pkey_trap_suppr(1b), resrv(1b), timeout(5b) */\r
uint8_t resp_time_value;\r
uint8_t error_threshold;\r
+ ib_net16_t max_credit_hint;\r
+ ib_net32_t link_rt_latency; /* reserv(8b), link round trip lat(24b) */\r
\r
} PACK_SUFFIX ib_port_info_t;\r
#include <complib/cl_packoff.h>\r
#define IB_PORT_CAP_HAS_BM (CL_NTOH32(0x00800000))\r
#define IB_PORT_CAP_HAS_LINK_RT_LATENCY (CL_NTOH32(0x01000000))\r
#define IB_PORT_CAP_HAS_CLIENT_REREG (CL_NTOH32(0x02000000))\r
-#define IB_PORT_CAP_RESV26 (CL_NTOH32(0x04000000))\r
-#define IB_PORT_CAP_RESV27 (CL_NTOH32(0x08000000))\r
-#define IB_PORT_CAP_RESV28 (CL_NTOH32(0x10000000))\r
-#define IB_PORT_CAP_RESV29 (CL_NTOH32(0x20000000))\r
-#define IB_PORT_CAP_RESV30 (CL_NTOH32(0x40000000))\r
-#define IB_PORT_CAP_RESV31 (CL_NTOH32(0x80000000))\r
+#define IB_PORT_CAP_HAS_OTHER_LOCAL_CHANGES_NTC (CL_HTON32(0x04000000))\r
+#define IB_PORT_CAP_HAS_LINK_SPEED_WIDTH_PAIRS_TBL (CL_HTON32(0x08000000))\r
+#define IB_PORT_CAP_HAS_VEND_MADS (CL_HTON32(0x10000000))\r
+#define IB_PORT_CAP_HAS_MCAST_PKEY_TRAP_SUPPRESS (CL_HTON32(0x20000000))\r
+#define IB_PORT_CAP_HAS_MCAST_FDB_TOP (CL_HTON32(0x40000000))\r
+#define IB_PORT_CAP_HAS_HIER_INFO (CL_HTON32(0x80000000))\r
\r
/****f* IBA Base: Types/ib_port_info_get_port_state\r
* NAME\r
\r
#define IB_LINK_WIDTH_ACTIVE_1X 1\r
#define IB_LINK_WIDTH_ACTIVE_4X 2\r
+#define IB_LINK_WIDTH_ACTIVE_8X 4\r
#define IB_LINK_WIDTH_ACTIVE_12X 8\r
#define IB_LINK_SPEED_ACTIVE_2_5 1\r
#define IB_LINK_SPEED_ACTIVE_5 2\r
* SEE ALSO\r
*********/\r
\r
+/****f* IBA Base: Types/ib_port_info_get_master_smsl\r
+* NAME\r
+* ib_port_info_get_master_smsl\r
+*\r
+* DESCRIPTION\r
+* Returns the encoded value for the Master SMSL at this port.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint8_t AL_API\r
+ib_port_info_get_master_smsl(IN const ib_port_info_t * const p_pi)\r
+{\r
+ return (uint8_t) (p_pi->mtu_smsl & 0x0F);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_pi\r
+* [in] Pointer to a PortInfo attribute.\r
+*\r
+* RETURN VALUES\r
+* Returns the encoded value for the Master SMSL at this port.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_port_info_set_master_smsl\r
+* NAME\r
+* ib_port_info_set_master_smsl\r
+*\r
+* DESCRIPTION\r
+* Sets the Master SMSL value in the PortInfo attribute.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_port_info_set_master_smsl(IN ib_port_info_t * const p_pi,\r
+ IN const uint8_t smsl)\r
+{\r
+ p_pi->mtu_smsl = (uint8_t) ((p_pi->mtu_smsl & 0xF0) | smsl);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_pi\r
+* [in] Pointer to a PortInfo attribute.\r
+*\r
+* mtu\r
+* [in] Encoded Master SMSL value to set\r
+*\r
+* RETURN VALUES\r
+* None.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
\r
/****f* IBA Base: Types/ib_port_info_get_sm_sl\r
* NAME\r
{\r
CL_ASSERT( timeout <= 0x1F );\r
p_pi->subnet_timeout =\r
- (uint8_t)(\r
- (p_pi->subnet_timeout & 0x80) | (timeout & 0x1F));\r
+ (uint8_t) ((p_pi->subnet_timeout & 0xE0) | (timeout & 0x1F));\r
}\r
/*\r
* PARAMETERS\r
{\r
CL_ASSERT( client_rereg <= 0x1 );\r
p_pi->subnet_timeout =\r
- (uint8_t)(\r
- (p_pi->subnet_timeout & 0x1F) | ((client_rereg << 7) & 0x80));\r
+ (uint8_t) ((p_pi->subnet_timeout & 0x7F) | (client_rereg << 7));\r
}\r
/*\r
* PARAMETERS\r
* SEE ALSO\r
*********/\r
\r
+/****f* IBA Base: Types/ib_port_info_get_mcast_pkey_trap_suppress\r
+* NAME\r
+* ib_port_info_get_mcast_pkey_trap_suppress\r
+*\r
+* DESCRIPTION\r
+* Gets the encoded multicast pkey trap suppresion enabled bit value\r
+* in the PortInfo attribute.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint8_t AL_API\r
+ib_port_info_get_mcast_pkey_trap_suppress(IN ib_port_info_t const *p_pi)\r
+{\r
+ return ((p_pi->subnet_timeout & 0x40) >> 6);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_pi\r
+* [in] Pointer to a PortInfo attribute.\r
+*\r
+* RETURN VALUES\r
+* Multicast PKey trap suppression enabled value (either 1 or 0).\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_port_info_set_mcast_pkey_trap_suppress\r
+* NAME\r
+* ib_port_info_set_mcast_pkey_trap_suppress\r
+*\r
+* DESCRIPTION\r
+* Sets the encoded multicast pkey trap suppresion enabled bit value\r
+* in the PortInfo attribute.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_port_info_set_mcast_pkey_trap_suppress(IN ib_port_info_t * const p_pi,\r
+ IN const uint8_t trap_suppress)\r
+{\r
+ CL_ASSERT(trap_suppress <= 0x1);\r
+ p_pi->subnet_timeout =\r
+ (uint8_t) ((p_pi->subnet_timeout & 0xBF) | (trap_suppress << 6));\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_pi\r
+* [in] Pointer to a PortInfo attribute.\r
+*\r
+* trap_suppress\r
+* [in] Multicast pkey trap suppresion enabled value to set\r
+* (either 1 or 0).\r
+*\r
+* RETURN VALUES\r
+* None.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
/****f* IBA Base: Types/ib_port_info_get_timeout\r
* NAME\r
* ib_port_info_get_timeout\r
ib_net16_t lids_per_port;\r
ib_net16_t enforce_cap;\r
uint8_t flags;\r
+ uint8_t resvd;\r
+ ib_net16_t mcast_top;\r
\r
} PACK_SUFFIX ib_switch_info_t;\r
#include <complib/cl_packoff.h>\r
uint8_t tclass;\r
uint8_t num_path;\r
ib_net16_t pkey;\r
- uint8_t resv0;\r
- uint8_t sl;\r
+ ib_net16_t qos_class_sl;\r
uint8_t mtu;\r
uint8_t rate;\r
uint8_t pkt_life;\r
- uint8_t resv1;\r
+ uint8_t service_id_8msb;\r
uint8_t independence; /* formerly resv2 */\r
uint8_t sgid_count;\r
uint8_t dgid_count;\r
- uint8_t resv3[7];\r
+ uint8_t service_id_56lsb[7];\r
ib_gid_t gids[IB_MULTIPATH_MAX_GIDS];\r
} PACK_SUFFIX ib_multipath_rec_t;\r
#include <complib/cl_packoff.h>\r
* ib_multipath_rec_t\r
*********/\r
\r
+/****f* IBA Base: Types/ib_multipath_rec_set_sl\r
+* NAME\r
+* ib_multipath_rec_set_sl\r
+*\r
+* DESCRIPTION\r
+* Set path service level.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_multipath_rec_set_sl(\r
+ IN ib_multipath_rec_t* const p_rec,\r
+ IN const uint8_t sl )\r
+{\r
+ p_rec->qos_class_sl =\r
+ (p_rec->qos_class_sl & CL_HTON16(IB_MULTIPATH_REC_QOS_CLASS_MASK)) |\r
+ cl_hton16(sl & IB_MULTIPATH_REC_SL_MASK);\r
+}\r
+/*\r
+* PARAMETERS\r
+* p_rec\r
+* [in] Pointer to the MultiPath record object.\r
+*\r
+* sl\r
+* [in] Service level to set.\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_multipath_rec_t\r
+*********/\r
+\r
/****f* IBA Base: Types/ib_multipath_rec_sl\r
* NAME\r
* ib_multipath_rec_sl\r
ib_multipath_rec_sl(\r
IN const ib_multipath_rec_t* const p_rec )\r
{\r
- return( (uint8_t)((cl_ntoh16( p_rec->sl )) & 0xF) );\r
+ return ((uint8_t) ((cl_ntoh16(p_rec->qos_class_sl)) & IB_MULTIPATH_REC_SL_MASK)); \r
}\r
/*\r
* PARAMETERS\r
* ib_multipath_rec_t\r
*********/\r
\r
+/****f* IBA Base: Types/ib_multipath_rec_set_qos_class\r
+* NAME\r
+* ib_multipath_rec_set_qos_class\r
+*\r
+* DESCRIPTION\r
+* Set path QoS class.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_multipath_rec_set_qos_class(\r
+ IN ib_multipath_rec_t* const p_rec,\r
+ IN const uint16_t qos_class )\r
+{\r
+ p_rec->qos_class_sl =\r
+ (p_rec->qos_class_sl & CL_HTON16(IB_MULTIPATH_REC_SL_MASK)) |\r
+ cl_hton16(qos_class << 4);\r
+}\r
+/*\r
+* PARAMETERS\r
+* p_rec\r
+* [in] Pointer to the MultiPath record object.\r
+*\r
+* qos_class\r
+* [in] QoS class to set.\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_multipath_rec_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_multipath_rec_qos_class\r
+* NAME\r
+* ib_multipath_rec_qos_class\r
+*\r
+* DESCRIPTION\r
+* Get QoS class.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint16_t AL_API\r
+ib_multipath_rec_qos_class(\r
+ IN const ib_multipath_rec_t* const p_rec )\r
+{\r
+ return (cl_ntoh16( p_rec->qos_class_sl ) >> 4);\r
+}\r
+/*\r
+* PARAMETERS\r
+* p_rec\r
+* [in] Pointer to the MultiPath record object.\r
+*\r
+* RETURN VALUES\r
+* QoS class of the MultiPath record.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_multipath_rec_t\r
+*********/\r
+\r
/****f* IBA Base: Types/ib_multipath_rec_mtu\r
* NAME\r
* ib_multipath_rec_mtu\r
* ib_multipath_rec_t\r
*********/\r
\r
+/****f* IBA Base: Types/ib_multipath_rec_service_id\r
+* NAME\r
+* ib_multipath_rec_service_id\r
+*\r
+* DESCRIPTION\r
+* Get multipath service id.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline ib_net64_t AL_API\r
+ib_multipath_rec_service_id(IN const ib_multipath_rec_t * const p_rec)\r
+{\r
+ union {\r
+ ib_net64_t sid;\r
+ uint8_t sid_arr[8];\r
+ } sid_union;\r
+ sid_union.sid_arr[0] = p_rec->service_id_8msb;\r
+ memcpy(&sid_union.sid_arr[1], p_rec->service_id_56lsb, 7);\r
+ return sid_union.sid;\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_rec\r
+* [in] Pointer to the multipath record object.\r
+*\r
+* RETURN VALUES\r
+* Service ID\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_multipath_rec_t\r
+*********/\r
+\r
#define IB_NUM_PKEY_ELEMENTS_IN_BLOCK 32\r
/****s* IBA Base: Types/ib_pkey_table_t\r
* NAME\r
#include <complib/cl_packon.h>\r
typedef struct _ib_slvl_table\r
{\r
- uint8_t vl_table[IB_MAX_NUM_VLS/2];\r
+ uint8_t raw_vl_by_sl[IB_MAX_NUM_VLS/2];\r
\r
} PACK_SUFFIX ib_slvl_table_t;\r
#include <complib/cl_packoff.h>\r
CL_ASSERT(vl <= 15);\r
CL_ASSERT(sl_index <= 15);\r
\r
- if (sl_index%2)\r
+ if (sl_index % 2)\r
{\r
/* this is an odd sl. Need to update the ls bits */\r
- p_slvl_tbl->vl_table[idx] = ( p_slvl_tbl->vl_table[idx] & 0xF0 ) | vl ;\r
+ p_slvl_tbl->raw_vl_by_sl[idx] =\r
+ ( p_slvl_tbl->raw_vl_by_sl[idx] & 0xF0 ) | vl ;\r
}\r
else\r
{\r
/* this is an even sl. Need to update the ms bits */\r
- p_slvl_tbl->vl_table[idx] = ( vl << 4 ) | ( p_slvl_tbl->vl_table[idx] & 0x0F );\r
+ p_slvl_tbl->raw_vl_by_sl[idx] =\r
+ ( vl << 4 ) | ( p_slvl_tbl->raw_vl_by_sl[idx] & 0x0F );\r
}\r
}\r
/*\r
uint8_t idx = sl_index/2;\r
CL_ASSERT(sl_index <= 15);\r
\r
- if (sl_index%2)\r
+ if (sl_index % 2)\r
{\r
/* this is an odd sl. Need to return the ls bits. */\r
- return ( p_slvl_tbl->vl_table[idx] & 0x0F );\r
+ return ( p_slvl_tbl->raw_vl_by_sl[idx] & 0x0F );\r
}\r
else\r
{\r
/* this is an even sl. Need to return the ms bits. */\r
- return ( (p_slvl_tbl->vl_table[idx] & 0xF0) >> 4 );\r
+ return ( (p_slvl_tbl->raw_vl_by_sl[idx] & 0xF0) >> 4 );\r
}\r
}\r
/*\r
ib_gid_t gid2; // 16\r
} PACK_SUFFIX ntc_257_258;\r
\r
- struct _ntc_259 // p/q_key violation with sw info 53\r
+ struct _ntc_259 // p/q_key violation from switch 51\r
{\r
ib_net16_t data_valid; // 2\r
ib_net16_t lid1; // 2\r
ib_net16_t lid2; // 2\r
- ib_net32_t key; // 4\r
- uint8_t sl; // 1\r
- ib_net32_t qp1; // 4\r
- uint8_t qp2_msb; // 1\r
- ib_net16_t qp2_lsb; // 2\r
+ ib_net16_t pkey; // 2\r
+ ib_net32_t sl_qp1; // 4b sl, 4b pad, 24b qp1\r
+ ib_net32_t qp2; // 8b pad, 24b qp2\r
ib_gid_t gid1; // 16\r
ib_gid_t gid2; // 16\r
ib_net16_t sw_lid; // 2\r
uint8_t port_no; // 1\r
} PACK_SUFFIX ntc_259;\r
\r
+ struct _ntc_bkey_259 // bkey violation\r
+ {\r
+ ib_net16_t lidaddr;\r
+ uint8_t method;\r
+ uint8_t reserved;\r
+ ib_net16_t attribute_id;\r
+ ib_net32_t attribute_modifier;\r
+ ib_net32_t qp; // qp is low 24 bits\r
+ ib_net64_t bkey;\r
+ ib_gid_t gid;\r
+ } PACK_SUFFIX ntc_bkey_259;\r
+\r
} data_details;\r
\r
ib_gid_t issuer_gid; // 16 80\r
#define TRAP_144_MASK_LINK_WIDTH_ENABLE_CHANGE (CL_HTON16(0x0002))\r
#define TRAP_144_MASK_NODE_DESCRIPTION_CHANGE (CL_HTON16(0x0001))\r
\r
+/****f* IBA Base: Types/ib_notice_is_generic\r
+* NAME\r
+* ib_notice_is_generic\r
+*\r
+* DESCRIPTION\r
+* Check if the notice is generic\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline boolean_t AL_API\r
+ib_notice_is_generic(IN const ib_mad_notice_attr_t * p_ntc)\r
+{\r
+ return (p_ntc->generic_type & 0x80);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* RETURN VALUES\r
+* TRUE if mad is generic\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_get_type\r
+* NAME\r
+* ib_notice_get_type\r
+*\r
+* DESCRIPTION\r
+* Get the notice type\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint8_t AL_API\r
+ib_notice_get_type(IN const ib_mad_notice_attr_t * p_ntc)\r
+{\r
+ return p_ntc->generic_type & 0x7f;\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* RETURN VALUES\r
+* TRUE if mad is generic\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_get_prod_type\r
+* NAME\r
+* ib_notice_get_prod_type\r
+*\r
+* DESCRIPTION\r
+* Get the notice Producer Type of Generic Notice\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline ib_net32_t AL_API\r
+ib_notice_get_prod_type(IN const ib_mad_notice_attr_t * p_ntc)\r
+{\r
+ uint32_t pt;\r
+\r
+ pt = cl_ntoh16(p_ntc->g_or_v.generic.prod_type_lsb) |\r
+ (p_ntc->g_or_v.generic.prod_type_msb << 16);\r
+ return cl_hton32(pt);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* RETURN VALUES\r
+* The producer type\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_set_prod_type\r
+* NAME\r
+* ib_notice_set_prod_type\r
+*\r
+* DESCRIPTION\r
+* Set the notice Producer Type of Generic Notice\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_notice_set_prod_type(IN ib_mad_notice_attr_t * p_ntc,\r
+ IN ib_net32_t prod_type_val)\r
+{\r
+ uint32_t ptv = cl_ntoh32(prod_type_val);\r
+ p_ntc->g_or_v.generic.prod_type_lsb =\r
+ cl_hton16((uint16_t) (ptv & 0x0000ffff));\r
+ p_ntc->g_or_v.generic.prod_type_msb =\r
+ (uint8_t) ((ptv & 0x00ff0000) >> 16);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* prod_type\r
+* [in] The producer Type code\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_set_prod_type_ho\r
+* NAME\r
+* ib_notice_set_prod_type_ho\r
+*\r
+* DESCRIPTION\r
+* Set the notice Producer Type of Generic Notice given Host Order\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_notice_set_prod_type_ho(IN ib_mad_notice_attr_t * p_ntc,\r
+ IN uint32_t prod_type_val_ho)\r
+{\r
+ p_ntc->g_or_v.generic.prod_type_lsb =\r
+ cl_hton16((uint16_t) (prod_type_val_ho & 0x0000ffff));\r
+ p_ntc->g_or_v.generic.prod_type_msb =\r
+ (uint8_t) ((prod_type_val_ho & 0x00ff0000) >> 16);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* prod_type\r
+* [in] The producer Type code in host order\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_get_vend_id\r
+* NAME\r
+* ib_notice_get_vend_id\r
+*\r
+* DESCRIPTION\r
+* Get the Vendor Id of Vendor type Notice\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline ib_net32_t AL_API\r
+ib_notice_get_vend_id(IN const ib_mad_notice_attr_t * p_ntc)\r
+{\r
+ uint32_t vi;\r
+\r
+ vi = cl_ntoh16(p_ntc->g_or_v.vend.vend_id_lsb) |\r
+ (p_ntc->g_or_v.vend.vend_id_msb << 16);\r
+ return cl_hton32(vi);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* RETURN VALUES\r
+* The Vendor Id of Vendor type Notice\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_set_vend_id\r
+* NAME\r
+* ib_notice_set_vend_id\r
+*\r
+* DESCRIPTION\r
+* Set the notice Producer Type of Generic Notice\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_notice_set_vend_id(IN ib_mad_notice_attr_t * p_ntc, IN ib_net32_t vend_id)\r
+{\r
+ uint32_t vi = cl_ntoh32(vend_id);\r
+ p_ntc->g_or_v.vend.vend_id_lsb =\r
+ cl_hton16((uint16_t) (vi & 0x0000ffff));\r
+ p_ntc->g_or_v.vend.vend_id_msb = (uint8_t) ((vi & 0x00ff0000) >> 16);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* vend_id\r
+* [in] The producer Type code\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_notice_set_vend_id_ho\r
+* NAME\r
+* ib_notice_set_vend_id_ho\r
+*\r
+* DESCRIPTION\r
+* Set the notice Producer Type of Generic Notice given a host order value\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline void AL_API\r
+ib_notice_set_vend_id_ho(IN ib_mad_notice_attr_t * p_ntc,\r
+ IN uint32_t vend_id_ho)\r
+{\r
+ p_ntc->g_or_v.vend.vend_id_lsb =\r
+ cl_hton16((uint16_t) (vend_id_ho & 0x0000ffff));\r
+ p_ntc->g_or_v.vend.vend_id_msb =\r
+ (uint8_t) ((vend_id_ho & 0x00ff0000) >> 16);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_ntc\r
+* [in] Pointer to the notice MAD attribute\r
+*\r
+* vend_id_ho\r
+* [in] The producer Type code in host order\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* SEE ALSO\r
+* ib_mad_notice_attr_t\r
+*********/\r
+\r
#include <complib/cl_packon.h>\r
typedef struct _ib_inform_info\r
{\r
} PACK_SUFFIX ib_inform_info_record_t;\r
#include <complib/cl_packoff.h>\r
/********/\r
+\r
+/****s* IBA Base: Types/ib_perfmgt_mad_t\r
+* NAME\r
+* ib_perfmgt_mad_t\r
+*\r
+* DESCRIPTION\r
+* IBA defined Perf Management MAD (16.3.1)\r
+*\r
+* SYNOPSIS\r
+*/\r
+#include <complib/cl_packon.h>\r
+typedef struct _ib_perfmgt_mad {\r
+ ib_mad_t header;\r
+ uint8_t resv[40];\r
+#define IB_PM_DATA_SIZE 192\r
+ uint8_t data[IB_PM_DATA_SIZE];\r
+} PACK_SUFFIX ib_perfmgt_mad_t;\r
+#include <complib/cl_packoff.h>\r
+/*\r
+* FIELDS\r
+* header\r
+* Common MAD header.\r
+*\r
+* resv\r
+* Reserved.\r
+*\r
+* data\r
+* Performance Management payload. The structure and content of this field\r
+* depends upon the method, attr_id, and attr_mod fields in the header.\r
+*\r
+* SEE ALSO\r
+* ib_mad_t\r
+*********/\r
+\r
/****d* IBA Base: Types/DM_SVC_NAME\r
* NAME\r
* DM_SVC_NAME\r