#define IB_SMINFO_STATE_MASTER 3\r
/**********/\r
\r
+/****d* IBA Base: Constants/IB_PATH_REC_SL_MASK\r
+* NAME\r
+* IB_PATH_REC_SL_MASK\r
+*\r
+* DESCRIPTION\r
+* Mask for the sl field for path record\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_PATH_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
+* DESCRIPTION\r
+* Mask for the QoS class field for path record\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_PATH_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
#include <complib/cl_packon.h>\r
typedef __declspec(align(8)) struct _ib_path_rec\r
{\r
- uint64_t resv0;\r
+ ib_net64_t service_id;\r
ib_gid_t dgid;\r
ib_gid_t sgid;\r
ib_net16_t dlid;\r
ib_net16_t slid;\r
- ib_field32_t hop_flow_raw;\r
+ ib_net32_t hop_flow_raw;\r
uint8_t tclass;\r
uint8_t num_path;\r
ib_net16_t pkey;\r
- ib_net16_t sl;\r
+ ib_net16_t qos_class_sl;\r
uint8_t mtu;\r
uint8_t rate;\r
uint8_t pkt_life;\r
*********/\r
\r
/* Path Record Component Masks */\r
+#define IB_PR_COMPMASK_SERVICEID_MSB (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_PR_COMPMASK_SERVICEID_LSB (CL_HTON64(((uint64_t)1)<<1))\r
#define IB_PR_COMPMASK_DGID (CL_HTON64(((uint64_t)1)<<2))\r
#define IB_PR_COMPMASK_SGID (CL_HTON64(((uint64_t)1)<<3))\r
#define IB_PR_COMPMASK_DLID (CL_HTON64(((uint64_t)1)<<4))\r
#define IB_PR_COMPMASK_HOPLIMIT (CL_HTON64(((uint64_t)1)<<9))\r
#define IB_PR_COMPMASK_TCLASS (CL_HTON64(((uint64_t)1)<<10))\r
#define IB_PR_COMPMASK_REVERSIBLE (CL_HTON64(((uint64_t)1)<<11))\r
-#define IB_PR_COMPMASK_NUM_PATH (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_PR_COMPMASK_NUMBPATH (CL_HTON64(((uint64_t)1)<<12))\r
#define IB_PR_COMPMASK_PKEY (CL_HTON64(((uint64_t)1)<<13))\r
-#define IB_PR_COMPMASK_RESV1 (CL_HTON64(((uint64_t)1)<<14))\r
+#define IB_PR_COMPMASK_QOS_CLASS (CL_HTON64(((uint64_t)1)<<14))\r
#define IB_PR_COMPMASK_SL (CL_HTON64(((uint64_t)1)<<15))\r
#define IB_PR_COMPMASK_MTUSELEC (CL_HTON64(((uint64_t)1)<<16))\r
#define IB_PR_COMPMASK_MTU (CL_HTON64(((uint64_t)1)<<17))\r
#define IB_MPR_COMPMASK_REVERSIBLE (CL_HTON64(((uint64_t)1)<<5))\r
#define IB_MPR_COMPMASK_NUMBPATH (CL_HTON64(((uint64_t)1)<<6))\r
#define IB_MPR_COMPMASK_PKEY (CL_HTON64(((uint64_t)1)<<7))\r
-#define IB_MPR_COMPMASK_RESV1 (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_MPR_COMPMASK_QOS_CLASS (CL_HTON64(((uint64_t)1)<<8))\r
#define IB_MPR_COMPMASK_SL (CL_HTON64(((uint64_t)1)<<9))\r
#define IB_MPR_COMPMASK_MTUSELEC (CL_HTON64(((uint64_t)1)<<10))\r
#define IB_MPR_COMPMASK_MTU (CL_HTON64(((uint64_t)1)<<11))\r
IN const uint8_t num_path,\r
IN const ib_net16_t pkey,\r
IN const uint8_t sl,\r
+ IN const uint16_t qos_class,\r
IN const uint8_t mtu_selector,\r
IN const uint8_t mtu,\r
IN const uint8_t rate_selector,\r
p_rec->slid = slid;\r
p_rec->num_path = num_path;\r
p_rec->pkey = pkey;\r
- /* Lower 4 bits of path rec's SL are reserved. */\r
- p_rec->sl = cl_ntoh16( sl );\r
+ p_rec->qos_class_sl = cl_hton16((sl & IB_PATH_REC_SL_MASK) |\r
+ (qos_class << 4));\r
p_rec->mtu = (uint8_t)((mtu & IB_PATH_REC_BASE_MASK) |\r
(uint8_t)(mtu_selector << 6));\r
p_rec->rate = (uint8_t)((rate & IB_PATH_REC_BASE_MASK) |\r
p_rec->preference = preference;\r
\r
/* Clear global routing fields for local path records */\r
- p_rec->hop_flow_raw.val = 0;\r
+ p_rec->hop_flow_raw = 0;\r
p_rec->tclass = 0;\r
+ p_rec->service_id = 0;\r
\r
- p_rec->resv0 = 0;\r
p_rec->resv1 = 0;\r
p_rec->resv2 = 0;\r
}\r
* ib_path_rec_t\r
*********/\r
\r
+/****f* IBA Base: Types/ib_path_rec_set_sl\r
+* NAME\r
+* ib_path_rec_set_sl\r
+*\r
+* DESCRIPTION\r
+* Set path service level.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE void AL_API\r
+ib_path_rec_set_sl(IN ib_path_rec_t * const p_rec, IN const uint8_t sl)\r
+{\r
+ p_rec->qos_class_sl =\r
+ (p_rec->qos_class_sl & CL_HTON16(IB_PATH_REC_QOS_CLASS_MASK)) |\r
+ cl_hton16(sl & IB_PATH_REC_SL_MASK);\r
+}\r
+\r
/****f* IBA Base: Types/ib_path_rec_sl\r
* NAME\r
* ib_path_rec_sl\r
ib_path_rec_sl(\r
IN const ib_path_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_PATH_REC_SL_MASK);\r
}\r
/*\r
* PARAMETERS\r
* ib_path_rec_t\r
*********/\r
\r
+/****f* IBA Base: Types/ib_path_rec_set_qos_class\r
+* NAME\r
+* ib_path_rec_set_qos_class\r
+*\r
+* DESCRIPTION\r
+* Set path QoS class.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE void AL_API\r
+ib_path_rec_set_qos_class(IN ib_path_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_PATH_REC_SL_MASK)) |\r
+ cl_hton16(qos_class << 4);\r
+}\r
+/*\r
+* PARAMETERS\r
+* p_rec\r
+* [in] Pointer to the path 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_path_rec_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_path_rec_qos_class\r
+* NAME\r
+* ib_path_rec_qos_class\r
+*\r
+* DESCRIPTION\r
+* Get QoS class.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE uint16_t AL_API\r
+ib_path_rec_qos_class(IN const ib_path_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 path record object.\r
+*\r
+* RETURN VALUES\r
+* QoS class of the path record.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_path_rec_t\r
+*********/\r
+\r
/****f* IBA Base: Types/ib_path_rec_mtu\r
* NAME\r
* ib_path_rec_mtu\r
ib_path_rec_flow_lbl(\r
IN const ib_path_rec_t* const p_rec )\r
{\r
- return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw.val) >> 8) & 0x000FFFFF ) );\r
+ return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw) >> 8) & 0x000FFFFF ) );\r
}\r
/*\r
* PARAMETERS\r
ib_path_rec_hop_limit(\r
IN const ib_path_rec_t* const p_rec )\r
{\r
- return( p_rec->hop_flow_raw.bytes[3] );\r
+ return ((uint8_t) (cl_ntoh32(p_rec->hop_flow_raw) & 0x000000FF));\r
}\r
/*\r
* PARAMETERS\r
IN const net32_t flow_lbl,\r
IN const boolean_t raw )\r
{\r
- p_rec->hop_flow_raw.val = (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8;\r
- if( raw )\r
- p_rec->hop_flow_raw.val |= 0x80000000;\r
- p_rec->hop_flow_raw.val = cl_hton32( p_rec->hop_flow_raw.val );\r
- p_rec->hop_flow_raw.bytes[3] = hop_limit;\r
+ p_rec->hop_flow_raw = raw ? 0x80000000 : 0;\r
+ p_rec->hop_flow_raw |= (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8;\r
+ p_rec->hop_flow_raw |= hop_limit;\r
+ p_rec->hop_flow_raw = cl_hton32( p_rec->hop_flow_raw );\r
}\r
/*\r
* PARAMETERS\r
uint8_t base_ver;\r
uint8_t class_ver;\r
ib_net16_t cap_mask;\r
- ib_net32_t resp_time_val;\r
+ ib_net32_t cap_mask2_resp_time;\r
ib_gid_t redir_gid;\r
ib_net32_t redir_tc_sl_fl;\r
ib_net16_t redir_lid;\r
*\r
*********/\r
\r
+/****f* IBA Base: Types/ib_class_set_resp_time_val\r
+* NAME\r
+* ib_class_set_resp_time_val\r
+*\r
+* DESCRIPTION\r
+* Set maximum expected response time.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE void AL_API\r
+ib_class_set_resp_time_val(IN ib_class_port_info_t * const p_cpi,\r
+ IN const uint8_t val)\r
+{\r
+ p_cpi->cap_mask2_resp_time =\r
+ (p_cpi->cap_mask2_resp_time & CL_HTON32(~IB_CLASS_RESP_TIME_MASK)) |\r
+ cl_hton32(val & IB_CLASS_RESP_TIME_MASK);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_cpi\r
+* [in] Pointer to the class port info object.\r
+*\r
+* val\r
+* [in] Response time value to set.\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_class_port_info_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_class_resp_time_val\r
+* NAME\r
+* ib_class_resp_time_val\r
+*\r
+* DESCRIPTION\r
+* Get response time value.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE uint8_t AL_API\r
+ib_class_resp_time_val(IN ib_class_port_info_t * const p_cpi)\r
+{\r
+ return (uint8_t)(cl_ntoh32(p_cpi->cap_mask2_resp_time) &\r
+ IB_CLASS_RESP_TIME_MASK);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_cpi\r
+* [in] Pointer to the class port info object.\r
+*\r
+* RETURN VALUES\r
+* Response time value.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_class_port_info_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_class_set_cap_mask2\r
+* NAME\r
+* ib_class_set_cap_mask2\r
+*\r
+* DESCRIPTION\r
+* Set ClassPortInfo:CapabilityMask2.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE void AL_API\r
+ib_class_set_cap_mask2(IN ib_class_port_info_t * const p_cpi,\r
+ IN const uint32_t cap_mask2)\r
+{\r
+ p_cpi->cap_mask2_resp_time = (p_cpi->cap_mask2_resp_time &\r
+ CL_HTON32(IB_CLASS_RESP_TIME_MASK)) |\r
+ cl_hton32(cap_mask2 << 5);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_cpi\r
+* [in] Pointer to the class port info object.\r
+*\r
+* cap_mask2\r
+* [in] CapabilityMask2 value to set.\r
+*\r
+* RETURN VALUES\r
+* None\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_class_port_info_t\r
+*********/\r
+\r
+/****f* IBA Base: Types/ib_class_cap_mask2\r
+* NAME\r
+* ib_class_cap_mask2\r
+*\r
+* DESCRIPTION\r
+* Get ClassPortInfo:CapabilityMask2.\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE uint32_t AL_API\r
+ib_class_cap_mask2(IN const ib_class_port_info_t * const p_cpi)\r
+{\r
+ return (cl_ntoh32(p_cpi->cap_mask2_resp_time) >> 5);\r
+}\r
+\r
+/*\r
+* PARAMETERS\r
+* p_cpi\r
+* [in] Pointer to the class port info object.\r
+*\r
+* RETURN VALUES\r
+* CapabilityMask2 of the ClassPortInfo.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+* ib_class_port_info_t\r
+*********/\r
+\r
/****s* IBA Base: Types/ib_sm_info_t\r
* NAME\r
* ib_sm_info_t\r
#include <complib/cl_packon.h>\r
typedef struct _ib_vl_arb_element\r
{\r
- uint8_t res_vl;\r
+ uint8_t vl;\r
uint8_t weight;\r
} PACK_SUFFIX ib_vl_arb_element_t;\r
#include <complib/cl_packoff.h>\r
ib_vl_arb_element_get_vl(\r
IN const ib_vl_arb_element_t vl_arb_element )\r
{\r
- return (vl_arb_element.res_vl >> 4);\r
+ return (vl_arb_element.vl >> 4);\r
}\r
/*\r
* PARAMETERS\r
IN OUT ib_vl_arb_element_t* const p_vl_arb_element,\r
IN const uint8_t vl )\r
{\r
- p_vl_arb_element->res_vl = vl << 4;\r
+ p_vl_arb_element->vl = vl << 4;\r
}\r
/*\r
* PARAMETERS\r
#define IB_NOTICE_TYPE_EMPTY 0x7F\r
\r
#include <complib/cl_packon.h>\r
-typedef struct _ib_mad_notice_attr\r
-{\r
- /* is_generic:1, type:7, producer type or vendor id:24 */\r
- net32_t combo1;\r
- /* trap number or device id, depending on is_generic. */\r
- net16_t combo2;\r
-\r
- net16_t issuer_lid;\r
- /* notice toggle:1, notice_count:15 */\r
- net16_t combo3;\r
-\r
- uint8_t data_details[54];\r
- ib_gid_t issuer_gid;\r
+typedef struct _ib_mad_notice_attr // Total Size calc Accumulated\r
+{\r
+ uint8_t generic_type; // 1 1\r
+ \r
+ union _notice_g_or_v\r
+ {\r
+ struct _notice_generic // 5 6\r
+ {\r
+ uint8_t prod_type_msb;\r
+ ib_net16_t prod_type_lsb;\r
+ ib_net16_t trap_num;\r
+ } PACK_SUFFIX generic;\r
+ \r
+ struct _notice_vend\r
+ {\r
+ uint8_t vend_id_msb;\r
+ ib_net16_t vend_id_lsb;\r
+ ib_net16_t dev_id;\r
+ } PACK_SUFFIX vend;\r
+ } g_or_v;\r
+ \r
+ ib_net16_t issuer_lid; // 2 8\r
+ ib_net16_t toggle_count; // 2 10\r
+ \r
+ union _data_details // 54 64\r
+ {\r
+ struct _raw_data\r
+ {\r
+ uint8_t details[54];\r
+ } PACK_SUFFIX raw_data;\r
+\r
+ struct _ntc_64_67\r
+ {\r
+ uint8_t res[6];\r
+ ib_gid_t gid; // the Node or Multicast Group that came in/out\r
+ } PACK_SUFFIX ntc_64_67;\r
+\r
+ struct _ntc_128 {\r
+ ib_net16_t sw_lid; // the sw lid of which link state changed\r
+ } PACK_SUFFIX ntc_128;\r
+ \r
+ struct _ntc_129_131 {\r
+ ib_net16_t pad;\r
+ ib_net16_t lid; // lid and port number of the violation\r
+ uint8_t port_num;\r
+ } PACK_SUFFIX ntc_129_131;\r
+ \r
+ struct _ntc_144 {\r
+ ib_net16_t pad1;\r
+ ib_net16_t lid; // lid where capability mask changed\r
+ uint8_t pad2;\r
+ uint8_t local_changes;\r
+ ib_net32_t new_cap_mask; // new capability mask\r
+ ib_net16_t change_flgs;\r
+ } PACK_SUFFIX ntc_144;\r
+\r
+ struct _ntc_145 {\r
+ ib_net16_t pad1;\r
+ ib_net16_t lid; // lid where sys guid changed\r
+ ib_net16_t pad2;\r
+ ib_net64_t new_sys_guid; // new system image guid\r
+ } PACK_SUFFIX ntc_145;\r
+\r
+ struct _ntc_256 { // total: 54\r
+ ib_net16_t pad1; // 2\r
+ ib_net16_t lid; // 2\r
+ ib_net16_t pad2; // 2\r
+ uint8_t method; // 1\r
+ uint8_t pad3; // 1\r
+ ib_net16_t attr_id; // 2\r
+ ib_net32_t attr_mod; // 4\r
+ ib_net64_t mkey; // 8\r
+ uint8_t dr_slid; // 1\r
+ uint8_t dr_trunc_hop; // 1\r
+ uint8_t dr_rtn_path[30]; // 30\r
+ } PACK_SUFFIX ntc_256;\r
+\r
+ struct _ntc_257_258 // violation of p/q_key // 49\r
+ {\r
+ ib_net16_t pad1; // 2\r
+ ib_net16_t lid1; // 2\r
+ ib_net16_t lid2; // 2\r
+ ib_net32_t key; // 2\r
+ uint8_t sl; // 1\r
+ ib_net32_t qp1; // 4\r
+ ib_net32_t qp2; // 4\r
+ ib_gid_t gid1; // 16\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
+ {\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_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
+ } data_details;\r
+\r
+ ib_gid_t issuer_gid; // 16 80\r
\r
} PACK_SUFFIX ib_mad_notice_attr_t;\r
#include <complib/cl_packoff.h>\r
\r
-/****f* IBA Base: Types/ib_notice_get_generic\r
-* NAME\r
-* ib_notice_get_generic\r
-*\r
-* DESCRIPTION\r
-* Retrieves whether a notice trap is generic.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE boolean_t AL_API\r
-ib_notice_get_generic(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
+/**\r
+ * Trap 259 masks\r
+ */\r
+#define TRAP_259_MASK_SL (CL_HTON32(0xF0000000))\r
+#define TRAP_259_MASK_QP (CL_HTON32(0x00FFFFFF))\r
+\r
+/**\r
+ * Trap 144 masks\r
+ */\r
+#define TRAP_144_MASK_OTHER_LOCAL_CHANGES 0x01\r
+#define TRAP_144_MASK_SM_PRIORITY_CHANGE (CL_HTON16(0x0008))\r
+#define TRAP_144_MASK_LINK_SPEED_ENABLE_CHANGE (CL_HTON16(0x0004))\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
+#include <complib/cl_packon.h>\r
+typedef struct _ib_inform_info\r
{\r
- if( cl_ntoh32( p_notice_attr->combo1 ) & 0x00000001 )\r
- return TRUE;\r
- return FALSE;\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure for which to return\r
-* whether it is generic or not.\r
-*\r
-* RETURN VALUES\r
-* Returns TRUE if the notice is generic.\r
-*\r
-* Returns FALSE if the notice is vendor specific.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_generic\r
-*********/\r
+ ib_gid_t gid;\r
+ ib_net16_t lid_range_begin;\r
+ ib_net16_t lid_range_end;\r
+ ib_net16_t reserved1;\r
+ uint8_t is_generic;\r
+ uint8_t subscribe;\r
+ ib_net16_t trap_type;\r
+ union _inform_g_or_v {\r
+ struct _inform_generic {\r
+ ib_net16_t trap_num;\r
+ ib_net32_t qpn_resp_time_val;\r
+ uint8_t reserved2;\r
+ uint8_t node_type_msb;\r
+ ib_net16_t node_type_lsb;\r
+ } PACK_SUFFIX generic;\r
+ struct _inform_vend {\r
+ ib_net16_t dev_id;\r
+ ib_net32_t qpn_resp_time_val;\r
+ uint8_t reserved2;\r
+ uint8_t vendor_id_msb;\r
+ ib_net16_t vendor_id_lsb;\r
+ } PACK_SUFFIX vend;\r
+ } PACK_SUFFIX g_or_v;\r
+} PACK_SUFFIX ib_inform_info_t;\r
+#include <complib/cl_packoff.h>\r
\r
-/****f* IBA Base: Types/ib_notice_set_generic\r
+/****f* IBA Base: Types/ib_inform_info_get_qpn_resp_time\r
* NAME\r
-* ib_notice_set_generic\r
+* ib_inform_info_get_qpn_resp_time\r
*\r
* DESCRIPTION\r
-* Sets whether a notice trap is generic.\r
+* Get QPN of the inform info\r
*\r
* SYNOPSIS\r
*/\r
AL_INLINE void AL_API\r
-ib_notice_set_generic(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const boolean_t is_generic )\r
+ib_inform_info_get_qpn_resp_time(IN const ib_net32_t qpn_resp_time_val,\r
+ OUT ib_net32_t * const p_qpn,\r
+ OUT uint8_t * const p_resp_time_val)\r
{\r
- uint32_t val;\r
+ uint32_t tmp = cl_ntoh32(qpn_resp_time_val);\r
\r
- val = cl_ntoh32( p_notice_attr->combo1 );\r
- if( is_generic )\r
- val |= 0x00000001;\r
- else\r
- val &= 0xFFFFFFFE;\r
- p_notice_attr->combo1 = cl_hton32( val );\r
+ if (p_qpn)\r
+ *p_qpn = cl_hton32((tmp & 0xffffff00) >> 8);\r
+ if (p_resp_time_val)\r
+ *p_resp_time_val = (uint8_t) (tmp & 0x0000001f);\r
}\r
+\r
/*\r
* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure for which to set\r
-* the generic bit.\r
-*\r
-* is_generic\r
-* [in] TRUE if the notice is generic, FALSE if vendor specific.\r
+* qpn_resp_time_val\r
+* [in] the qpn and resp time val from the mad\r
*\r
* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_generic\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_get_type\r
-* NAME\r
-* ib_notice_get_type\r
+* p_qpn\r
+* [out] pointer to the qpn\r
*\r
-* DESCRIPTION\r
-* Retrieves the type of a notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint8_t AL_API\r
-ib_notice_get_type(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return (uint8_t)((cl_ntoh32( p_notice_attr->combo1 ) >> 1) & 0x0000007F);\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose type to return.\r
+* p_state\r
+* [out] pointer to the resp time val\r
*\r
-* RETURN VALUES\r
-* Returns the type of the notice.\r
+* NOTES\r
*\r
* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_type\r
+* ib_inform_info_t\r
*********/\r
\r
-/****f* IBA Base: Types/ib_notice_set_type\r
+/****f* IBA Base: Types/ib_inform_info_set_qpn\r
* NAME\r
-* ib_notice_set_type\r
+* ib_inform_info_set_qpn\r
*\r
* DESCRIPTION\r
-* Sets the type of a notice trap.\r
+* Set the QPN of the inform info\r
*\r
* SYNOPSIS\r
*/\r
AL_INLINE void AL_API\r
-ib_notice_set_type(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint8_t type )\r
+ib_inform_info_set_qpn(IN ib_inform_info_t * p_ii, IN ib_net32_t const qpn)\r
{\r
- uint32_t val;\r
+ uint32_t tmp = cl_ntoh32(p_ii->g_or_v.generic.qpn_resp_time_val);\r
\r
- val = cl_ntoh32( p_notice_attr->combo1 );\r
- /* Clear the type. */\r
- val &= 0xFFFFFF01;\r
- /* Set new value. */\r
- val |= (((uint32_t)(type & 0x7F)) << 1);\r
- p_notice_attr->combo1 = cl_hton32( val );\r
+ p_ii->g_or_v.generic.qpn_resp_time_val =\r
+ cl_hton32((tmp & 0x000000ff) | ((cl_ntoh32(qpn) << 8) & 0xffffff00)\r
+ );\r
}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure whose type to set.\r
-*\r
-* type\r
-* [in] Type of notice trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_type\r
-*********/\r
\r
-/****f* IBA Base: Types/ib_notice_get_prod_type\r
-* NAME\r
-* ib_notice_get_prod_type\r
-*\r
-* DESCRIPTION\r
-* Retrieves the producer type from a generic notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint32_t AL_API\r
-ib_notice_get_prod_type(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return (cl_ntoh32( p_notice_attr->combo1 ) >> 8);\r
-}\r
/*\r
* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* prducer type to return.\r
*\r
-* RETURN VALUES\r
-* Returns the producer type of the notice, in host byte order.\r
+* NOTES\r
*\r
* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_prod_type\r
+* ib_inform_info_t\r
*********/\r
\r
-/****f* IBA Base: Types/ib_notice_set_prod_type\r
+/****f* IBA Base: Types/ib_inform_info_get_prod_type\r
* NAME\r
-* ib_notice_set_prod_type\r
+* ib_inform_info_get_prod_type\r
*\r
* DESCRIPTION\r
-* Sets the producer type of a generic notice trap.\r
+* Get Producer Type of the Inform Info\r
+* 13.4.8.3 InformInfo\r
*\r
* SYNOPSIS\r
*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_prod_type(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint32_t prod_type )\r
+AL_INLINE ib_net32_t AL_API\r
+ib_inform_info_get_prod_type(IN const ib_inform_info_t * p_inf)\r
{\r
- uint32_t val;\r
+ uint32_t nt;\r
\r
- val = cl_ntoh32( p_notice_attr->combo1 );\r
- /* Clear the type. */\r
- val &= 0x000000FF;\r
- /* Set new value. */\r
- val |= (prod_type << 8);\r
- p_notice_attr->combo1 = cl_hton32( val );\r
+ nt = cl_ntoh16(p_inf->g_or_v.generic.node_type_lsb) |\r
+ (p_inf->g_or_v.generic.node_type_msb << 16);\r
+ return cl_hton32(nt);\r
}\r
+\r
/*\r
* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose producer type to set.\r
-*\r
-* prod_type\r
-* [in] Producer type of notice trap.\r
+* p_inf\r
+* [in] pointer to an inform info\r
*\r
* RETURN VALUES\r
-* This function does not return a value.\r
+* The producer type\r
+*\r
+* NOTES\r
*\r
* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_prod_type\r
+* ib_inform_info_t\r
*********/\r
\r
-/****f* IBA Base: Types/ib_notice_get_vend_id\r
+/****f* IBA Base: Types/ib_inform_info_get_vend_id\r
* NAME\r
-* ib_notice_get_vend_id\r
+* ib_inform_info_get_vend_id\r
*\r
* DESCRIPTION\r
-* Retrieves the vendor ID from a vendor specific notice trap.\r
+* Get Node Type of the Inform Info\r
*\r
* SYNOPSIS\r
*/\r
-AL_INLINE uint32_t AL_API\r
-ib_notice_get_vend_id(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
+AL_INLINE ib_net32_t AL_API\r
+ib_inform_info_get_vend_id(IN const ib_inform_info_t * p_inf)\r
{\r
- return ib_notice_get_prod_type( p_notice_attr );\r
+ uint32_t vi;\r
+\r
+ vi = cl_ntoh16(p_inf->g_or_v.vend.vendor_id_lsb) |\r
+ (p_inf->g_or_v.vend.vendor_id_msb << 16);\r
+ return cl_hton32(vi);\r
}\r
+\r
/*\r
* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* vendor ID to return.\r
+* p_inf\r
+* [in] pointer to an inform info\r
*\r
* RETURN VALUES\r
-* Returns the vendor ID of the notice, in host byte order.\r
+* The node type\r
+*\r
+* NOTES\r
*\r
* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_vend_id\r
+* ib_inform_info_t\r
*********/\r
\r
-/****f* IBA Base: Types/ib_notice_set_vend_id\r
+/****s* IBA Base: Types/ib_inform_info_record_t\r
* NAME\r
-* ib_notice_set_vend_id\r
+* ib_inform_info_record_t\r
*\r
* DESCRIPTION\r
-* Sets the vendor ID of a vendor specific notice trap.\r
+* IBA defined InformInfo Record. (15.2.5.12)\r
*\r
* SYNOPSIS\r
*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_vend_id(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint32_t vend_id )\r
-{\r
- ib_notice_set_prod_type( p_notice_attr, vend_id );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose vendor ID to set.\r
-*\r
-* vend_id\r
-* [in] Vendor ID of notice trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_vend_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_get_trap_num\r
-* NAME\r
-* ib_notice_get_trap_num\r
-*\r
-* DESCRIPTION\r
-* Retrieves the trap number from a generic notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint16_t AL_API\r
-ib_notice_get_trap_num(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return cl_ntoh16( p_notice_attr->combo2 );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* trap number to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the vendor ID of the notice, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_trap_num\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_set_trap_num\r
-* NAME\r
-* ib_notice_set_trap_num\r
-*\r
-* DESCRIPTION\r
-* Sets the trap number of a generic notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_trap_num(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint16_t trap_num )\r
-{\r
- p_notice_attr->combo2 = cl_hton16( trap_num );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose trap number to set.\r
-*\r
-* trap_num\r
-* [in] Trap number to set.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_trap_num\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_get_dev_id\r
-* NAME\r
-* ib_notice_get_dev_id\r
-*\r
-* DESCRIPTION\r
-* Retrieves the device ID from a vendor specific notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint16_t AL_API\r
-ib_notice_get_dev_id(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return ib_notice_get_trap_num( p_notice_attr );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* device ID to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the vendor ID of the notice, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_dev_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_set_dev_id\r
-* NAME\r
-* ib_notice_set_dev_id\r
-*\r
-* DESCRIPTION\r
-* Sets the producer type of a vendor specific notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_dev_id(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint16_t dev_id )\r
-{\r
- ib_notice_set_trap_num( p_notice_attr, dev_id );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose device ID to set.\r
-*\r
-* dev_id\r
-* [in] Device ID of notice trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_dev_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_get_toggle\r
-* NAME\r
-* ib_notice_get_toggle\r
-*\r
-* DESCRIPTION\r
-* Retrieves the notice toggle bit from a notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE boolean_t AL_API\r
-ib_notice_get_toggle(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return (cl_ntoh16( p_notice_attr->combo3 ) & 0x0001);\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* notice toggle bit value to return.\r
-*\r
-* RETURN VALUES\r
-* Returns TRUE if the notice toggle bit of the notice is set.\r
-*\r
-* Returns FALSE otherwise.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_toggle\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_set_toggle\r
-* NAME\r
-* ib_notice_set_toggle\r
-*\r
-* DESCRIPTION\r
-* Sets the notice toggle bit of a notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_toggle(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const boolean_t toggle_val )\r
-{\r
- uint16_t val;\r
- val = cl_ntoh16( p_notice_attr->combo3 );\r
- if( toggle_val )\r
- val |= 0x0001;\r
- else\r
- val &= 0xFFFE;\r
- p_notice_attr->combo3 = cl_hton16( val );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose notice toggle bit to set or clear.\r
-*\r
-* toggle_val\r
-* [in] Boolean value indicating whether the toggle bit of the notice\r
-* should be set or cleared.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_toggle\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_get_count\r
-* NAME\r
-* ib_notice_get_count\r
-*\r
-* DESCRIPTION\r
-* Retrieves the notice toggle count from a notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE boolean_t AL_API\r
-ib_notice_get_count(\r
- IN const ib_mad_notice_attr_t* const p_notice_attr )\r
-{\r
- return ((cl_ntoh16( p_notice_attr->combo3 ) & 0xFFFE) >> 1);\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in] Pointer to the notice attribute structure whose\r
-* notice toggle count to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the notice toggle count of the notice.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_set_count\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_notice_set_count\r
-* NAME\r
-* ib_notice_set_count\r
-*\r
-* DESCRIPTION\r
-* Sets the toggle count of a notice trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_notice_set_count(\r
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,\r
- IN const uint16_t toggle_cnt )\r
-{\r
- uint16_t val;\r
- val = cl_ntoh16( p_notice_attr->combo3 );\r
- val &= 0x0001;\r
- val |= (toggle_cnt << 1);\r
- p_notice_attr->combo3 = cl_hton16( val );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_notice_attr\r
-* [in/out] Pointer to the notice attribute structure\r
-* whose device ID to set.\r
-*\r
-* toggle_cnt\r
-* [in] Toggle count value of the notice.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_notice_attr_t, ib_notice_get_count\r
-*********/\r
-\r
-#include <complib/cl_packon.h>\r
-typedef struct _ib_inform_info\r
-{\r
- ib_gid_t gid;\r
-\r
- ib_net16_t lid_range_begin;\r
- ib_net16_t lid_range_end;\r
- // EZ: not v1.1 ib_net16_t pkey;\r
- ib_net16_t reserved;\r
- uint8_t is_generic;\r
- uint8_t subscribe;\r
- // EZ: not v1.1 ib_net16_t class_range;\r
- ib_net16_t trap_type;\r
-\r
- /* trap num or dev_id */\r
- ib_net16_t combo1;\r
- /* QPN:24, resv:3, resp_time_val:5 */\r
- ib_net32_t combo2;\r
- /* resv:8, producer type or vendor id:24 */\r
- ib_net32_t combo3;\r
-\r
-} PACK_SUFFIX ib_inform_info_t;\r
-#include <complib/cl_packoff.h>\r
-\r
-/****f* IBA Base: Types/ib_inform_get_trap_num\r
-* NAME\r
-* ib_inform_get_trap_num\r
-*\r
-* DESCRIPTION\r
-* Retrieves the trap number from an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint16_t AL_API\r
-ib_inform_get_trap_num(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return cl_ntoh16( p_inform_info->combo1 );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* trap number to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the trap number of the infrom info, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_trap_num\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_trap_num\r
-* NAME\r
-* ib_inform_set_trap_num\r
-*\r
-* DESCRIPTION\r
-* Sets the trap number of an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_trap_num(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const uint16_t trap_num )\r
-{\r
- p_inform_info->combo1 = cl_hton16( trap_num );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose trap number to set.\r
-*\r
-* trap_num\r
-* [in] Trap number to set.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_get_trap_num\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_get_dev_id\r
-* NAME\r
-* ib_inform_get_dev_id\r
-*\r
-* DESCRIPTION\r
-* Retrieves the device ID from a vendor specific inform trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint16_t AL_API\r
-ib_inform_get_dev_id(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return ib_inform_get_trap_num( p_inform_info );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* device ID to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the vendor ID of the inform info, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_dev_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_dev_id\r
-* NAME\r
-* ib_inform_set_dev_id\r
-*\r
-* DESCRIPTION\r
-* Sets the producer type of a vendor specific inform trap.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_dev_id(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const uint16_t dev_id )\r
-{\r
- ib_inform_set_trap_num( p_inform_info, dev_id );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose device ID to set.\r
-*\r
-* dev_id\r
-* [in] Device ID of inform trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_get_dev_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_get_qpn\r
-* NAME\r
-* ib_inform_get_qpn\r
-*\r
-* DESCRIPTION\r
-* Retrieves the QPN from an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE net32_t AL_API\r
-ib_inform_get_qpn(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return (p_inform_info->combo2 & CL_NTOH32( 0x00FFFFFF ));\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* QPN to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the QPN of the infrom info.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_qpn\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_qpn\r
-* NAME\r
-* ib_inform_set_qpn\r
-*\r
-* DESCRIPTION\r
-* Sets the QPN of an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_qpn(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const net32_t qpn )\r
-{\r
- p_inform_info->combo2 &= CL_NTOH32( 0xFF000000 );\r
- p_inform_info->combo2 |= (qpn & CL_NTOH32( 0x00FFFFFF ));\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose QPN to set.\r
-*\r
-* qpn\r
-* [in] QPN of the inform info.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_get_qpn\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_get_resp_time_val\r
-* NAME\r
-* ib_inform_get_resp_time_val\r
-*\r
-* DESCRIPTION\r
-* Retrieves the response time value from an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint8_t AL_API\r
-ib_inform_get_resp_time_val(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return (uint8_t)(cl_ntoh32( p_inform_info->combo2 ) >> 27);\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* response time value to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the response time value of the infrom info.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_resp_time_val\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_resp_time_val\r
-* NAME\r
-* ib_inform_set_resp_time_val\r
-*\r
-* DESCRIPTION\r
-* Sets the response time value of an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_resp_time_val(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const uint8_t resp_time_val )\r
-{\r
- uint32_t val;\r
-\r
- val = cl_ntoh32( p_inform_info->combo2 );\r
- val &= 0x07FFFFFF;\r
- val |= (resp_time_val << 27);\r
- p_inform_info->combo2 = cl_hton32( val );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose response time value to set.\r
-*\r
-* resp_time_val\r
-* [in] Response time value of the inform info.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_get_resp_time_val\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_get_prod_type\r
-* NAME\r
-* ib_inform_get_prod_type\r
-*\r
-* DESCRIPTION\r
-* Retrieves the producer type from an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint32_t AL_API\r
-ib_inform_get_prod_type(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return (cl_ntoh32( p_inform_info->combo3 ) >> 8);\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* prducer type to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the producer type of the infrom info, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_prod_type\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_prod_type\r
-* NAME\r
-* ib_inform_set_prod_type\r
-*\r
-* DESCRIPTION\r
-* Sets the producer type of an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_prod_type(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const uint32_t prod_type )\r
-{\r
- p_inform_info->combo3 = cl_hton32( prod_type << 8 );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose producer type to set.\r
-*\r
-* prod_type\r
-* [in] Producer type of inform trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_get_prod_type\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_get_vend_id\r
-* NAME\r
-* ib_inform_get_vend_id\r
-*\r
-* DESCRIPTION\r
-* Retrieves the vendor ID from an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE uint32_t AL_API\r
-ib_inform_get_vend_id(\r
- IN const ib_inform_info_t* const p_inform_info )\r
-{\r
- return ib_inform_get_prod_type( p_inform_info );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in] Pointer to the inform info structure whose\r
-* vendor ID to return.\r
-*\r
-* RETURN VALUES\r
-* Returns the vendor ID of the infrom info, in host byte order.\r
-*\r
-* SEE ALSO\r
-* ib_inform_info_t, ib_inform_set_vend_id\r
-*********/\r
-\r
-/****f* IBA Base: Types/ib_inform_set_vend_id\r
-* NAME\r
-* ib_inform_set_vend_id\r
-*\r
-* DESCRIPTION\r
-* Sets the vendor ID of an inform info structure.\r
-*\r
-* SYNOPSIS\r
-*/\r
-AL_INLINE void AL_API\r
-ib_inform_set_vend_id(\r
- IN OUT ib_inform_info_t* const p_inform_info,\r
- IN const uint32_t vend_id )\r
-{\r
- ib_inform_set_prod_type( p_inform_info, vend_id );\r
-}\r
-/*\r
-* PARAMETERS\r
-* p_inform_info\r
-* [in/out] Pointer to the inform info structure\r
-* whose vendor ID to set.\r
-*\r
-* vend_id\r
-* [in] Vendor ID of inform trap.\r
-*\r
-* RETURN VALUES\r
-* This function does not return a value.\r
-*\r
-* SEE ALSO\r
-* ib_mad_inform_info_t, ib_inform_get_vend_id\r
-*********/\r
-\r
-/****s* IBA Base: Types/ib_inform_info_record_t\r
-* NAME\r
-* ib_inform_info_record_t\r
-*\r
-* DESCRIPTION\r
-* IBA defined InformInfo Record. (15.2.5.12)\r
-*\r
-* SYNOPSIS\r
-*/\r
-#include <complib/cl_packon.h>\r
-typedef struct _ib_inform_info_record\r
+#include <complib/cl_packon.h>\r
+typedef struct _ib_inform_info_record\r
{\r
ib_gid_t subscriber_gid;\r
net16_t subscriber_enum;\r
uint16_t reserved[3];\r
ib_inform_info_t inform_info;\r
+ uint8_t pad[4];\r
\r
} PACK_SUFFIX ib_inform_info_record_t;\r
#include <complib/cl_packoff.h>\r