]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
winverbs branch: updated to support OFED ib-diags
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 22 Feb 2009 06:14:57 +0000 (06:14 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 22 Feb 2009 06:14:57 +0000 (06:14 +0000)
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@1980 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

57 files changed:
branches/winverbs/core/al/al_cm_qp.c
branches/winverbs/core/al/al_dm.c
branches/winverbs/core/al/kernel/al_cm_cep.c
branches/winverbs/core/al/kernel/al_ioc_pnp.c
branches/winverbs/core/al/user/al_exports.src
branches/winverbs/core/complib/user/complib.src
branches/winverbs/inc/complib/cl_nodenamemap.h
branches/winverbs/inc/iba/ib_types.h
branches/winverbs/tools/infiniband-diags/include/windows/config.h
branches/winverbs/tools/infiniband-diags/include/windows/inttypes.h [deleted file]
branches/winverbs/tools/infiniband-diags/include/windows/netinet/in.h [deleted file]
branches/winverbs/tools/infiniband-diags/include/windows/unistd.h [deleted file]
branches/winverbs/tools/infiniband-diags/src/dirs
branches/winverbs/tools/infiniband-diags/src/grouping.c
branches/winverbs/tools/infiniband-diags/src/ibaddr/SOURCES
branches/winverbs/tools/infiniband-diags/src/ibdiag_windows.c
branches/winverbs/tools/infiniband-diags/src/ibnetdiscover.c
branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/ibnetdiscover.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibping/SOURCES
branches/winverbs/tools/infiniband-diags/src/ibportstate/SOURCES
branches/winverbs/tools/infiniband-diags/src/ibroute.c
branches/winverbs/tools/infiniband-diags/src/ibroute/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibroute/ibroute.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibroute/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibsendtrap.c
branches/winverbs/tools/infiniband-diags/src/ibsendtrap/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibsendtrap/ibsendtrap.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibsendtrap/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibstat/SOURCES
branches/winverbs/tools/infiniband-diags/src/ibsysstat.c
branches/winverbs/tools/infiniband-diags/src/ibsysstat/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibsysstat/ibsysstat.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibsysstat/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibtracert.c
branches/winverbs/tools/infiniband-diags/src/ibtracert/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibtracert/ibtracert.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/ibtracert/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test.c
branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/SOURCES [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/makefile [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/mcm_rereg_test.rc [new file with mode: 0644]
branches/winverbs/tools/infiniband-diags/src/perfquery/SOURCES
branches/winverbs/tools/infiniband-diags/src/saquery.c
branches/winverbs/tools/infiniband-diags/src/sminfo/SOURCES
branches/winverbs/tools/infiniband-diags/src/smpdump/SOURCES
branches/winverbs/tools/infiniband-diags/src/smpquery/SOURCES
branches/winverbs/tools/infiniband-diags/src/vendstat/SOURCES
branches/winverbs/tools/wsdinstall/user/SOURCES
branches/winverbs/ulp/ipoib/kernel/ipoib_port.c
branches/winverbs/ulp/libibmad/include/infiniband/mad.h
branches/winverbs/ulp/libibmad/include/infiniband/mad_osd.h
branches/winverbs/ulp/libibmad/src/fields.c
branches/winverbs/ulp/opensm/user/include/iba/ib_types.h
branches/winverbs/ulp/qlgcvnic/kernel/vnic_adapter.c
branches/winverbs/ulp/srp/kernel/srp_hba.c

index ae75442922bb6d3e7d7d70227fcb3782d19ab247..dc1aeadedcec0d2b7d2ba0d446ada1690a5f734c 100644 (file)
@@ -162,7 +162,7 @@ __format_req_path_rec(
                p_path->local_lid,\r
                p_path->remote_lid,\r
                1, p_req->pkey,\r
-               conn_req_path_get_svc_lvl( p_path ),\r
+               conn_req_path_get_svc_lvl( p_path ), 0,\r
                IB_PATH_SELECTOR_EXACTLY, conn_req_get_mtu( p_req ),\r
                IB_PATH_SELECTOR_EXACTLY,\r
                conn_req_path_get_pkt_rate( p_path ),\r
@@ -170,7 +170,6 @@ __format_req_path_rec(
                (uint8_t)( conn_req_path_get_lcl_ack_timeout( p_path ) - 1 ),\r
                0 );\r
 \r
-       p_path_rec->hop_flow_raw.val = 0;\r
        /* Add global routing info as necessary. */\r
        if( !conn_req_path_get_subn_lcl( p_path ) )\r
        {\r
@@ -645,7 +644,7 @@ __proc_lap(
                p_lap->alternate_path.local_lid,\r
                p_lap->alternate_path.remote_lid,\r
                1, IB_DEFAULT_PKEY,\r
-               conn_lap_path_get_svc_lvl( &p_lap->alternate_path ),\r
+               conn_lap_path_get_svc_lvl( &p_lap->alternate_path ), 0,\r
                IB_PATH_SELECTOR_EXACTLY,\r
                IB_MTU_LEN_2048,\r
                IB_PATH_SELECTOR_EXACTLY,\r
@@ -654,7 +653,6 @@ __proc_lap(
                (uint8_t)( conn_lap_path_get_lcl_ack_timeout( p_path ) - 1 ),\r
                0 );\r
 \r
-       lap_rec.alt_path.hop_flow_raw.val = 0;\r
        /* Add global routing info as necessary. */\r
        if( !conn_lap_path_get_subn_lcl( &p_lap->alternate_path ) )\r
        {\r
index 69304109d8d8613049b9fc24458ef0aa590ce581..29815a5d13358bd55ebc647edcadcc778d31eb3f 100644 (file)
@@ -1583,7 +1583,7 @@ get_class_port_info(
 \r
        p_class_port_info->base_ver      = 1;\r
        p_class_port_info->class_ver = 1;\r
-       p_class_port_info->resp_time_val = CL_HTON32( DM_CLASS_RESP_TIME_VALUE );\r
+       p_class_port_info->cap_mask2_resp_time = CL_HTON32( DM_CLASS_RESP_TIME_VALUE );\r
 }\r
 \r
 \r
index 1253fa8114df6283ac8dc693e0bfe8bdec8a21ba..b9c1bbff752a6d334a267d79c0e6f14a679dec90 100644 (file)
@@ -6037,7 +6037,7 @@ static void
 __format_path(ib_path_rec_t *p_path, req_path_info_t *p_info,\r
                          ib_net16_t pkey, uint8_t mtu)\r
 {\r
-       p_path->resv0 = 0;\r
+       p_path->service_id = 0;\r
        p_path->dgid = p_info->local_gid;\r
        p_path->sgid = p_info->remote_gid;\r
        p_path->dlid = p_info->local_lid;\r
@@ -6047,7 +6047,8 @@ __format_path(ib_path_rec_t *p_path, req_path_info_t *p_info,
        p_path->tclass = p_info->traffic_class;\r
        p_path->num_path = 0;\r
        p_path->pkey = pkey;\r
-       p_path->sl = conn_req_path_get_svc_lvl(p_info);\r
+       ib_path_rec_set_sl(p_path, conn_req_path_get_svc_lvl(p_info));\r
+       ib_path_rec_set_qos_class(p_path, 0);\r
        p_path->mtu = mtu;\r
        p_path->rate = conn_req_path_get_pkt_rate(p_info);\r
        p_path->pkt_life = conn_req_path_get_lcl_ack_timeout(p_info);\r
index fe36c57b4dd0d2b58ef6d40343454c3fedf650e7..612523498282bf986dd3012494682974d5d253ee 100644 (file)
@@ -979,7 +979,6 @@ __get_path(
         * Clear reserved fields in case they were set to prevent undue path\r
         * thrashing.\r
         */\r
-       p_path->rec.resv0 = 0;\r
        p_path->rec.resv1 = 0;\r
        p_path->rec.resv2 = 0;\r
 \r
index 87d428bd0fd0c6a28ebbcb24bd6f097690ba586a..02d806585f144589fa6593221fe13ad3776743c9 100644 (file)
@@ -77,18 +77,6 @@ ib_gid_is_multicast
 ib_gid_set_default\r
 ib_grh_get_ver_class_flow\r
 ib_grh_set_ver_class_flow\r
-ib_inform_get_dev_id\r
-ib_inform_get_prod_type\r
-ib_inform_get_qpn\r
-ib_inform_get_resp_time_val\r
-ib_inform_get_trap_num\r
-ib_inform_get_vend_id\r
-ib_inform_set_dev_id\r
-ib_inform_set_prod_type\r
-ib_inform_set_qpn\r
-ib_inform_set_resp_time_val\r
-ib_inform_set_trap_num\r
-ib_inform_set_vend_id\r
 ib_init_dgrm_svc\r
 ib_ioc_profile_get_subsys_vend_id\r
 ib_ioc_profile_get_vend_id\r
@@ -117,22 +105,6 @@ ib_modify_cq
 ib_modify_qp\r
 ib_node_info_get_local_port_num\r
 ib_node_info_get_vendor_id\r
-ib_notice_get_count\r
-ib_notice_get_dev_id\r
-ib_notice_get_generic\r
-ib_notice_get_prod_type\r
-ib_notice_get_toggle\r
-ib_notice_get_trap_num\r
-ib_notice_get_type\r
-ib_notice_get_vend_id\r
-ib_notice_set_count\r
-ib_notice_set_dev_id\r
-ib_notice_set_generic\r
-ib_notice_set_prod_type\r
-ib_notice_set_toggle\r
-ib_notice_set_trap_num\r
-ib_notice_set_type\r
-ib_notice_set_vend_id\r
 ib_open_al\r
 ib_open_ca\r
 ib_path_get_ipd\r
index cc3c02b3b0abef534347c657e8aca2ac96d3fe8a..58416100985af47d0951bf436b4b1415c056ba13 100644 (file)
@@ -290,6 +290,7 @@ cl_waitobj_destroy
 cl_waitobj_signal\r
 cl_waitobj_reset\r
 cl_waitobj_wait_on\r
+clean_nodedesc\r
 open_node_name_map\r
 close_node_name_map\r
 remap_node_name\r
index 4f44bf0bfc6631c89f2558bcb714e8afb32041c7..e836cf501fcfa11f14880c62568d692b38be0518 100644 (file)
@@ -44,7 +44,7 @@ extern "C"
 #include <complib/cl_qmap.h>\r
 \r
 /* NOTE: this may modify the parameter "nodedesc". */\r
-char *clean_nodedesc(char *nodedesc);\r
+CL_EXPORT char *clean_nodedesc(char *nodedesc);\r
 \r
 typedef struct _name_map_item {\r
        cl_map_item_t item;\r
index c62da2824a85984b18fa2277013f68d8a1549295..e1efacbcab4f760f364fd6c94739685b21fdb5ef 100644 (file)
@@ -1681,6 +1681,28 @@ ib_class_is_rmpp(
 #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
@@ -2322,16 +2344,16 @@ typedef union _ib_field32_t
 #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
@@ -2400,6 +2422,8 @@ typedef __declspec(align(8)) struct _ib_path_rec
 *********/\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
@@ -2411,7 +2435,9 @@ typedef __declspec(align(8)) struct _ib_path_rec
 #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_QOS_CLASS         (CL_HTON64(((uint64_t)1)<<14))\r
 #define  IB_PR_COMPMASK_RESV1             (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
@@ -2608,7 +2634,7 @@ typedef __declspec(align(8)) struct _ib_path_rec
 #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
@@ -2671,6 +2697,7 @@ ib_path_rec_init_local(
        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
@@ -2685,8 +2712,8 @@ ib_path_rec_init_local(
        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
@@ -2696,10 +2723,10 @@ ib_path_rec_init_local(
        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
@@ -2791,6 +2818,23 @@ ib_path_rec_num_path(
 *      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
@@ -2804,7 +2848,7 @@ AL_INLINE uint8_t AL_API
 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
@@ -2820,6 +2864,68 @@ ib_path_rec_sl(
 *      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
@@ -3035,7 +3141,7 @@ AL_INLINE net32_t AL_API
 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
@@ -3064,7 +3170,7 @@ AL_INLINE uint8_t AL_API
 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
@@ -3096,11 +3202,10 @@ ib_path_rec_set_hop_flow_raw(
        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
@@ -3185,7 +3290,7 @@ typedef struct _ib_class_port_info
        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
@@ -3259,6 +3364,135 @@ typedef struct _ib_class_port_info
 *\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
@@ -6344,7 +6578,7 @@ IN        const   uint8_t                 sl_index )
 #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
@@ -6363,7 +6597,7 @@ AL_INLINE uint8_t AL_API
 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
@@ -6391,7 +6625,7 @@ ib_vl_arb_element_set_vl(
        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
@@ -6981,945 +7215,315 @@ ib_member_set_join_state(
 #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
index 48d7908650963e51ac0b5aae985818ba0fc79d48..cd70278d1bb3a716bcc4ae6e6ad71d5b28d5c304 100644 (file)
@@ -40,6 +40,4 @@
 #define strdupa _strdup\r
 #define strncasecmp _strnicmp\r
 \r
-void __cdecl report(int sig);
-\r
 #endif /* _CONFIG_H_ */\r
diff --git a/branches/winverbs/tools/infiniband-diags/include/windows/inttypes.h b/branches/winverbs/tools/infiniband-diags/include/windows/inttypes.h
deleted file mode 100644 (file)
index 1977666..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2009 Intel Corp, Inc.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _INTTYPES_H_
-#define _INTTYPES_H_
-
-#endif /* _INTTYPES_H_ */
diff --git a/branches/winverbs/tools/infiniband-diags/include/windows/netinet/in.h b/branches/winverbs/tools/infiniband-diags/include/windows/netinet/in.h
deleted file mode 100644 (file)
index 4c84a6b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2009 Intel Corp, Inc.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _IN_H_
-#define _IN_H_
-
-#endif /* _IN_H_ */
diff --git a/branches/winverbs/tools/infiniband-diags/include/windows/unistd.h b/branches/winverbs/tools/infiniband-diags/include/windows/unistd.h
deleted file mode 100644 (file)
index 2e187b5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2009 Intel Corp, Inc.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#ifndef _UNISTD_H_
-#define _UNISTD_H_
-
-#define sleep(s) Sleep(s * 1000)
-
-static int getdomainname(char *name, size_t len)
-{
-       return -1;
-}
-
-#endif /* _UNISTD_H_ */
index ae27c3ffbdb92af118e35777602873c89b33d0ae..b361fe59b80cbd8e4a13f1f14e814886fe08943d 100644 (file)
@@ -1,9 +1,16 @@
 DIRS = \\r
        ibaddr          \\r
+       ibnetdiscover   \\r
        ibping          \\r
        ibportstate     \\r
+       ibroute         \\r
+       ibsendtrap      \\r
        ibstat          \\r
+       ibsysstat       \\r
+       ibtracert       \\r
+       mcm_rereg_test  \\r
        perfquery       \\r
+       saquery         \\r
        sminfo          \\r
        smpdump         \\r
        smpquery        \\r
index 0ea139fd710be8ba4de79f6d6a08dc7619e18d4e..0266af4387e00888226ec577996a91aa4b2cc32d 100644 (file)
@@ -265,20 +265,20 @@ int is_chassis_switch(Node *node)
 }
 
 /* these structs help find Line (Anafa) slot number while using spine portnum */
-int line_slot_2_sfb4[25]        = { 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4 };
-int anafa_line_slot_2_sfb4[25]  = { 0, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2 };
-int line_slot_2_sfb12[25]       = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10, 10, 11, 11, 12, 12 };
-int anafa_line_slot_2_sfb12[25] = { 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 };
+char line_slot_2_sfb4[25]        = { 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4 };
+char anafa_line_slot_2_sfb4[25]  = { 0, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2 };
+char line_slot_2_sfb12[25]       = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,10, 10, 11, 11, 12, 12 };
+char anafa_line_slot_2_sfb12[25] = { 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 };
 
 /* IPR FCR modules connectivity while using sFB4 port as reference */
-int ipr_slot_2_sfb4_port[25]    = { 0, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1 };
+char ipr_slot_2_sfb4_port[25]    = { 0, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1 };
 
 /* these structs help find Spine (Anafa) slot number while using spine portnum */
-int spine12_slot_2_slb[25]      = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-int anafa_spine12_slot_2_slb[25]= { 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-int spine4_slot_2_slb[25]       = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-int anafa_spine4_slot_2_slb[25] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-/*     reference                     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }; */
+char spine12_slot_2_slb[25]      = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+char anafa_spine12_slot_2_slb[25]= { 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+char spine4_slot_2_slb[25]       = { 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+char anafa_spine4_slot_2_slb[25] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+/* reference                       { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 }; */
 
 static void get_sfb_slot(Node *node, Port *lineport)
 {
@@ -309,7 +309,7 @@ static void get_sfb_slot(Node *node, Port *lineport)
 static void get_router_slot(Node *node, Port *spineport)
 {
        ChassisRecord *ch = node->chrecord;
-       int guessnum = 0;
+       uint64_t guessnum = 0;
 
        if (!ch) {
                if (!(node->chrecord = calloc(1, sizeof(ChassisRecord))))
@@ -460,7 +460,7 @@ static void insert_line_router(Node *node, ChassisList *chassislist)
                return;         /* already filled slot */
 
        chassislist->linenode[i] = node;
-       node->chrecord->chassisnum = chassislist->chassisnum;
+       node->chrecord->chassisnum = (unsigned char) chassislist->chassisnum;
 }
 
 static void insert_spine(Node *node, ChassisList *chassislist)
@@ -471,7 +471,7 @@ static void insert_spine(Node *node, ChassisList *chassislist)
                return;         /* already filled slot */
 
        chassislist->spinenode[i] = node;
-       node->chrecord->chassisnum = chassislist->chassisnum;
+       node->chrecord->chassisnum = (unsigned char) chassislist->chassisnum;
 }
 
 static void pass_on_lines_catch_spines(ChassisList *chassislist)
@@ -770,7 +770,7 @@ ChassisList *group_nodes()
                                        if (!node->chrecord) {
                                                if (!(node->chrecord = calloc(1, sizeof(ChassisRecord))))
                                                        IBPANIC("out of mem");
-                                               node->chrecord->chassisnum = chassis->chassisnum;
+                                               node->chrecord->chassisnum = (unsigned char) chassis->chassisnum;
                                        }
                                }
                        }
index 9ae2509e13454f0b2b29ba7765ad5d428f370e74..1d72abca85998111d2172287f522d38f540d453c 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\ibaddr.c ..\ibdiag_common.c ..\ibdiag_windows.c ibaddr.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index bdcbebcc484d7b33e9bee8b8d184886a5ea58009..419dde9256f698a698e3a1eb58fa9425466d0d7a 100644 (file)
@@ -32,3 +32,9 @@
  */\r
 \r
 #include "..\..\..\..\etc\user\getopt.c"\r
+\r
+#if USE_INET\r
+#if WINVER < 0x600\r
+#include "..\..\..\..\etc\user\inet.c"\r
+#endif\r
+#endif
\ No newline at end of file
index 466d522de78611da8533738cabb4829d3bf6a041..27afd6a41a3380d063d7d2b7eea1baef3c737450 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <complib/cl_nodenamemap.h>
 
 #include "ibnetdiscover.h"
 #include "grouping.h"
@@ -212,7 +212,7 @@ extend_dpath(ib_dr_path_t *path, int nextport)
        ++path->cnt;
        if (path->cnt > maxhops_discovered)
                maxhops_discovered = path->cnt;
-       path->p[path->cnt] = nextport;
+       path->p[path->cnt] = (uint8_t) nextport;
        return path->cnt;
 }
 
@@ -517,7 +517,7 @@ out_chassis(int chassisnum)
        uint64_t guid;
 
        fprintf(f, "\nChassis %d", chassisnum);
-       guid = get_chassis_guid(chassisnum);
+       guid = get_chassis_guid((unsigned char) chassisnum);
        if (guid)
                fprintf(f, " (guid 0x%" PRIx64 ")", guid);
        fprintf(f, "\n");
@@ -964,7 +964,7 @@ int main(int argc, char **argv)
                { "Router_list", 'R', 0, NULL, "list of connected routers" },
                { "node-name-map", 1, 1, "<file>", "node name map file" },
                { "ports", 'p', 0, NULL, "obtain a ports report" },
-               { }
+               { }
        };
        char usage_args[] = "[topology-file]";
 
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/SOURCES b/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/SOURCES
new file mode 100644 (file)
index 0000000..300925b
--- /dev/null
@@ -0,0 +1,33 @@
+TARGETNAME = ibnetdiscover\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\ibnetdiscover.c ..\grouping.c ..\ibdiag_common.c ..\ibdiag_windows.c\\r
+                 ibnetdiscover.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\complib.lib             \\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\complibd.lib    \\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/ibnetdiscover.rc b/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/ibnetdiscover.rc
new file mode 100644 (file)
index 0000000..8f3509a
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand Network Topology Discovery (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand Network Topology Discovery"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibnetdiscover.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibnetdiscover.exe"\r
+\r
+#include <common.ver>\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/makefile b/branches/winverbs/tools/infiniband-diags/src/ibnetdiscover/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
index 8f77ba88dd964e74e1f3c0b999bc4be232ef30b4..2b187a8b46bcebd47e3a65e6c889e67650d0a5ec 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\ibping.c ..\ibdiag_common.c ..\ibdiag_windows.c ibping.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index 42067e014499b1481de2279c64de36f841bbd0d6..da92223ed1a3e540abee99554937339c18a2818c 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\ibportstate.c ..\ibdiag_common.c ..\ibdiag_windows.c ibportstate.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index 144d1b211c1774de7ff11a63432623049e8fa2e2..d1049addc4b57a3f68efc24b505eb58f32cc347b 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <complib/cl_nodenamemap.h>
 
 #include "ibdiag_common.h"
 
@@ -327,7 +327,7 @@ dump_unicast_tables(ib_portid_t *portid, int startlid, int endlid)
 
                for (;i < e; i++) {
                        unsigned outport = lft[i % IB_SMP_DATA_SIZE];
-                       unsigned valid = (outport <= nports);
+                       unsigned valid = (outport <= (unsigned) nports);
 
                        if (!valid && !dump_all)
                                continue;
@@ -370,7 +370,7 @@ int main(int argc, char **argv)
                { "all", 'a', 0, NULL, "show all lids, even invalid entries" },
                { "no_dests", 'n', 0, NULL, "do not try to resolve destinations" },
                { "Multicast", 'M', 0, NULL, "show multicast forwarding tables" },
-               { }
+               { }
        };
        char usage_args[] = "[<dest dr_path|lid|guid> [<startlid> [<endlid>]]]";
        const char *usage_examples[] = {
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibroute/SOURCES b/branches/winverbs/tools/infiniband-diags/src/ibroute/SOURCES
new file mode 100644 (file)
index 0000000..9c01dfc
--- /dev/null
@@ -0,0 +1,33 @@
+TARGETNAME = ibroute\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\ibroute.c ..\ibdiag_common.c ..\ibdiag_windows.c ibroute.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+       $(SDK_LIB_PATH)\ws2_32.lib              \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\complib.lib             \\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\complibd.lib    \\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibroute/ibroute.rc b/branches/winverbs/tools/infiniband-diags/src/ibroute/ibroute.rc
new file mode 100644 (file)
index 0000000..8fa48bb
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "Query InfiniBand Switch Forwarding Tables (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "Query InfiniBand Switch Forwarding Tables"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibroute.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibroute.exe"\r
+\r
+#include <common.ver>\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibroute/makefile b/branches/winverbs/tools/infiniband-diags/src/ibroute/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
index ba6aa8b7fb8d6e70a355b031e44b5dd889289f5a..92b72f1edf10f10ac32f301bba69b0c3e4851c08 100644 (file)
@@ -43,7 +43,7 @@
 #include <getopt.h>
 
 #include <infiniband/mad.h>
-#include <infiniband/iba/ib_types.h>
+#include <iba/ib_types.h>
 
 #include "ibdiag_common.h"
 
@@ -73,8 +73,8 @@ static int send_144_node_desc_update(void)
        notice.generic_type = 0x80 | IB_NOTICE_TYPE_INFO;
        notice.g_or_v.generic.prod_type_lsb = cl_hton16(IB_NODE_TYPE_CA);
        notice.g_or_v.generic.trap_num = cl_hton16(144);
-       notice.issuer_lid = cl_hton16(selfportid.lid);
-       notice.data_details.ntc_144.lid = cl_hton16(selfportid.lid);
+       notice.issuer_lid = cl_hton16((uint16_t) selfportid.lid);
+       notice.data_details.ntc_144.lid = cl_hton16((uint16_t) selfportid.lid);
        notice.data_details.ntc_144.local_changes =
            TRAP_144_MASK_OTHER_LOCAL_CHANGES;
        notice.data_details.ntc_144.change_flgs =
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/SOURCES b/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/SOURCES
new file mode 100644 (file)
index 0000000..f50020d
--- /dev/null
@@ -0,0 +1,30 @@
+TARGETNAME = ibsendtrap\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\ibsendtrap.c ..\ibdiag_common.c ..\ibdiag_windows.c ibsendtrap.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/ibsendtrap.rc b/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/ibsendtrap.rc
new file mode 100644 (file)
index 0000000..19e3e8f
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "Send InfiniBand Traps (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "Send InfiniBand Traps"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibsendtrap.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibsendtrap.exe"\r
+\r
+#include <common.ver>\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/makefile b/branches/winverbs/tools/infiniband-diags/src/ibsendtrap/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
index c41f91e172c334a53cc448ee676a4ec97cbb12eb..161fdd044492ae526b45f01145f1f31dbd02ec74 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\ibstat.c ..\ibdiag_common.c ..\ibdiag_windows.c ibstat.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index cc1418d50c97f68bd3dffd8f2b3947d439f7c71d..b9f2f850f4220b1332b6190fd0665f025bc9bdac 100644 (file)
@@ -183,7 +183,7 @@ static char *ibsystat_serv(void)
 
                DEBUG("got packet: attr 0x%x mod 0x%x", attr, mod);
 
-               size = mk_reply(attr, mad + IB_VENDOR_RANGE2_DATA_OFFS,
+               size = mk_reply(attr, (char *) mad + IB_VENDOR_RANGE2_DATA_OFFS,
                                sizeof(buf) - umad_size() - IB_VENDOR_RANGE2_DATA_OFFS);
 
                if (server_respond(umad, IB_VENDOR_RANGE2_DATA_OFFS + size) < 0)
@@ -210,7 +210,7 @@ static char *ibsystat(ib_portid_t *portid, int attr)
 {
        ib_rpc_t rpc = { 0 };
        int fd, agent, timeout, len;
-       void *data = umad_get_mad(buf) + IB_VENDOR_RANGE2_DATA_OFFS;
+       void *data = (char *) umad_get_mad(buf) + IB_VENDOR_RANGE2_DATA_OFFS;
 
        DEBUG("Sysstat ping..");
 
@@ -318,7 +318,7 @@ int main(int argc, char **argv)
        const struct ibdiag_opt opts[] = {
                { "oui", 'o', 1, NULL, "use specified OUI number" },
                { "Server", 'S', 0, NULL, "start in server mode" },
-               { }
+               { }
        };
        char usage_args[] = "<dest lid|guid> [<op>]";
 
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsysstat/SOURCES b/branches/winverbs/tools/infiniband-diags/src/ibsysstat/SOURCES
new file mode 100644 (file)
index 0000000..4fb5464
--- /dev/null
@@ -0,0 +1,31 @@
+TARGETNAME = ibsysstat\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\ibsysstat.c ..\ibdiag_common.c ..\ibdiag_windows.c ibsysstat.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+       $(SDK_LIB_PATH)\ws2_32.lib              \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsysstat/ibsysstat.rc b/branches/winverbs/tools/infiniband-diags/src/ibsysstat/ibsysstat.rc
new file mode 100644 (file)
index 0000000..b1afa84
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand SM Information (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand SM Information"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "sminfo.exe"\r
+#define VER_ORIGINALFILENAME_STR       "sminfo.exe"\r
+\r
+#include <common.ver>\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibsysstat/makefile b/branches/winverbs/tools/infiniband-diags/src/ibsysstat/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
index ea5662bf9bf398f4763d6825523cebaa9ff4edb4..db3b9064bb7dc37180ae20cd4bb255199f886e3c 100644 (file)
@@ -46,7 +46,7 @@
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <complib/cl_nodenamemap.h>
 
 #include "ibdiag_common.h"
 
@@ -180,7 +180,7 @@ extend_dpath(ib_dr_path_t *path, int nextport)
        if (path->cnt+2 >= sizeof(path->p))
                return -1;
        ++path->cnt;
-       path->p[path->cnt] = nextport;
+       path->p[path->cnt] = (uint8_t) nextport;
        return path->cnt;
 }
 
@@ -718,7 +718,7 @@ int main(int argc, char **argv)
                { "no_info", 'n', 0, NULL, "simple format" },
                { "mlid", 'm', 1, "<mlid>", "multicast trace of the mlid" },
                { "node-name-map", 1, 1, "<file>", "node name map file" },
-               { }
+               { }
        };
        char usage_args[] = "<src-addr> <dest-addr>";
        const char *usage_examples[] = {
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibtracert/SOURCES b/branches/winverbs/tools/infiniband-diags/src/ibtracert/SOURCES
new file mode 100644 (file)
index 0000000..3f5b806
--- /dev/null
@@ -0,0 +1,33 @@
+TARGETNAME = ibtracert\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\ibtracert.c ..\ibdiag_common.c ..\ibdiag_windows.c ibtracert.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+       $(SDK_LIB_PATH)\ws2_32.lib              \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\complib.lib             \\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\complibd.lib    \\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibtracert/ibtracert.rc b/branches/winverbs/tools/infiniband-diags/src/ibtracert/ibtracert.rc
new file mode 100644 (file)
index 0000000..bca5581
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "Trace InfiniBand Path (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "Trace InfiniBand Path"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibtracert.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibtracert.exe"\r
+\r
+#include <common.ver>\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/ibtracert/makefile b/branches/winverbs/tools/infiniband-diags/src/ibtracert/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
index 9285b95aabb30ed3102684aea59bd0f6bdbd5b35..525245990228fde3cf6c74915d50059cc286e0c8 100644 (file)
  *
  */
 
+#if HAVE_CONFIG_H
+#  include <config.h>
+#endif /* HAVE_CONFIG_H */
+
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
 
-#define info(fmt, arg...) fprintf(stderr, "INFO: " fmt, ##arg )
-#define err(fmt, arg...) fprintf(stderr, "ERR: " fmt, ##arg )
+#define info(fmt, ...) fprintf(stderr, "INFO: " fmt, ## __VA_ARGS__ )
+#define err(fmt, ...) fprintf(stderr, "ERR: " fmt, ## __VA_ARGS__ )
 #ifdef NOISY_DEBUG
-#define dbg(fmt, arg...) fprintf(stderr, "DBG: " fmt, ##arg )
+#define dbg(fmt, ...) fprintf(stderr, "DBG: " fmt, ## __VA_ARGS__ )
 #else
-#define dbg(fmt, arg...)
+#define dbg(fmt, ...)
 #endif
 
 #define TMO 100
@@ -161,7 +165,8 @@ static int rereg_send_all(int port, int agent, ib_portid_t *dport,
 {
        uint8_t *umad;
        int len = umad_size() + 256;
-       int i, ret;
+       unsigned i;
+       int ret;
 
        info("rereg_send_all... cnt = %u\n", cnt);
 
@@ -247,7 +252,7 @@ static int rereg_recv_all(int port, int agent, ib_portid_t *dport,
        int len = umad_size() + 256;
        uint64_t trid;
        unsigned n, method, status;
-       int i;
+       unsigned i;
 
        info("rereg_recv_all...\n");
 
@@ -301,7 +306,8 @@ static int rereg_query_all(int port, int agent, ib_portid_t *dport,
        uint8_t *umad, *mad;
        int len = umad_size() + 256;
        unsigned method, status;
-       int i, ret;
+       unsigned i;
+       int ret;
 
        info("rereg_query_all...\n");
 
@@ -384,8 +390,8 @@ static int rereg_and_test_port(char *guid_file, int port, int agent, ib_portid_t
        char line[256];
        FILE *f;
        ibmad_gid_t port_gid;
-       uint64_t prefix = htonll(0xfe80000000000000llu);
-       uint64_t guid = htonll(0x0002c90200223825llu);
+       uint64_t prefix = htonll(0xfe80000000000000ull);
+       uint64_t guid = htonll(0x0002c90200223825ull);
        struct guid_trid *list;
        int i = 0;
 
diff --git a/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/SOURCES b/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/SOURCES
new file mode 100644 (file)
index 0000000..ac933ad
--- /dev/null
@@ -0,0 +1,30 @@
+TARGETNAME = mcm_rereg_test\r
+TARGETPATH = ..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)\r
+TARGETTYPE = PROGRAM\r
+\r
+UMTYPE = console\r
+UMENTRY = main\r
+\r
+USE_MSVCRT = 1\r
+\r
+SOURCES = ..\mcm_rereg_test.c ..\ibdiag_common.c ..\ibdiag_windows.c mcm_rereg_test.rc\r
+       \r
+INCLUDES = ..\..\include;..\..\include\windows;\\r
+                  ..\..\..\..\ulp\libibmad\include;\\r
+                  ..\..\..\..\ulp\libibumad\include;\\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
+\r
+C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
+\r
+TARGETLIBS = \\r
+       $(SDK_LIB_PATH)\kernel32.lib    \\r
+!if $(FREEBUILD)\r
+       $(TARGETPATH)\*\libibmad.lib    \\r
+       $(TARGETPATH)\*\libibumad.lib   \r
+!else\r
+       $(TARGETPATH)\*\libibmadd.lib   \\r
+       $(TARGETPATH)\*\libibumadd.lib  \r
+!endif\r
+\r
+MSC_WARNING_LEVEL = /W3 /WX /wd4007
\ No newline at end of file
diff --git a/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/makefile b/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/makefile
new file mode 100644 (file)
index 0000000..a0c0627
--- /dev/null
@@ -0,0 +1,7 @@
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the OpenIB Windows project.\r
+#\r
+\r
+!INCLUDE ..\..\..\..\inc\openib.def\r
diff --git a/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/mcm_rereg_test.rc b/branches/winverbs/tools/infiniband-diags/src/mcm_rereg_test/mcm_rereg_test.rc
new file mode 100644 (file)
index 0000000..b10df8f
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2009 Intel Corporation.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand Multicase Registration Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR        "InfiniBand Multicase Registration Test"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "mcm_rereg_test.exe"\r
+#define VER_ORIGINALFILENAME_STR       "mcm_rereg_test.exe"\r
+\r
+#include <common.ver>\r
index d1d67e4eb51b59c85ba9e37e7d9d143044509ab9..2467aeddd20d24b204ea44f9901ab4c6c23d7658 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\perfquery.c ..\ibdiag_common.c ..\ibdiag_windows.c perfquery.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index 9726d22f98faf8ddd92580ab01edce3d9e48c6f7..9d5f47589582d2926790191186551fc91fc27fce 100644 (file)
  *
  */
 
+#if HAVE_CONFIG_H
+#  include <config.h>
+#endif /* HAVE_CONFIG_H */
+
 #include <unistd.h>
 #include <stdio.h>
 #include <arpa/inet.h>
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
+#include <assert.h>
 
 #define _GNU_SOURCE
 #include <getopt.h>
 
 #include <infiniband/umad.h>
 #include <infiniband/mad.h>
-#include <infiniband/iba/ib_types.h>
-#include <infiniband/complib/cl_nodenamemap.h>
+#include <iba/ib_types.h>
+#include <complib/cl_nodenamemap.h>
 
 #include "ibdiag_common.h"
 
@@ -170,7 +175,7 @@ recv_mad:
        if (ibdebug > 1)
                xdump(stdout, "SA Response:\n", mad, len);
 
-       method = mad_get_field(mad, 0, IB_MAD_METHOD_F);
+       method = (uint8_t) mad_get_field(mad, 0, IB_MAD_METHOD_F);
        offset = mad_get_field(mad, 0, IB_SA_ATTROFFS_F);
        result.status = mad_get_field(mad, 0, IB_MAD_STATUS_F);
        result.p_result_madw = mad;
@@ -189,12 +194,12 @@ recv_mad:
 static void *get_query_rec(void *mad, unsigned i)
 {
        int offset = mad_get_field(mad, 0, IB_SA_ATTROFFS_F);
-       return mad + IB_SA_DATA_OFFS + i * (offset << 3);
+       return (char *) mad + IB_SA_DATA_OFFS + i * (offset << 3);
 }
 
 static unsigned valid_gid(ib_gid_t *gid)
 {
-       ib_gid_t zero_gid = { };
+       ib_gid_t zero_gid = { };
        return memcmp(&zero_gid, gid, sizeof(*gid));
 }
 
@@ -442,7 +447,7 @@ static void dump_multicast_member_record(void *data)
        char gid_str2[INET6_ADDRSTRLEN];
        ib_member_rec_t *p_mcmr = data;
        uint16_t mlid = cl_ntoh16(p_mcmr->mlid);
-       int i = 0;
+       unsigned i = 0;
        char *node_name = "<unknown>";
 
        /* go through the node records searching for a port guid which matches
@@ -758,7 +763,7 @@ static void dump_one_mft_record(void *data)
 
 static void dump_results(struct query_res *r, void (*dump_func) (void *))
 {
-       int i;
+       unsigned i;
        for (i = 0; i < r->result_cnt; i++) {
                void *data = get_query_rec(r->p_result_madw, i);
                dump_func(data);
@@ -768,7 +773,7 @@ static void dump_results(struct query_res *r, void (*dump_func) (void *))
 static void return_mad(void)
 {
        if (result.p_result_madw) {
-               free(result.p_result_madw - umad_size());
+               free((char *) result.p_result_madw - umad_size());
                result.p_result_madw = NULL;
        }
 }
@@ -839,7 +844,8 @@ get_lid_from_name(bind_handle_t h, const char *name, uint16_t* lid)
 {
        ib_node_record_t *node_record = NULL;
        ib_node_info_t *p_ni = NULL;
-       int i = 0, ret;
+       unsigned i;
+       int ret;
 
        ret = get_all_records(h, IB_SA_ATTR_NODERECORD, 0);
        if (ret)
@@ -869,7 +875,7 @@ static uint16_t get_lid(bind_handle_t h, const char *name)
        if (isalpha(name[0]))
                assert(get_lid_from_name(h, name, &rc_lid) == IB_SUCCESS);
        else
-               rc_lid = atoi(name);
+               rc_lid = (uint16_t) atoi(name);
        if (rc_lid == 0)
                fprintf(stderr, "Failed to find lid for \"%s\"\n", name);
        return rc_lid;
@@ -917,8 +923,8 @@ static int parse_lid_and_ports(bind_handle_t h,
 
 #define cl_hton8(x) (x)
 #define CHECK_AND_SET_VAL(val, size, comp_with, target, name, mask) \
-       if (val > comp_with) { \
-               target = cl_hton##size(val); \
+       if ((uint##size##_t) val > (uint##size##_t) comp_with) { \
+               target = cl_hton##size((uint##size##_t) val); \
                comp_mask |= IB_##name##_COMPMASK_##mask; \
        }
 
@@ -951,7 +957,8 @@ static int get_issm_records(bind_handle_t h, ib_net32_t capability_mask)
 
 static int print_node_records(bind_handle_t h)
 {
-       int i = 0, ret;
+       unsigned i;
+       int ret;
 
        ret = get_all_records(h, IB_SA_ATTR_NODERECORD, 0);
        if (ret)
@@ -1027,7 +1034,7 @@ static int query_path_records(const struct query_cmd *q, bind_handle_t h,
        CHECK_AND_SET_VAL(p->dlid, 16, 0, pr.dlid, PR, DLID);
        CHECK_AND_SET_VAL(p->hop_limit, 32, -1, pr.hop_flow_raw, PR, HOPLIMIT);
        CHECK_AND_SET_VAL(p->flow_label, 8, 0, flow, PR, FLOWLABEL);
-       pr.hop_flow_raw |= cl_hton32(flow << 8);
+       pr.hop_flow_raw |= (uint8_t) cl_hton32(flow << 8);
        CHECK_AND_SET_VAL(p->tclass, 8, 0, pr.tclass, PR, TCLASS);
        CHECK_AND_SET_VAL(p->reversible, 8, -1, reversible, PR, REVERSIBLE);
        CHECK_AND_SET_VAL(p->numb_path, 8, -1, pr.num_path, PR, NUMBPATH);
@@ -1089,7 +1096,7 @@ static int print_multicast_member_records(bind_handle_t h)
 
 return_mc:
        if (mc_group_result.p_result_madw)
-               free(mc_group_result.p_result_madw - umad_size());
+               free((char *) mc_group_result.p_result_madw - umad_size());
 
        return ret;
 }
@@ -1267,7 +1274,7 @@ static int query_pkey_tbl_records(const struct query_cmd *q,
        memset(&pktr, 0, sizeof(pktr));
        CHECK_AND_SET_VAL(lid, 16, 0, pktr.lid, PKEY, LID);
        CHECK_AND_SET_VAL(port, 8, -1, pktr.port_num, PKEY, PORT);
-       CHECK_AND_SET_VAL(block, 16, -1, pktr.port_num, PKEY, BLOCK);
+       CHECK_AND_SET_VAL(block, 16, -1, pktr.block_num, PKEY, BLOCK);
 
        return get_and_dump_any_records(h, IB_SA_ATTR_PKEYTABLERECORD, 0,
                                        comp_mask, &pktr, smkey,
@@ -1503,13 +1510,13 @@ static int process_opt(void *context, int ch, char *optarg)
                query_type = IB_SA_ATTR_LINKRECORD;
                break;
        case 5:
-               p->slid = strtoul(optarg, NULL, 0);
+               p->slid = (uint16_t) strtoul(optarg, NULL, 0);
                break;
        case 6:
-               p->dlid = strtoul(optarg, NULL, 0);
+               p->dlid = (uint16_t) strtoul(optarg, NULL, 0);
                break;
        case 7:
-               p->mlid = strtoul(optarg, NULL, 0);
+               p->mlid = (uint16_t) strtoul(optarg, NULL, 0);
                break;
        case 14:
                if (inet_pton(AF_INET6, optarg, &p->sgid) <= 0)
@@ -1534,7 +1541,7 @@ static int process_opt(void *context, int ch, char *optarg)
                p->numb_path = strtoul(optarg, NULL, 0);
                break;
        case 18:
-               p->pkey = strtoul(optarg, NULL, 0);
+               p->pkey = (uint16_t) strtoul(optarg, NULL, 0);
                break;
        case 'Q':
                p->qos_class = strtoul(optarg, NULL, 0);
@@ -1543,19 +1550,19 @@ static int process_opt(void *context, int ch, char *optarg)
                p->sl = strtoul(optarg, NULL, 0);
                break;
        case 'M':
-               p->mtu = strtoul(optarg, NULL, 0);
+               p->mtu = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 'R':
-               p->rate = strtoul(optarg, NULL, 0);
+               p->rate = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 20:
-               p->pkt_life = strtoul(optarg, NULL, 0);
+               p->pkt_life = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 'q':
                p->qkey = strtoul(optarg, NULL, 0);
                break;
        case 'T':
-               p->tclass = strtoul(optarg, NULL, 0);
+               p->tclass = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 'F':
                p->flow_label = strtoul(optarg, NULL, 0);
@@ -1564,10 +1571,10 @@ static int process_opt(void *context, int ch, char *optarg)
                p->hop_limit = strtoul(optarg, NULL, 0);
                break;
        case 21:
-               p->scope = strtoul(optarg, NULL, 0);
+               p->scope = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 'J':
-               p->join_state = strtoul(optarg, NULL, 0);
+               p->join_state = (uint8_t) strtoul(optarg, NULL, 0);
                break;
        case 'X':
                p->proxy_join = strtoul(optarg, NULL, 0);
@@ -1582,14 +1589,7 @@ int main(int argc, char **argv)
 {
        char usage_args[1024];
        bind_handle_t h;
-       struct query_params params = {
-               .hop_limit = -1,
-               .reversible = -1,
-               .numb_path = -1,
-               .qos_class = -1,
-               .sl = -1,
-               .proxy_join = -1,
-       };
+       struct query_params params;
        const struct query_cmd *q;
        ib_api_status_t status;
        int n;
@@ -1643,9 +1643,17 @@ int main(int argc, char **argv)
                { "scope", 21, 1, NULL, "Scope (MCMemberRecord)" },
                { "join_state", 'J', 1, NULL, "Join state (MCMemberRecord)" },
                { "proxy_join", 'X', 1, NULL, "Proxy join (MCMemberRecord)" },
-               {}
+               { 0 }
        };
 
+       memset(&params, 0, sizeof params);
+       params.hop_limit = -1;
+       params.reversible = -1;
+       params.numb_path = -1;
+       params.qos_class = -1;
+       params.sl = -1;
+       params.proxy_join = -1;
+
        n = sprintf(usage_args, "[query-name] [<name> | <lid> | <guid>]\n"
                    "\nSupported query names (and aliases):\n");
        for (q = query_cmds; q->name; q++) {
@@ -1680,7 +1688,7 @@ int main(int argc, char **argv)
 
        if (argc) {
                if (node_print_desc == NAME_OF_LID) {
-                       requested_lid = strtoul(argv[0], NULL, 0);
+                       requested_lid = (uint16_t) strtoul(argv[0], NULL, 0);
                        requested_lid_flag++;
                } else if (node_print_desc == NAME_OF_GUID) {
                        requested_guid = strtoul(argv[0], NULL, 0);
index fb8b06d467cbd41ab37e0fb7a0eee01470a07e57..ffc43cf3bae4115b76e2fc6ba9d5a14c3375e531 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\sminfo.c ..\ibdiag_common.c ..\ibdiag_windows.c sminfo.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index 19768ce616b2c173c1c681a0bee19e86a9ba56e6..4afe2ac66ce56ce048e3f74010cb058b22e55fe7 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\smpdump.c ..\ibdiag_common.c ..\ibdiag_windows.c smpdump.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index ed8f8f997a277dc75195bcabdd28ab5d18e4d409..847652754e8e73ff57908a5bfe5c4b1627f2e8d1 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\smpquery.c ..\ibdiag_common.c ..\ibdiag_windows.c smpquery.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index aebf4201ab35a621389cf8c51a270cb16438d20a..fcda4188c7b45fa657f72a2bde63cdb6935743b0 100644 (file)
@@ -12,7 +12,8 @@ SOURCES = ..\vendstat.c ..\ibdiag_common.c ..\ibdiag_windows.c vendstat.rc
 INCLUDES = ..\..\include;..\..\include\windows;\\r
                   ..\..\..\..\ulp\libibmad\include;\\r
                   ..\..\..\..\ulp\libibumad\include;\\r
-                  ..\..\..\..\inc;..\..\..\..\inc\user;\r
+                  ..\..\..\..\inc;..\..\..\..\inc\user;\\r
+                  ..\..\..\..\inc\user\linux;\r
 \r
 C_DEFINES = $(C_DEFINES) /DHAVE_CONFIG_H\r
 \r
index eb4407e33c15b4df279dfad5ea72383e442ca873..5914a25d615bdc1b14b29f0ac09e85827d10964d 100644 (file)
@@ -5,7 +5,8 @@ UMTYPE=console
 USE_MSVCRT=1\r
 \r
 INCLUDES=..\..\..\inc;\\r
-       ..\..\..\inc\user;\r
+       ..\..\..\inc\user;\\r
+       $(PLATFORM_SDK_PATH)\include;\r
 \r
 SOURCES= \\r
        installsp.rc \\r
index 8f68c889ef93dfc50df6db74b52b58e592d57b72..1fd17ec7a6e6e47dc77b18bcc3c863ecc29fc224 100644 (file)
@@ -4800,7 +4800,7 @@ ipoib_mac_to_path(
                p_endpt = PARENT_STRUCT( p_item, ipoib_endpt_t, mac_item );\r
        }\r
 \r
-       p_path->resv0 = 0;\r
+       p_path->service_id = 0;\r
        p_path->dgid = p_endpt->dgid;\r
        p_path->sgid = p_port->p_local_endpt->dgid;\r
        p_path->dlid = p_endpt->dlid;\r
@@ -4826,7 +4826,7 @@ ipoib_mac_to_path(
                p_port->p_local_endpt->dlid,\r
                1,\r
                p_port->ib_mgr.bcast_rec.pkey,\r
-               sl,\r
+               sl, 0,\r
                IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.mtu,\r
                IB_PATH_SELECTOR_EXACTLY, p_port->ib_mgr.bcast_rec.rate,\r
                IB_PATH_SELECTOR_EXACTLY, pkt_life,\r
index 5586c3de523e3b3f987c4ab62fdeec67e1500f05..1aaaa1bb0a19a95a8a06089cfb8417f78e8b7c18 100644 (file)
@@ -127,12 +127,23 @@ enum SMI_ATTR_ID {
 enum SA_ATTR_ID {
        IB_SA_ATTR_NOTICE = 0x02,
        IB_SA_ATTR_INFORMINFO = 0x03,
+       IB_SA_ATTR_NODERECORD = 0x11,
        IB_SA_ATTR_PORTINFORECORD = 0x12,
+       IB_SA_ATTR_SL2VLTABLERECORD = 0x13,
+       IB_SA_ATTR_SWITCHINFORECORD = 0x14,
+       IB_SA_ATTR_LFTRECORD = 0x15,
+       IB_SA_ATTR_RFTRECORD = 0x16,
+       IB_SA_ATTR_MFTRECORD = 0x17,
+       IB_SA_ATTR_SMINFORECORD = 0x18,
        IB_SA_ATTR_LINKRECORD = 0x20,
+       IB_SA_ATTR_GUIDINFORECORD = 0x30,
        IB_SA_ATTR_SERVICERECORD = 0x31,
+       IB_SA_ATTR_PKEYTABLERECORD = 0x33,
        IB_SA_ATTR_PATHRECORD = 0x35,
+       IB_SA_ATTR_VLARBTABLERECORD = 0x36,
        IB_SA_ATTR_MCRECORD = 0x38,
        IB_SA_ATTR_MULTIPATH = 0x3a,
+       IB_SA_ATTR_INFORMINFORECORD = 0xf3,
 
        IB_SA_ATTR_LAST
 };
index 1308f889fb91f5a22aa6c405e8434f2675ebfe6b..dde6e3a65b828d70c1e9eb6664c9cbbc3f4975f4 100644 (file)
@@ -48,6 +48,8 @@ typedef unsigned __int64      uint64_t;
 \r
 #define MAD_EXPORT     __declspec(dllexport)\r
 \r
+#define __attribute__(X)\r
+\r
 #if !defined( __cplusplus )\r
 #define inline __inline\r
 #endif\r
index 08d0ccb611524ec35951d46580ecff78ce59bd2c..89581dc485278c98ba595e6ab0e01cfd1dd3c3e8 100644 (file)
@@ -95,7 +95,7 @@ static const ib_field_t ib_mad_f[] = {
        {BE_OFFS(272, 16), "DrSmpSLID", mad_dump_hex},
 
        /* word 10,11 (36-43 bytes) */
-       {0, 0},                 /* IB_SA_MKEY_F - reserved as invalid */
+       {288, 64, "SaSMkey", mad_dump_hex},
 
        /* word 12 (44-47 bytes) */
        {BE_OFFS(46 * 8, 16), "SaAttrOffs", mad_dump_uint},
index 92d018b1e85c37ec3713f89dca487a061fc9f712..288df2f90efc3bab1aebddb9e1cfd641eb4f49c9 100644 (file)
@@ -7023,8 +7023,10 @@ typedef struct _ib_mad_notice_attr    // Total Size calc  Accumulated
          struct _ntc_144 {\r
                 ib_net16_t    pad1;\r
                 ib_net16_t    lid;             // lid where capability mask changed\r
-                ib_net16_t    pad2;\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
@@ -7084,6 +7086,21 @@ typedef struct _ib_mad_notice_attr    // Total Size calc  Accumulated
 }      PACK_SUFFIX ib_mad_notice_attr_t;\r
 #include <complib/cl_packoff.h>\r
 \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
 /****f* IBA Base: Types/ib_notice_is_generic\r
 * NAME\r
 *      ib_notice_is_generic\r
index 4da5a3f4c5ba5337e037ac79efe3516e4d0d1702..fa6bd7c5a94d177c0b5620cdbbf77309478eb44c 100644 (file)
@@ -767,7 +767,7 @@ __path_records_match(
                return FALSE;\r
        if( p_path1->rate != p_path2->rate )\r
                return FALSE;\r
-       if( p_path1->sl != p_path2->sl )\r
+       if( ib_path_rec_sl(p_path1) != ib_path_rec_sl(p_path2) )\r
                return FALSE;\r
        if( p_path1->tclass != p_path2->tclass )\r
                return FALSE;\r
index 049b2eab2c0291a89d392d90504e0c6de2d86f29..03271b4ebffca92e64e4b145b33b92e7b439c35c 100644 (file)
@@ -461,7 +461,7 @@ __srp_path_rec_equal(
        if ( p_path_rec_1->slid != p_path_rec_2->slid )\r
                return ( FALSE );\r
 \r
-       if ( p_path_rec_1->hop_flow_raw.val != p_path_rec_2->hop_flow_raw.val )\r
+       if ( p_path_rec_1->hop_flow_raw != p_path_rec_2->hop_flow_raw )\r
        {\r
                SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
                        ("hop_flow_raw.val does not match.\n") );\r
@@ -492,7 +492,7 @@ __srp_path_rec_equal(
                return ( FALSE );\r
        }\r
 \r
-       if ( p_path_rec_1->sl != p_path_rec_2->sl )\r
+       if ( ib_path_rec_sl(p_path_rec_1) != ib_path_rec_sl(p_path_rec_2) )\r
        {\r
                SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
                        ("sl does not match.\n") );\r
@@ -532,12 +532,6 @@ __srp_path_rec_equal(
 \r
 #if defined( _DEBUG_ )\r
 \r
-       if ( p_path_rec_1->resv0 != p_path_rec_2->resv0 )\r
-       {\r
-               SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r
-                       ("resv0 does not match.\n") );\r
-       }\r
-\r
        if ( p_path_rec_1->resv1 != p_path_rec_2->resv1 )\r
        {\r
                SRP_PRINT( TRACE_LEVEL_INFORMATION, SRP_DBG_DEBUG,\r