[ofw] [PATCH] ib_types: update SA attribute definitions
Sean Hefty
sean.hefty at intel.com
Tue Feb 24 13:37:31 PST 2009
To support a direct port of the ib-diags (and eventually opensm), update
ib_types.h so that the relevant definitions used by the diags match between
OFED and WinOF. The affected attributes are:
ib_path_rec
ib_vl_arb_element
ib_mad_notice_attr
ib_inform_info
ib_inform_info_record
Users of the attributes are updated accordingly. In several cases, static
inline accessor functions were provided in the ib_types.h header files that
were not called by anything. Rather than update all 29 of those functions, I
simply deleted them.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
If there's a strong reason to keep the 29 deleted functions, I can migrate
all of them to the new structure definitions. But nothing in the tree is
using them.
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/core/al/al_cm_qp.c branches\winverbs/core/al/al_cm_qp.c
--- trunk/core/al/al_cm_qp.c 2008-07-16 08:53:58.219125000 -0700
+++ branches\winverbs/core/al/al_cm_qp.c 2009-02-21 22:15:12.328125000 -0800
@@ -162,7 +162,7 @@ __format_req_path_rec(
p_path->local_lid,
p_path->remote_lid,
1, p_req->pkey,
- conn_req_path_get_svc_lvl( p_path ),
+ conn_req_path_get_svc_lvl( p_path ), 0,
IB_PATH_SELECTOR_EXACTLY, conn_req_get_mtu( p_req ),
IB_PATH_SELECTOR_EXACTLY,
conn_req_path_get_pkt_rate( p_path ),
@@ -170,7 +170,6 @@ __format_req_path_rec(
(uint8_t)( conn_req_path_get_lcl_ack_timeout( p_path ) - 1 ),
0 );
- p_path_rec->hop_flow_raw.val = 0;
/* Add global routing info as necessary. */
if( !conn_req_path_get_subn_lcl( p_path ) )
{
@@ -645,7 +644,7 @@ __proc_lap(
p_lap->alternate_path.local_lid,
p_lap->alternate_path.remote_lid,
1, IB_DEFAULT_PKEY,
- conn_lap_path_get_svc_lvl( &p_lap->alternate_path ),
+ conn_lap_path_get_svc_lvl( &p_lap->alternate_path ), 0,
IB_PATH_SELECTOR_EXACTLY,
IB_MTU_LEN_2048,
IB_PATH_SELECTOR_EXACTLY,
@@ -654,7 +653,6 @@ __proc_lap(
(uint8_t)( conn_lap_path_get_lcl_ack_timeout( p_path ) - 1 ),
0 );
- lap_rec.alt_path.hop_flow_raw.val = 0;
/* Add global routing info as necessary. */
if( !conn_lap_path_get_subn_lcl( &p_lap->alternate_path ) )
{
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/core/al/al_dm.c branches\winverbs/core/al/al_dm.c
--- trunk/core/al/al_dm.c 2008-07-07 09:59:47.343625000 -0700
+++ branches\winverbs/core/al/al_dm.c 2009-02-21 22:15:12.328125000 -0800
@@ -1583,7 +1583,7 @@ get_class_port_info(
p_class_port_info->base_ver = 1;
p_class_port_info->class_ver = 1;
- p_class_port_info->resp_time_val = CL_HTON32( DM_CLASS_RESP_TIME_VALUE );
+ p_class_port_info->cap_mask2_resp_time = CL_HTON32( DM_CLASS_RESP_TIME_VALUE );
}
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/core/al/kernel/al_cm_cep.c branches\winverbs/core/al/kernel/al_cm_cep.c
--- trunk/core/al/kernel/al_cm_cep.c 2009-01-24 11:15:06.140625000 -0800
+++ branches\winverbs/core/al/kernel/al_cm_cep.c 2009-02-21 22:15:12.187500000 -0800
@@ -6037,7 +6037,7 @@ static void
__format_path(ib_path_rec_t *p_path, req_path_info_t *p_info,
ib_net16_t pkey, uint8_t mtu)
{
- p_path->resv0 = 0;
+ p_path->service_id = 0;
p_path->dgid = p_info->local_gid;
p_path->sgid = p_info->remote_gid;
p_path->dlid = p_info->local_lid;
@@ -6047,7 +6047,8 @@ __format_path(ib_path_rec_t *p_path, req
p_path->tclass = p_info->traffic_class;
p_path->num_path = 0;
p_path->pkey = pkey;
- p_path->sl = conn_req_path_get_svc_lvl(p_info);
+ ib_path_rec_set_sl(p_path, conn_req_path_get_svc_lvl(p_info));
+ ib_path_rec_set_qos_class(p_path, 0);
p_path->mtu = mtu;
p_path->rate = conn_req_path_get_pkt_rate(p_info);
p_path->pkt_life = conn_req_path_get_lcl_ack_timeout(p_info);
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/core/al/kernel/al_ioc_pnp.c branches\winverbs/core/al/kernel/al_ioc_pnp.c
--- trunk/core/al/kernel/al_ioc_pnp.c 2008-07-07 09:59:43.718625000 -0700
+++ branches\winverbs/core/al/kernel/al_ioc_pnp.c 2009-02-21 22:15:12.187500000 -0800
@@ -979,7 +979,6 @@ __get_path(
* Clear reserved fields in case they were set to prevent undue path
* thrashing.
*/
- p_path->rec.resv0 = 0;
p_path->rec.resv1 = 0;
p_path->rec.resv2 = 0;
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/core/al/user/al_exports.src branches\winverbs/core/al/user/al_exports.src
--- trunk/core/al/user/al_exports.src 2008-02-21 00:45:57.971482000 -0800
+++ branches\winverbs/core/al/user/al_exports.src 2009-02-21 20:39:31.500000000 -0800
@@ -77,18 +77,6 @@ ib_gid_is_multicast
ib_gid_set_default
ib_grh_get_ver_class_flow
ib_grh_set_ver_class_flow
-ib_inform_get_dev_id
-ib_inform_get_prod_type
-ib_inform_get_qpn
-ib_inform_get_resp_time_val
-ib_inform_get_trap_num
-ib_inform_get_vend_id
-ib_inform_set_dev_id
-ib_inform_set_prod_type
-ib_inform_set_qpn
-ib_inform_set_resp_time_val
-ib_inform_set_trap_num
-ib_inform_set_vend_id
ib_init_dgrm_svc
ib_ioc_profile_get_subsys_vend_id
ib_ioc_profile_get_vend_id
@@ -117,22 +105,6 @@ ib_modify_cq
ib_modify_qp
ib_node_info_get_local_port_num
ib_node_info_get_vendor_id
-ib_notice_get_count
-ib_notice_get_dev_id
-ib_notice_get_generic
-ib_notice_get_prod_type
-ib_notice_get_toggle
-ib_notice_get_trap_num
-ib_notice_get_type
-ib_notice_get_vend_id
-ib_notice_set_count
-ib_notice_set_dev_id
-ib_notice_set_generic
-ib_notice_set_prod_type
-ib_notice_set_toggle
-ib_notice_set_trap_num
-ib_notice_set_type
-ib_notice_set_vend_id
ib_open_al
ib_open_ca
ib_path_get_ipd
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/inc/iba/ib_types.h branches\winverbs/inc/iba/ib_types.h
--- trunk/inc/iba/ib_types.h 2009-01-19 23:58:00.281250000 -0800
+++ branches\winverbs/inc/iba/ib_types.h 2009-02-21 22:15:12.156250000 -0800
@@ -1681,6 +1681,28 @@ ib_class_is_rmpp(
#define IB_SMINFO_STATE_MASTER 3
/**********/
+/****d* IBA Base: Constants/IB_PATH_REC_SL_MASK
+* NAME
+* IB_PATH_REC_SL_MASK
+*
+* DESCRIPTION
+* Mask for the sl field for path record
+*
+* SOURCE
+*/
+#define IB_PATH_REC_SL_MASK 0x000F
+
+/****d* IBA Base: Constants/IB_PATH_REC_QOS_CLASS_MASK
+* NAME
+* IB_PATH_REC_QOS_CLASS_MASK
+*
+* DESCRIPTION
+* Mask for the QoS class field for path record
+*
+* SOURCE
+*/
+#define IB_PATH_REC_QOS_CLASS_MASK 0xFFF0
+
/****d* IBA Base: Constants/IB_PATH_REC_SELECTOR_MASK
* NAME
* IB_PATH_REC_SELECTOR_MASK
@@ -2322,16 +2344,16 @@ typedef union _ib_field32_t
#include <complib/cl_packon.h>
typedef __declspec(align(8)) struct _ib_path_rec
{
- uint64_t resv0;
+ ib_net64_t service_id;
ib_gid_t dgid;
ib_gid_t sgid;
ib_net16_t dlid;
ib_net16_t slid;
- ib_field32_t hop_flow_raw;
+ ib_net32_t hop_flow_raw;
uint8_t tclass;
uint8_t num_path;
ib_net16_t pkey;
- ib_net16_t sl;
+ ib_net16_t qos_class_sl;
uint8_t mtu;
uint8_t rate;
uint8_t pkt_life;
@@ -2400,6 +2422,8 @@ typedef __declspec(align(8)) struct _ib_
*********/
/* Path Record Component Masks */
+#define IB_PR_COMPMASK_SERVICEID_MSB (CL_HTON64(((uint64_t)1)<<0))
+#define IB_PR_COMPMASK_SERVICEID_LSB (CL_HTON64(((uint64_t)1)<<1))
#define IB_PR_COMPMASK_DGID (CL_HTON64(((uint64_t)1)<<2))
#define IB_PR_COMPMASK_SGID (CL_HTON64(((uint64_t)1)<<3))
#define IB_PR_COMPMASK_DLID (CL_HTON64(((uint64_t)1)<<4))
@@ -2411,7 +2435,9 @@ typedef __declspec(align(8)) struct _ib_
#define IB_PR_COMPMASK_TCLASS (CL_HTON64(((uint64_t)1)<<10))
#define IB_PR_COMPMASK_REVERSIBLE (CL_HTON64(((uint64_t)1)<<11))
#define IB_PR_COMPMASK_NUM_PATH (CL_HTON64(((uint64_t)1)<<12))
+#define IB_PR_COMPMASK_NUMBPATH (CL_HTON64(((uint64_t)1)<<12))
#define IB_PR_COMPMASK_PKEY (CL_HTON64(((uint64_t)1)<<13))
+#define IB_PR_COMPMASK_QOS_CLASS (CL_HTON64(((uint64_t)1)<<14))
#define IB_PR_COMPMASK_RESV1 (CL_HTON64(((uint64_t)1)<<14))
#define IB_PR_COMPMASK_SL (CL_HTON64(((uint64_t)1)<<15))
#define IB_PR_COMPMASK_MTUSELEC (CL_HTON64(((uint64_t)1)<<16))
@@ -2608,7 +2634,7 @@ typedef __declspec(align(8)) struct _ib_
#define IB_MPR_COMPMASK_REVERSIBLE (CL_HTON64(((uint64_t)1)<<5))
#define IB_MPR_COMPMASK_NUMBPATH (CL_HTON64(((uint64_t)1)<<6))
#define IB_MPR_COMPMASK_PKEY (CL_HTON64(((uint64_t)1)<<7))
-#define IB_MPR_COMPMASK_RESV1 (CL_HTON64(((uint64_t)1)<<8))
+#define IB_MPR_COMPMASK_QOS_CLASS (CL_HTON64(((uint64_t)1)<<8))
#define IB_MPR_COMPMASK_SL (CL_HTON64(((uint64_t)1)<<9))
#define IB_MPR_COMPMASK_MTUSELEC (CL_HTON64(((uint64_t)1)<<10))
#define IB_MPR_COMPMASK_MTU (CL_HTON64(((uint64_t)1)<<11))
@@ -2671,6 +2697,7 @@ ib_path_rec_init_local(
IN const uint8_t num_path,
IN const ib_net16_t pkey,
IN const uint8_t sl,
+ IN const uint16_t qos_class,
IN const uint8_t mtu_selector,
IN const uint8_t mtu,
IN const uint8_t rate_selector,
@@ -2685,8 +2712,8 @@ ib_path_rec_init_local(
p_rec->slid = slid;
p_rec->num_path = num_path;
p_rec->pkey = pkey;
- /* Lower 4 bits of path rec's SL are reserved. */
- p_rec->sl = cl_ntoh16( sl );
+ p_rec->qos_class_sl = cl_hton16((sl & IB_PATH_REC_SL_MASK) |
+ (qos_class << 4));
p_rec->mtu = (uint8_t)((mtu & IB_PATH_REC_BASE_MASK) |
(uint8_t)(mtu_selector << 6));
p_rec->rate = (uint8_t)((rate & IB_PATH_REC_BASE_MASK) |
@@ -2696,10 +2723,10 @@ ib_path_rec_init_local(
p_rec->preference = preference;
/* Clear global routing fields for local path records */
- p_rec->hop_flow_raw.val = 0;
+ p_rec->hop_flow_raw = 0;
p_rec->tclass = 0;
+ p_rec->service_id = 0;
- p_rec->resv0 = 0;
p_rec->resv1 = 0;
p_rec->resv2 = 0;
}
@@ -2791,6 +2818,23 @@ ib_path_rec_num_path(
* ib_path_rec_t
*********/
+/****f* IBA Base: Types/ib_path_rec_set_sl
+* NAME
+* ib_path_rec_set_sl
+*
+* DESCRIPTION
+* Set path service level.
+*
+* SYNOPSIS
+*/
+AL_INLINE void AL_API
+ib_path_rec_set_sl(IN ib_path_rec_t * const p_rec, IN const uint8_t sl)
+{
+ p_rec->qos_class_sl =
+ (p_rec->qos_class_sl & CL_HTON16(IB_PATH_REC_QOS_CLASS_MASK)) |
+ cl_hton16(sl & IB_PATH_REC_SL_MASK);
+}
+
/****f* IBA Base: Types/ib_path_rec_sl
* NAME
* ib_path_rec_sl
@@ -2804,7 +2848,7 @@ AL_INLINE uint8_t AL_API
ib_path_rec_sl(
IN const ib_path_rec_t* const p_rec )
{
- return( (uint8_t)((cl_ntoh16( p_rec->sl )) & 0xF) );
+ return (uint8_t)(cl_ntoh16(p_rec->qos_class_sl) & IB_PATH_REC_SL_MASK);
}
/*
* PARAMETERS
@@ -2820,6 +2864,68 @@ ib_path_rec_sl(
* ib_path_rec_t
*********/
+/****f* IBA Base: Types/ib_path_rec_set_qos_class
+* NAME
+* ib_path_rec_set_qos_class
+*
+* DESCRIPTION
+* Set path QoS class.
+*
+* SYNOPSIS
+*/
+AL_INLINE void AL_API
+ib_path_rec_set_qos_class(IN ib_path_rec_t * const p_rec,
+ IN const uint16_t qos_class)
+{
+ p_rec->qos_class_sl =
+ (p_rec->qos_class_sl & CL_HTON16(IB_PATH_REC_SL_MASK)) |
+ cl_hton16(qos_class << 4);
+}
+/*
+* PARAMETERS
+* p_rec
+* [in] Pointer to the path record object.
+*
+* qos_class
+* [in] QoS class to set.
+*
+* RETURN VALUES
+* None
+*
+* NOTES
+*
+* SEE ALSO
+* ib_path_rec_t
+*********/
+
+/****f* IBA Base: Types/ib_path_rec_qos_class
+* NAME
+* ib_path_rec_qos_class
+*
+* DESCRIPTION
+* Get QoS class.
+*
+* SYNOPSIS
+*/
+AL_INLINE uint16_t AL_API
+ib_path_rec_qos_class(IN const ib_path_rec_t * const p_rec)
+{
+ return (cl_ntoh16(p_rec->qos_class_sl) >> 4);
+}
+/*
+* PARAMETERS
+* p_rec
+* [in] Pointer to the path record object.
+*
+* RETURN VALUES
+* QoS class of the path record.
+*
+* NOTES
+*
+* SEE ALSO
+* ib_path_rec_t
+*********/
+
/****f* IBA Base: Types/ib_path_rec_mtu
* NAME
* ib_path_rec_mtu
@@ -3035,7 +3141,7 @@ AL_INLINE net32_t AL_API
ib_path_rec_flow_lbl(
IN const ib_path_rec_t* const p_rec )
{
- return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw.val) >> 8) & 0x000FFFFF ) );
+ return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw) >> 8) & 0x000FFFFF ) );
}
/*
* PARAMETERS
@@ -3064,7 +3170,7 @@ AL_INLINE uint8_t AL_API
ib_path_rec_hop_limit(
IN const ib_path_rec_t* const p_rec )
{
- return( p_rec->hop_flow_raw.bytes[3] );
+ return ((uint8_t) (cl_ntoh32(p_rec->hop_flow_raw) & 0x000000FF));
}
/*
* PARAMETERS
@@ -3096,11 +3202,10 @@ ib_path_rec_set_hop_flow_raw(
IN const net32_t flow_lbl,
IN const boolean_t raw )
{
- p_rec->hop_flow_raw.val = (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8;
- if( raw )
- p_rec->hop_flow_raw.val |= 0x80000000;
- p_rec->hop_flow_raw.val = cl_hton32( p_rec->hop_flow_raw.val );
- p_rec->hop_flow_raw.bytes[3] = hop_limit;
+ p_rec->hop_flow_raw = raw ? 0x80000000 : 0;
+ p_rec->hop_flow_raw |= (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8;
+ p_rec->hop_flow_raw |= hop_limit;
+ p_rec->hop_flow_raw = cl_hton32( p_rec->hop_flow_raw );
}
/*
* PARAMETERS
@@ -3185,7 +3290,7 @@ typedef struct _ib_class_port_info
uint8_t base_ver;
uint8_t class_ver;
ib_net16_t cap_mask;
- ib_net32_t resp_time_val;
+ ib_net32_t cap_mask2_resp_time;
ib_gid_t redir_gid;
ib_net32_t redir_tc_sl_fl;
ib_net16_t redir_lid;
@@ -3259,6 +3364,135 @@ typedef struct _ib_class_port_info
*
*********/
+/****f* IBA Base: Types/ib_class_set_resp_time_val
+* NAME
+* ib_class_set_resp_time_val
+*
+* DESCRIPTION
+* Set maximum expected response time.
+*
+* SYNOPSIS
+*/
+AL_INLINE void AL_API
+ib_class_set_resp_time_val(IN ib_class_port_info_t * const p_cpi,
+ IN const uint8_t val)
+{
+ p_cpi->cap_mask2_resp_time =
+ (p_cpi->cap_mask2_resp_time & CL_HTON32(~IB_CLASS_RESP_TIME_MASK)) |
+ cl_hton32(val & IB_CLASS_RESP_TIME_MASK);
+}
+
+/*
+* PARAMETERS
+* p_cpi
+* [in] Pointer to the class port info object.
+*
+* val
+* [in] Response time value to set.
+*
+* RETURN VALUES
+* None
+*
+* NOTES
+*
+* SEE ALSO
+* ib_class_port_info_t
+*********/
+
+/****f* IBA Base: Types/ib_class_resp_time_val
+* NAME
+* ib_class_resp_time_val
+*
+* DESCRIPTION
+* Get response time value.
+*
+* SYNOPSIS
+*/
+AL_INLINE uint8_t AL_API
+ib_class_resp_time_val(IN ib_class_port_info_t * const p_cpi)
+{
+ return (uint8_t)(cl_ntoh32(p_cpi->cap_mask2_resp_time) &
+ IB_CLASS_RESP_TIME_MASK);
+}
+
+/*
+* PARAMETERS
+* p_cpi
+* [in] Pointer to the class port info object.
+*
+* RETURN VALUES
+* Response time value.
+*
+* NOTES
+*
+* SEE ALSO
+* ib_class_port_info_t
+*********/
+
+/****f* IBA Base: Types/ib_class_set_cap_mask2
+* NAME
+* ib_class_set_cap_mask2
+*
+* DESCRIPTION
+* Set ClassPortInfo:CapabilityMask2.
+*
+* SYNOPSIS
+*/
+AL_INLINE void AL_API
+ib_class_set_cap_mask2(IN ib_class_port_info_t * const p_cpi,
+ IN const uint32_t cap_mask2)
+{
+ p_cpi->cap_mask2_resp_time = (p_cpi->cap_mask2_resp_time &
+ CL_HTON32(IB_CLASS_RESP_TIME_MASK)) |
+ cl_hton32(cap_mask2 << 5);
+}
+
+/*
+* PARAMETERS
+* p_cpi
+* [in] Pointer to the class port info object.
+*
+* cap_mask2
+* [in] CapabilityMask2 value to set.
+*
+* RETURN VALUES
+* None
+*
+* NOTES
+*
+* SEE ALSO
+* ib_class_port_info_t
+*********/
+
+/****f* IBA Base: Types/ib_class_cap_mask2
+* NAME
+* ib_class_cap_mask2
+*
+* DESCRIPTION
+* Get ClassPortInfo:CapabilityMask2.
+*
+* SYNOPSIS
+*/
+AL_INLINE uint32_t AL_API
+ib_class_cap_mask2(IN const ib_class_port_info_t * const p_cpi)
+{
+ return (cl_ntoh32(p_cpi->cap_mask2_resp_time) >> 5);
+}
+
+/*
+* PARAMETERS
+* p_cpi
+* [in] Pointer to the class port info object.
+*
+* RETURN VALUES
+* CapabilityMask2 of the ClassPortInfo.
+*
+* NOTES
+*
+* SEE ALSO
+* ib_class_port_info_t
+*********/
+
/****s* IBA Base: Types/ib_sm_info_t
* NAME
* ib_sm_info_t
@@ -6344,7 +6578,7 @@ IN const uint8_t sl_index )
#include <complib/cl_packon.h>
typedef struct _ib_vl_arb_element
{
- uint8_t res_vl;
+ uint8_t vl;
uint8_t weight;
} PACK_SUFFIX ib_vl_arb_element_t;
#include <complib/cl_packoff.h>
@@ -6363,7 +6597,7 @@ AL_INLINE uint8_t AL_API
ib_vl_arb_element_get_vl(
IN const ib_vl_arb_element_t vl_arb_element )
{
- return (vl_arb_element.res_vl >> 4);
+ return (vl_arb_element.vl >> 4);
}
/*
* PARAMETERS
@@ -6391,7 +6625,7 @@ ib_vl_arb_element_set_vl(
IN OUT ib_vl_arb_element_t* const p_vl_arb_element,
IN const uint8_t vl )
{
- p_vl_arb_element->res_vl = vl << 4;
+ p_vl_arb_element->vl = vl << 4;
}
/*
* PARAMETERS
@@ -6981,945 +7215,315 @@ ib_member_set_join_state(
#define IB_NOTICE_TYPE_EMPTY 0x7F
#include <complib/cl_packon.h>
-typedef struct _ib_mad_notice_attr
+typedef struct _ib_mad_notice_attr // Total Size calc Accumulated
{
- /* is_generic:1, type:7, producer type or vendor id:24 */
- net32_t combo1;
- /* trap number or device id, depending on is_generic. */
- net16_t combo2;
-
- net16_t issuer_lid;
- /* notice toggle:1, notice_count:15 */
- net16_t combo3;
+ uint8_t generic_type; // 1 1
+
+ union _notice_g_or_v
+ {
+ struct _notice_generic // 5 6
+ {
+ uint8_t prod_type_msb;
+ ib_net16_t prod_type_lsb;
+ ib_net16_t trap_num;
+ } PACK_SUFFIX generic;
+
+ struct _notice_vend
+ {
+ uint8_t vend_id_msb;
+ ib_net16_t vend_id_lsb;
+ ib_net16_t dev_id;
+ } PACK_SUFFIX vend;
+ } g_or_v;
+
+ ib_net16_t issuer_lid; // 2 8
+ ib_net16_t toggle_count; // 2 10
+
+ union _data_details // 54 64
+ {
+ struct _raw_data
+ {
+ uint8_t details[54];
+ } PACK_SUFFIX raw_data;
+
+ struct _ntc_64_67
+ {
+ uint8_t res[6];
+ ib_gid_t gid; // the Node or Multicast Group that came in/out
+ } PACK_SUFFIX ntc_64_67;
+
+ struct _ntc_128 {
+ ib_net16_t sw_lid; // the sw lid of which link state changed
+ } PACK_SUFFIX ntc_128;
+
+ struct _ntc_129_131 {
+ ib_net16_t pad;
+ ib_net16_t lid; // lid and port number of the violation
+ uint8_t port_num;
+ } PACK_SUFFIX ntc_129_131;
+
+ struct _ntc_144 {
+ ib_net16_t pad1;
+ ib_net16_t lid; // lid where capability mask changed
+ uint8_t pad2;
+ uint8_t local_changes;
+ ib_net32_t new_cap_mask; // new capability mask
+ ib_net16_t change_flgs;
+ } PACK_SUFFIX ntc_144;
+
+ struct _ntc_145 {
+ ib_net16_t pad1;
+ ib_net16_t lid; // lid where sys guid changed
+ ib_net16_t pad2;
+ ib_net64_t new_sys_guid; // new system image guid
+ } PACK_SUFFIX ntc_145;
+
+ struct _ntc_256 { // total: 54
+ ib_net16_t pad1; // 2
+ ib_net16_t lid; // 2
+ ib_net16_t pad2; // 2
+ uint8_t method; // 1
+ uint8_t pad3; // 1
+ ib_net16_t attr_id; // 2
+ ib_net32_t attr_mod; // 4
+ ib_net64_t mkey; // 8
+ uint8_t dr_slid; // 1
+ uint8_t dr_trunc_hop; // 1
+ uint8_t dr_rtn_path[30]; // 30
+ } PACK_SUFFIX ntc_256;
+
+ struct _ntc_257_258 // violation of p/q_key // 49
+ {
+ ib_net16_t pad1; // 2
+ ib_net16_t lid1; // 2
+ ib_net16_t lid2; // 2
+ ib_net32_t key; // 2
+ uint8_t sl; // 1
+ ib_net32_t qp1; // 4
+ ib_net32_t qp2; // 4
+ ib_gid_t gid1; // 16
+ ib_gid_t gid2; // 16
+ } PACK_SUFFIX ntc_257_258;
+
+ struct _ntc_259 // p/q_key violation with sw info 53
+ {
+ ib_net16_t data_valid; // 2
+ ib_net16_t lid1; // 2
+ ib_net16_t lid2; // 2
+ ib_net32_t key; // 4
+ uint8_t sl; // 1
+ ib_net32_t qp1; // 4
+ uint8_t qp2_msb; // 1
+ ib_net16_t qp2_lsb; // 2
+ ib_gid_t gid1; // 16
+ ib_gid_t gid2; // 16
+ ib_net16_t sw_lid; // 2
+ uint8_t port_no; // 1
+ } PACK_SUFFIX ntc_259;
- uint8_t data_details[54];
- ib_gid_t issuer_gid;
+ } data_details;
+
+ ib_gid_t issuer_gid; // 16 80
} PACK_SUFFIX ib_mad_notice_attr_t;
#include <complib/cl_packoff.h>
-/****f* IBA Base: Types/ib_notice_get_generic
-* NAME
-* ib_notice_get_generic
-*
-* DESCRIPTION
-* Retrieves whether a notice trap is generic.
-*
-* SYNOPSIS
-*/
-AL_INLINE boolean_t AL_API
-ib_notice_get_generic(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
+/**
+ * Trap 259 masks
+ */
+#define TRAP_259_MASK_SL (CL_HTON32(0xF0000000))
+#define TRAP_259_MASK_QP (CL_HTON32(0x00FFFFFF))
+
+/**
+ * Trap 144 masks
+ */
+#define TRAP_144_MASK_OTHER_LOCAL_CHANGES 0x01
+#define TRAP_144_MASK_SM_PRIORITY_CHANGE (CL_HTON16(0x0008))
+#define TRAP_144_MASK_LINK_SPEED_ENABLE_CHANGE (CL_HTON16(0x0004))
+#define TRAP_144_MASK_LINK_WIDTH_ENABLE_CHANGE (CL_HTON16(0x0002))
+#define TRAP_144_MASK_NODE_DESCRIPTION_CHANGE (CL_HTON16(0x0001))
+
+#include <complib/cl_packon.h>
+typedef struct _ib_inform_info
{
- if( cl_ntoh32( p_notice_attr->combo1 ) & 0x00000001 )
- return TRUE;
- return FALSE;
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure for which to return
-* whether it is generic or not.
-*
-* RETURN VALUES
-* Returns TRUE if the notice is generic.
-*
-* Returns FALSE if the notice is vendor specific.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_generic
-*********/
+ ib_gid_t gid;
+ ib_net16_t lid_range_begin;
+ ib_net16_t lid_range_end;
+ ib_net16_t reserved1;
+ uint8_t is_generic;
+ uint8_t subscribe;
+ ib_net16_t trap_type;
+ union _inform_g_or_v {
+ struct _inform_generic {
+ ib_net16_t trap_num;
+ ib_net32_t qpn_resp_time_val;
+ uint8_t reserved2;
+ uint8_t node_type_msb;
+ ib_net16_t node_type_lsb;
+ } PACK_SUFFIX generic;
+ struct _inform_vend {
+ ib_net16_t dev_id;
+ ib_net32_t qpn_resp_time_val;
+ uint8_t reserved2;
+ uint8_t vendor_id_msb;
+ ib_net16_t vendor_id_lsb;
+ } PACK_SUFFIX vend;
+ } PACK_SUFFIX g_or_v;
+} PACK_SUFFIX ib_inform_info_t;
+#include <complib/cl_packoff.h>
-/****f* IBA Base: Types/ib_notice_set_generic
+/****f* IBA Base: Types/ib_inform_info_get_qpn_resp_time
* NAME
-* ib_notice_set_generic
+* ib_inform_info_get_qpn_resp_time
*
* DESCRIPTION
-* Sets whether a notice trap is generic.
+* Get QPN of the inform info
*
* SYNOPSIS
*/
AL_INLINE void AL_API
-ib_notice_set_generic(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const boolean_t is_generic )
+ib_inform_info_get_qpn_resp_time(IN const ib_net32_t qpn_resp_time_val,
+ OUT ib_net32_t * const p_qpn,
+ OUT uint8_t * const p_resp_time_val)
{
- uint32_t val;
+ uint32_t tmp = cl_ntoh32(qpn_resp_time_val);
- val = cl_ntoh32( p_notice_attr->combo1 );
- if( is_generic )
- val |= 0x00000001;
- else
- val &= 0xFFFFFFFE;
- p_notice_attr->combo1 = cl_hton32( val );
+ if (p_qpn)
+ *p_qpn = cl_hton32((tmp & 0xffffff00) >> 8);
+ if (p_resp_time_val)
+ *p_resp_time_val = (uint8_t) (tmp & 0x0000001f);
}
+
/*
* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure for which to set
-* the generic bit.
-*
-* is_generic
-* [in] TRUE if the notice is generic, FALSE if vendor specific.
+* qpn_resp_time_val
+* [in] the qpn and resp time val from the mad
*
* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_generic
-*********/
-
-/****f* IBA Base: Types/ib_notice_get_type
-* NAME
-* ib_notice_get_type
-*
-* DESCRIPTION
-* Retrieves the type of a notice trap.
+* p_qpn
+* [out] pointer to the qpn
*
-* SYNOPSIS
-*/
-AL_INLINE uint8_t AL_API
-ib_notice_get_type(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return (uint8_t)((cl_ntoh32( p_notice_attr->combo1 ) >> 1) & 0x0000007F);
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose type to return.
+* p_state
+* [out] pointer to the resp time val
*
-* RETURN VALUES
-* Returns the type of the notice.
+* NOTES
*
* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_type
+* ib_inform_info_t
*********/
-/****f* IBA Base: Types/ib_notice_set_type
+/****f* IBA Base: Types/ib_inform_info_set_qpn
* NAME
-* ib_notice_set_type
+* ib_inform_info_set_qpn
*
* DESCRIPTION
-* Sets the type of a notice trap.
+* Set the QPN of the inform info
*
* SYNOPSIS
*/
AL_INLINE void AL_API
-ib_notice_set_type(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint8_t type )
+ib_inform_info_set_qpn(IN ib_inform_info_t * p_ii, IN ib_net32_t const qpn)
{
- uint32_t val;
+ uint32_t tmp = cl_ntoh32(p_ii->g_or_v.generic.qpn_resp_time_val);
- val = cl_ntoh32( p_notice_attr->combo1 );
- /* Clear the type. */
- val &= 0xFFFFFF01;
- /* Set new value. */
- val |= (((uint32_t)(type & 0x7F)) << 1);
- p_notice_attr->combo1 = cl_hton32( val );
+ p_ii->g_or_v.generic.qpn_resp_time_val =
+ cl_hton32((tmp & 0x000000ff) | ((cl_ntoh32(qpn) << 8) & 0xffffff00)
+ );
}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure whose type to set.
-*
-* type
-* [in] Type of notice trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_type
-*********/
-/****f* IBA Base: Types/ib_notice_get_prod_type
-* NAME
-* ib_notice_get_prod_type
-*
-* DESCRIPTION
-* Retrieves the producer type from a generic notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint32_t AL_API
-ib_notice_get_prod_type(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return (cl_ntoh32( p_notice_attr->combo1 ) >> 8);
-}
/*
* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* prducer type to return.
*
-* RETURN VALUES
-* Returns the producer type of the notice, in host byte order.
+* NOTES
*
* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_prod_type
+* ib_inform_info_t
*********/
-/****f* IBA Base: Types/ib_notice_set_prod_type
+/****f* IBA Base: Types/ib_inform_info_get_prod_type
* NAME
-* ib_notice_set_prod_type
+* ib_inform_info_get_prod_type
*
* DESCRIPTION
-* Sets the producer type of a generic notice trap.
+* Get Producer Type of the Inform Info
+* 13.4.8.3 InformInfo
*
* SYNOPSIS
*/
-AL_INLINE void AL_API
-ib_notice_set_prod_type(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint32_t prod_type )
+AL_INLINE ib_net32_t AL_API
+ib_inform_info_get_prod_type(IN const ib_inform_info_t * p_inf)
{
- uint32_t val;
+ uint32_t nt;
- val = cl_ntoh32( p_notice_attr->combo1 );
- /* Clear the type. */
- val &= 0x000000FF;
- /* Set new value. */
- val |= (prod_type << 8);
- p_notice_attr->combo1 = cl_hton32( val );
+ nt = cl_ntoh16(p_inf->g_or_v.generic.node_type_lsb) |
+ (p_inf->g_or_v.generic.node_type_msb << 16);
+ return cl_hton32(nt);
}
+
/*
* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose producer type to set.
-*
-* prod_type
-* [in] Producer type of notice trap.
+* p_inf
+* [in] pointer to an inform info
*
* RETURN VALUES
-* This function does not return a value.
+* The producer type
+*
+* NOTES
*
* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_prod_type
+* ib_inform_info_t
*********/
-/****f* IBA Base: Types/ib_notice_get_vend_id
+/****f* IBA Base: Types/ib_inform_info_get_vend_id
* NAME
-* ib_notice_get_vend_id
+* ib_inform_info_get_vend_id
*
* DESCRIPTION
-* Retrieves the vendor ID from a vendor specific notice trap.
+* Get Node Type of the Inform Info
*
* SYNOPSIS
*/
-AL_INLINE uint32_t AL_API
-ib_notice_get_vend_id(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
+AL_INLINE ib_net32_t AL_API
+ib_inform_info_get_vend_id(IN const ib_inform_info_t * p_inf)
{
- return ib_notice_get_prod_type( p_notice_attr );
+ uint32_t vi;
+
+ vi = cl_ntoh16(p_inf->g_or_v.vend.vendor_id_lsb) |
+ (p_inf->g_or_v.vend.vendor_id_msb << 16);
+ return cl_hton32(vi);
}
+
/*
* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* vendor ID to return.
+* p_inf
+* [in] pointer to an inform info
*
* RETURN VALUES
-* Returns the vendor ID of the notice, in host byte order.
+* The node type
+*
+* NOTES
*
* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_vend_id
+* ib_inform_info_t
*********/
-/****f* IBA Base: Types/ib_notice_set_vend_id
+/****s* IBA Base: Types/ib_inform_info_record_t
* NAME
-* ib_notice_set_vend_id
+* ib_inform_info_record_t
*
* DESCRIPTION
-* Sets the vendor ID of a vendor specific notice trap.
+* IBA defined InformInfo Record. (15.2.5.12)
*
* SYNOPSIS
*/
-AL_INLINE void AL_API
-ib_notice_set_vend_id(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint32_t vend_id )
-{
- ib_notice_set_prod_type( p_notice_attr, vend_id );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose vendor ID to set.
-*
-* vend_id
-* [in] Vendor ID of notice trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_vend_id
-*********/
-
-/****f* IBA Base: Types/ib_notice_get_trap_num
-* NAME
-* ib_notice_get_trap_num
-*
-* DESCRIPTION
-* Retrieves the trap number from a generic notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint16_t AL_API
-ib_notice_get_trap_num(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return cl_ntoh16( p_notice_attr->combo2 );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* trap number to return.
-*
-* RETURN VALUES
-* Returns the vendor ID of the notice, in host byte order.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_trap_num
-*********/
-
-/****f* IBA Base: Types/ib_notice_set_trap_num
-* NAME
-* ib_notice_set_trap_num
-*
-* DESCRIPTION
-* Sets the trap number of a generic notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_notice_set_trap_num(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint16_t trap_num )
-{
- p_notice_attr->combo2 = cl_hton16( trap_num );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose trap number to set.
-*
-* trap_num
-* [in] Trap number to set.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_trap_num
-*********/
-
-/****f* IBA Base: Types/ib_notice_get_dev_id
-* NAME
-* ib_notice_get_dev_id
-*
-* DESCRIPTION
-* Retrieves the device ID from a vendor specific notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint16_t AL_API
-ib_notice_get_dev_id(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return ib_notice_get_trap_num( p_notice_attr );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* device ID to return.
-*
-* RETURN VALUES
-* Returns the vendor ID of the notice, in host byte order.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_dev_id
-*********/
-
-/****f* IBA Base: Types/ib_notice_set_dev_id
-* NAME
-* ib_notice_set_dev_id
-*
-* DESCRIPTION
-* Sets the producer type of a vendor specific notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_notice_set_dev_id(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint16_t dev_id )
-{
- ib_notice_set_trap_num( p_notice_attr, dev_id );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose device ID to set.
-*
-* dev_id
-* [in] Device ID of notice trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_dev_id
-*********/
-
-/****f* IBA Base: Types/ib_notice_get_toggle
-* NAME
-* ib_notice_get_toggle
-*
-* DESCRIPTION
-* Retrieves the notice toggle bit from a notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE boolean_t AL_API
-ib_notice_get_toggle(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return (cl_ntoh16( p_notice_attr->combo3 ) & 0x0001);
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* notice toggle bit value to return.
-*
-* RETURN VALUES
-* Returns TRUE if the notice toggle bit of the notice is set.
-*
-* Returns FALSE otherwise.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_toggle
-*********/
-
-/****f* IBA Base: Types/ib_notice_set_toggle
-* NAME
-* ib_notice_set_toggle
-*
-* DESCRIPTION
-* Sets the notice toggle bit of a notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_notice_set_toggle(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const boolean_t toggle_val )
-{
- uint16_t val;
- val = cl_ntoh16( p_notice_attr->combo3 );
- if( toggle_val )
- val |= 0x0001;
- else
- val &= 0xFFFE;
- p_notice_attr->combo3 = cl_hton16( val );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose notice toggle bit to set or clear.
-*
-* toggle_val
-* [in] Boolean value indicating whether the toggle bit of the notice
-* should be set or cleared.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_toggle
-*********/
-
-/****f* IBA Base: Types/ib_notice_get_count
-* NAME
-* ib_notice_get_count
-*
-* DESCRIPTION
-* Retrieves the notice toggle count from a notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE boolean_t AL_API
-ib_notice_get_count(
- IN const ib_mad_notice_attr_t* const p_notice_attr )
-{
- return ((cl_ntoh16( p_notice_attr->combo3 ) & 0xFFFE) >> 1);
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in] Pointer to the notice attribute structure whose
-* notice toggle count to return.
-*
-* RETURN VALUES
-* Returns the notice toggle count of the notice.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_set_count
-*********/
-
-/****f* IBA Base: Types/ib_notice_set_count
-* NAME
-* ib_notice_set_count
-*
-* DESCRIPTION
-* Sets the toggle count of a notice trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_notice_set_count(
- IN OUT ib_mad_notice_attr_t* const p_notice_attr,
- IN const uint16_t toggle_cnt )
-{
- uint16_t val;
- val = cl_ntoh16( p_notice_attr->combo3 );
- val &= 0x0001;
- val |= (toggle_cnt << 1);
- p_notice_attr->combo3 = cl_hton16( val );
-}
-/*
-* PARAMETERS
-* p_notice_attr
-* [in/out] Pointer to the notice attribute structure
-* whose device ID to set.
-*
-* toggle_cnt
-* [in] Toggle count value of the notice.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_notice_attr_t, ib_notice_get_count
-*********/
-
-#include <complib/cl_packon.h>
-typedef struct _ib_inform_info
-{
- ib_gid_t gid;
-
- ib_net16_t lid_range_begin;
- ib_net16_t lid_range_end;
- // EZ: not v1.1 ib_net16_t pkey;
- ib_net16_t reserved;
- uint8_t is_generic;
- uint8_t subscribe;
- // EZ: not v1.1 ib_net16_t class_range;
- ib_net16_t trap_type;
-
- /* trap num or dev_id */
- ib_net16_t combo1;
- /* QPN:24, resv:3, resp_time_val:5 */
- ib_net32_t combo2;
- /* resv:8, producer type or vendor id:24 */
- ib_net32_t combo3;
-
-} PACK_SUFFIX ib_inform_info_t;
-#include <complib/cl_packoff.h>
-
-/****f* IBA Base: Types/ib_inform_get_trap_num
-* NAME
-* ib_inform_get_trap_num
-*
-* DESCRIPTION
-* Retrieves the trap number from an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint16_t AL_API
-ib_inform_get_trap_num(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return cl_ntoh16( p_inform_info->combo1 );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* trap number to return.
-*
-* RETURN VALUES
-* Returns the trap number of the infrom info, in host byte order.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_trap_num
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_trap_num
-* NAME
-* ib_inform_set_trap_num
-*
-* DESCRIPTION
-* Sets the trap number of an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_trap_num(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const uint16_t trap_num )
-{
- p_inform_info->combo1 = cl_hton16( trap_num );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose trap number to set.
-*
-* trap_num
-* [in] Trap number to set.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_get_trap_num
-*********/
-
-/****f* IBA Base: Types/ib_inform_get_dev_id
-* NAME
-* ib_inform_get_dev_id
-*
-* DESCRIPTION
-* Retrieves the device ID from a vendor specific inform trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint16_t AL_API
-ib_inform_get_dev_id(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return ib_inform_get_trap_num( p_inform_info );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* device ID to return.
-*
-* RETURN VALUES
-* Returns the vendor ID of the inform info, in host byte order.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_dev_id
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_dev_id
-* NAME
-* ib_inform_set_dev_id
-*
-* DESCRIPTION
-* Sets the producer type of a vendor specific inform trap.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_dev_id(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const uint16_t dev_id )
-{
- ib_inform_set_trap_num( p_inform_info, dev_id );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose device ID to set.
-*
-* dev_id
-* [in] Device ID of inform trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_get_dev_id
-*********/
-
-/****f* IBA Base: Types/ib_inform_get_qpn
-* NAME
-* ib_inform_get_qpn
-*
-* DESCRIPTION
-* Retrieves the QPN from an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE net32_t AL_API
-ib_inform_get_qpn(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return (p_inform_info->combo2 & CL_NTOH32( 0x00FFFFFF ));
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* QPN to return.
-*
-* RETURN VALUES
-* Returns the QPN of the infrom info.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_qpn
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_qpn
-* NAME
-* ib_inform_set_qpn
-*
-* DESCRIPTION
-* Sets the QPN of an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_qpn(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const net32_t qpn )
-{
- p_inform_info->combo2 &= CL_NTOH32( 0xFF000000 );
- p_inform_info->combo2 |= (qpn & CL_NTOH32( 0x00FFFFFF ));
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose QPN to set.
-*
-* qpn
-* [in] QPN of the inform info.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_get_qpn
-*********/
-
-/****f* IBA Base: Types/ib_inform_get_resp_time_val
-* NAME
-* ib_inform_get_resp_time_val
-*
-* DESCRIPTION
-* Retrieves the response time value from an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint8_t AL_API
-ib_inform_get_resp_time_val(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return (uint8_t)(cl_ntoh32( p_inform_info->combo2 ) >> 27);
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* response time value to return.
-*
-* RETURN VALUES
-* Returns the response time value of the infrom info.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_resp_time_val
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_resp_time_val
-* NAME
-* ib_inform_set_resp_time_val
-*
-* DESCRIPTION
-* Sets the response time value of an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_resp_time_val(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const uint8_t resp_time_val )
-{
- uint32_t val;
-
- val = cl_ntoh32( p_inform_info->combo2 );
- val &= 0x07FFFFFF;
- val |= (resp_time_val << 27);
- p_inform_info->combo2 = cl_hton32( val );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose response time value to set.
-*
-* resp_time_val
-* [in] Response time value of the inform info.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_get_resp_time_val
-*********/
-
-/****f* IBA Base: Types/ib_inform_get_prod_type
-* NAME
-* ib_inform_get_prod_type
-*
-* DESCRIPTION
-* Retrieves the producer type from an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint32_t AL_API
-ib_inform_get_prod_type(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return (cl_ntoh32( p_inform_info->combo3 ) >> 8);
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* prducer type to return.
-*
-* RETURN VALUES
-* Returns the producer type of the infrom info, in host byte order.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_prod_type
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_prod_type
-* NAME
-* ib_inform_set_prod_type
-*
-* DESCRIPTION
-* Sets the producer type of an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_prod_type(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const uint32_t prod_type )
-{
- p_inform_info->combo3 = cl_hton32( prod_type << 8 );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose producer type to set.
-*
-* prod_type
-* [in] Producer type of inform trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_get_prod_type
-*********/
-
-/****f* IBA Base: Types/ib_inform_get_vend_id
-* NAME
-* ib_inform_get_vend_id
-*
-* DESCRIPTION
-* Retrieves the vendor ID from an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE uint32_t AL_API
-ib_inform_get_vend_id(
- IN const ib_inform_info_t* const p_inform_info )
-{
- return ib_inform_get_prod_type( p_inform_info );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in] Pointer to the inform info structure whose
-* vendor ID to return.
-*
-* RETURN VALUES
-* Returns the vendor ID of the infrom info, in host byte order.
-*
-* SEE ALSO
-* ib_inform_info_t, ib_inform_set_vend_id
-*********/
-
-/****f* IBA Base: Types/ib_inform_set_vend_id
-* NAME
-* ib_inform_set_vend_id
-*
-* DESCRIPTION
-* Sets the vendor ID of an inform info structure.
-*
-* SYNOPSIS
-*/
-AL_INLINE void AL_API
-ib_inform_set_vend_id(
- IN OUT ib_inform_info_t* const p_inform_info,
- IN const uint32_t vend_id )
-{
- ib_inform_set_prod_type( p_inform_info, vend_id );
-}
-/*
-* PARAMETERS
-* p_inform_info
-* [in/out] Pointer to the inform info structure
-* whose vendor ID to set.
-*
-* vend_id
-* [in] Vendor ID of inform trap.
-*
-* RETURN VALUES
-* This function does not return a value.
-*
-* SEE ALSO
-* ib_mad_inform_info_t, ib_inform_get_vend_id
-*********/
-
-/****s* IBA Base: Types/ib_inform_info_record_t
-* NAME
-* ib_inform_info_record_t
-*
-* DESCRIPTION
-* IBA defined InformInfo Record. (15.2.5.12)
-*
-* SYNOPSIS
-*/
-#include <complib/cl_packon.h>
-typedef struct _ib_inform_info_record
+#include <complib/cl_packon.h>
+typedef struct _ib_inform_info_record
{
ib_gid_t subscriber_gid;
net16_t subscriber_enum;
uint16_t reserved[3];
ib_inform_info_t inform_info;
+ uint8_t pad[4];
} PACK_SUFFIX ib_inform_info_record_t;
#include <complib/cl_packoff.h>
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/ulp/ipoib/kernel/ipoib_port.c
branches\winverbs/ulp/ipoib/kernel/ipoib_port.c
--- trunk/ulp/ipoib/kernel/ipoib_port.c 2009-02-11 05:28:31.852625000 -0800
+++ branches\winverbs/ulp/ipoib/kernel/ipoib_port.c 2009-02-21 22:15:12.328125000 -0800
@@ -4800,7 +4800,7 @@ ipoib_mac_to_path(
p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, mac_item );
}
- p_path->resv0 = 0;
+ p_path->service_id = 0;
p_path->dgid = p_endpt->dgid;
p_path->sgid = p_port->p_local_endpt->dgid;
p_path->dlid = p_endpt->dlid;
@@ -4826,7 +4826,7 @@ ipoib_mac_to_path(
p_port->p_local_endpt->dlid,
1,
p_port->ib_mgr.bcast_rec.pkey,
- sl,
+ sl, 0,
IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.mtu,
IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.rate,
IB_PATH_SELECTOR_EXACTLY, pkt_life,
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/ulp/qlgcvnic/kernel/vnic_adapter.c
branches\winverbs/ulp/qlgcvnic/kernel/vnic_adapter.c
--- trunk/ulp/qlgcvnic/kernel/vnic_adapter.c 2008-07-16 08:53:54.078500000 -0700
+++ branches\winverbs/ulp/qlgcvnic/kernel/vnic_adapter.c 2009-02-21 22:15:12.359375000 -0800
@@ -767,7 +767,7 @@ __path_records_match(
return FALSE;
if( p_path1->rate != p_path2->rate )
return FALSE;
- if( p_path1->sl != p_path2->sl )
+ if( ib_path_rec_sl(p_path1) != ib_path_rec_sl(p_path2) )
return FALSE;
if( p_path1->tclass != p_path2->tclass )
return FALSE;
diff -up -r -X trunk\docs\dontdiff.txt -I '\$Id:' trunk/ulp/srp/kernel/srp_hba.c branches\winverbs/ulp/srp/kernel/srp_hba.c
--- trunk/ulp/srp/kernel/srp_hba.c 2008-07-07 09:59:36.234250000 -0700
+++ branches\winverbs/ulp/srp/kernel/srp_hba.c 2009-02-21 22:15:12.343750000 -0800
@@ -461,7 +461,7 @@ __srp_path_rec_equal(
if ( p_path_rec_1->slid != p_path_rec_2->slid )
return ( FALSE );
- if ( p_path_rec_1->hop_flow_raw.val != p_path_rec_2->hop_flow_raw.val )
+ if ( p_path_rec_1->hop_flow_raw != p_path_rec_2->hop_flow_raw )
{
SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,
("hop_flow_raw.val does not match.\n") );
@@ -492,7 +492,7 @@ __srp_path_rec_equal(
return ( FALSE );
}
- if ( p_path_rec_1->sl != p_path_rec_2->sl )
+ if ( ib_path_rec_sl(p_path_rec_1) != ib_path_rec_sl(p_path_rec_2) )
{
SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,
("sl does not match.\n") );
@@ -532,12 +532,6 @@ __srp_path_rec_equal(
#if defined( _DEBUG_ )
- if ( p_path_rec_1->resv0 != p_path_rec_2->resv0 )
- {
- SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,
- ("resv0 does not match.\n") );
- }
-
if ( p_path_rec_1->resv1 != p_path_rec_2->resv1 )
{
SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,
More information about the ofw
mailing list