[OpenSM] - Update according to linux gen2 trunk
authoreitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 8 Mar 2006 08:29:25 +0000 (08:29 +0000)
committereitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 8 Mar 2006 08:29:25 +0000 (08:29 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@232 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

144 files changed:
ulp/opensm/user/include/iba/ib_types.h
ulp/opensm/user/include/opensm/osm_base.h
ulp/opensm/user/include/opensm/osm_console.h [new file with mode: 0644]
ulp/opensm/user/include/opensm/osm_helper.h
ulp/opensm/user/include/opensm/osm_lin_fwd_tbl.h
ulp/opensm/user/include/opensm/osm_log.h
ulp/opensm/user/include/opensm/osm_madw.h
ulp/opensm/user/include/opensm/osm_msgdef.h
ulp/opensm/user/include/opensm/osm_opensm.h
ulp/opensm/user/include/opensm/osm_pkey.h
ulp/opensm/user/include/opensm/osm_pkey_mgr.h [new file with mode: 0644]
ulp/opensm/user/include/opensm/osm_port.h
ulp/opensm/user/include/opensm/osm_port_profile.h
ulp/opensm/user/include/opensm/osm_req.h
ulp/opensm/user/include/opensm/osm_sa.h
ulp/opensm/user/include/opensm/osm_sa_class_port_info_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_guidinfo_record.h [new file with mode: 0644]
ulp/opensm/user/include/opensm/osm_sa_guidinfo_record_ctrl.h [new file with mode: 0644]
ulp/opensm/user/include/opensm/osm_sa_link_record.h
ulp/opensm/user/include/opensm/osm_sa_link_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_mad_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_mcmember_record.h
ulp/opensm/user/include/opensm/osm_sa_mcmember_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_path_record.h
ulp/opensm/user/include/opensm/osm_sa_path_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_portinfo_record.h
ulp/opensm/user/include/opensm/osm_sa_portinfo_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_response.h
ulp/opensm/user/include/opensm/osm_sa_service_record.h
ulp/opensm/user/include/opensm/osm_sa_sminfo_record.h
ulp/opensm/user/include/opensm/osm_sa_sminfo_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sa_vlarb_record.h
ulp/opensm/user/include/opensm/osm_sa_vlarb_record_ctrl.h
ulp/opensm/user/include/opensm/osm_sm.h
ulp/opensm/user/include/opensm/osm_state_mgr.h
ulp/opensm/user/include/opensm/osm_subnet.h
ulp/opensm/user/include/opensm/osm_switch.h
ulp/opensm/user/include/opensm/osm_version.h [new file with mode: 0644]
ulp/opensm/user/include/opensm/st.h
ulp/opensm/user/libopensm/osm_helper.c
ulp/opensm/user/libopensm/osm_log.c
ulp/opensm/user/libopensm/osm_mad_pool.c
ulp/opensm/user/libvendor/osm_vendor_mlx_sa.c
ulp/opensm/user/opensm/SOURCES
ulp/opensm/user/opensm/cl_event_wheel.c
ulp/opensm/user/opensm/main.c
ulp/opensm/user/opensm/osm_console.c [new file with mode: 0644]
ulp/opensm/user/opensm/osm_db_files.c
ulp/opensm/user/opensm/osm_db_pack.c
ulp/opensm/user/opensm/osm_drop_mgr.c
ulp/opensm/user/opensm/osm_fwd_tbl.c
ulp/opensm/user/opensm/osm_inform.c
ulp/opensm/user/opensm/osm_lid_mgr.c
ulp/opensm/user/opensm/osm_lin_fwd_rcv.c
ulp/opensm/user/opensm/osm_lin_fwd_rcv_ctrl.c
ulp/opensm/user/opensm/osm_link_mgr.c
ulp/opensm/user/opensm/osm_matrix.c
ulp/opensm/user/opensm/osm_mcast_fwd_rcv.c
ulp/opensm/user/opensm/osm_mcast_fwd_rcv_ctrl.c
ulp/opensm/user/opensm/osm_mcast_mgr.c
ulp/opensm/user/opensm/osm_mtree.c
ulp/opensm/user/opensm/osm_multicast.c
ulp/opensm/user/opensm/osm_node_desc_rcv.c
ulp/opensm/user/opensm/osm_node_desc_rcv_ctrl.c
ulp/opensm/user/opensm/osm_node_info_rcv.c
ulp/opensm/user/opensm/osm_node_info_rcv_ctrl.c
ulp/opensm/user/opensm/osm_opensm.c
ulp/opensm/user/opensm/osm_pkey.c
ulp/opensm/user/opensm/osm_pkey_mgr.c [new file with mode: 0644]
ulp/opensm/user/opensm/osm_pkey_rcv.c
ulp/opensm/user/opensm/osm_pkey_rcv_ctrl.c
ulp/opensm/user/opensm/osm_port.c
ulp/opensm/user/opensm/osm_port_info_rcv.c
ulp/opensm/user/opensm/osm_port_info_rcv_ctrl.c
ulp/opensm/user/opensm/osm_req.c
ulp/opensm/user/opensm/osm_req_ctrl.c
ulp/opensm/user/opensm/osm_resp.c
ulp/opensm/user/opensm/osm_sa.c
ulp/opensm/user/opensm/osm_sa_class_port_info.c
ulp/opensm/user/opensm/osm_sa_class_port_info_ctrl.c
ulp/opensm/user/opensm/osm_sa_guidinfo_record.c [new file with mode: 0644]
ulp/opensm/user/opensm/osm_sa_guidinfo_record_ctrl.c [new file with mode: 0644]
ulp/opensm/user/opensm/osm_sa_informinfo.c
ulp/opensm/user/opensm/osm_sa_informinfo_ctrl.c
ulp/opensm/user/opensm/osm_sa_lft_record.c
ulp/opensm/user/opensm/osm_sa_lft_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_link_record.c
ulp/opensm/user/opensm/osm_sa_mad_ctrl.c
ulp/opensm/user/opensm/osm_sa_mcmember_record.c
ulp/opensm/user/opensm/osm_sa_mcmember_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_node_record.c
ulp/opensm/user/opensm/osm_sa_node_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_path_record.c
ulp/opensm/user/opensm/osm_sa_path_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_pkey_record.c
ulp/opensm/user/opensm/osm_sa_pkey_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_portinfo_record.c
ulp/opensm/user/opensm/osm_sa_portinfo_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_response.c
ulp/opensm/user/opensm/osm_sa_service_record.c
ulp/opensm/user/opensm/osm_sa_service_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_slvl_record.c
ulp/opensm/user/opensm/osm_sa_slvl_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_sminfo_record.c
ulp/opensm/user/opensm/osm_sa_sminfo_record_ctrl.c
ulp/opensm/user/opensm/osm_sa_vlarb_record.c
ulp/opensm/user/opensm/osm_sa_vlarb_record_ctrl.c
ulp/opensm/user/opensm/osm_service.c
ulp/opensm/user/opensm/osm_slvl_map_rcv.c
ulp/opensm/user/opensm/osm_slvl_map_rcv_ctrl.c
ulp/opensm/user/opensm/osm_sm.c
ulp/opensm/user/opensm/osm_sm_mad_ctrl.c
ulp/opensm/user/opensm/osm_sm_state_mgr.c
ulp/opensm/user/opensm/osm_sminfo_rcv.c
ulp/opensm/user/opensm/osm_sminfo_rcv_ctrl.c
ulp/opensm/user/opensm/osm_state_mgr.c
ulp/opensm/user/opensm/osm_state_mgr_ctrl.c
ulp/opensm/user/opensm/osm_subnet.c
ulp/opensm/user/opensm/osm_sw_info_rcv.c
ulp/opensm/user/opensm/osm_sw_info_rcv_ctrl.c
ulp/opensm/user/opensm/osm_sweep_fail_ctrl.c
ulp/opensm/user/opensm/osm_switch.c
ulp/opensm/user/opensm/osm_trap_rcv.c
ulp/opensm/user/opensm/osm_trap_rcv_ctrl.c
ulp/opensm/user/opensm/osm_ucast_mgr.c
ulp/opensm/user/opensm/osm_ucast_updn.c
ulp/opensm/user/opensm/osm_vl15intf.c
ulp/opensm/user/opensm/osm_vl_arb_rcv.c
ulp/opensm/user/opensm/osm_vl_arb_rcv_ctrl.c
ulp/opensm/user/opensm/st.c
ulp/opensm/user/osmtest/SOURCES
ulp/opensm/user/osmtest/include/error.h [moved from ulp/opensm/user/osmtest/error.h with 72% similarity]
ulp/opensm/user/osmtest/include/osmt_inform.h [moved from ulp/opensm/user/osmtest/osmt_inform.h with 78% similarity]
ulp/opensm/user/osmtest/include/osmt_mtl_regular_qp.h [moved from ulp/opensm/user/osmtest/osmt_mtl_regular_qp.h with 83% similarity]
ulp/opensm/user/osmtest/include/osmtest.h [moved from ulp/opensm/user/osmtest/osmtest.h with 95% similarity]
ulp/opensm/user/osmtest/include/osmtest_base.h [moved from ulp/opensm/user/osmtest/osmtest_base.h with 78% similarity]
ulp/opensm/user/osmtest/include/osmtest_subnet.h [moved from ulp/opensm/user/osmtest/osmtest_subnet.h with 92% similarity]
ulp/opensm/user/osmtest/main.c
ulp/opensm/user/osmtest/osmt_inform.c
ulp/opensm/user/osmtest/osmt_mtl_regular_qp.c
ulp/opensm/user/osmtest/osmt_multicast.c
ulp/opensm/user/osmtest/osmt_service.c
ulp/opensm/user/osmtest/osmt_slvl_vl_arb.c
ulp/opensm/user/osmtest/osmtest.c

index eb1e11d..e8c4be3 100644 (file)
@@ -394,7 +394,7 @@ BEGIN_C_DECLS
 *
 * SOURCE
 */
-#define IB_PKEY_BASE_MASK                                      (CL_NTOH16(0x7FFF))
+#define IB_PKEY_BASE_MASK                                      (CL_HTON16(0x7FFF))
 /*********/
 
 /****d* IBA Base: Constants/IB_PKEY_TYPE_MASK
@@ -409,6 +409,18 @@ BEGIN_C_DECLS
 #define IB_PKEY_TYPE_MASK                                      (CL_NTOH16(0x8000))
 /*********/
 
+/****d* IBA Base: Constants/IB_DEFAULT_PARTIAL_PKEY
+* NAME
+*      IB_DEFAULT_PARTIAL_PKEY 
+*
+* DESCRIPTION
+*      0x7FFF in network order
+*
+* SOURCE
+*/
+#define IB_DEFAULT_PARTIAL_PKEY                                       (CL_HTON16(0x7FFF))
+/**********/
+
 /****d* IBA Base: Constants/IB_MCLASS_SUBN_LID
 * NAME
 *      IB_MCLASS_SUBN_LID
@@ -1123,6 +1135,18 @@ ib_class_is_vendor_specific(
 #define IB_MAD_ATTR_SMINFO_RECORD                      (CL_NTOH16(0x0018))
 /**********/
 
+/****d* IBA Base: Constants/IB_MAD_ATTR_GUIDINFO_RECORD
+* NAME
+*       IB_MAD_ATTR_GUIDINFO_RECORD
+*
+* DESCRIPTION
+*       GuidInfoRecord attribute (15.2.5)
+*
+* SOURCE
+*/
+#define IB_MAD_ATTR_GUIDINFO_RECORD                    (CL_NTOH16(0x0030))
+/**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_VENDOR_DIAG
 * NAME
 *      IB_MAD_ATTR_VENDOR_DIAG
@@ -1134,6 +1158,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_VENDOR_DIAG                                (CL_NTOH16(0x0030))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_LED_INFO
 * NAME
 *      IB_MAD_ATTR_LED_INFO
@@ -1145,6 +1170,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_LED_INFO                           (CL_NTOH16(0x0031))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_SERVICE_RECORD
 * NAME
 *      IB_MAD_ATTR_SERVICE_RECORD
@@ -1156,6 +1182,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_SERVICE_RECORD                     (CL_NTOH16(0x0031))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_LFT_RECORD
 * NAME
 *      IB_MAD_ATTR_LFT_RECORD
@@ -1167,6 +1194,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_LFT_RECORD                 (CL_NTOH16(0x0015))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_PKEYTBL_RECORD
 * NAME
 *      IB_MAD_ATTR_PKEYTBL_RECORD
@@ -1178,6 +1206,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_PKEY_TBL_RECORD                    (CL_NTOH16(0x0033))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_PATH_RECORD
 * NAME
 *      IB_MAD_ATTR_PATH_RECORD
@@ -1189,6 +1218,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_PATH_RECORD                                (CL_NTOH16(0x0035))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_VLARB_RECORD
 * NAME
 *      IB_MAD_ATTR_VLARB_RECORD
@@ -1200,6 +1230,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_VLARB_RECORD                       (CL_NTOH16(0x0036))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_SLVL_RECORD
 * NAME
 *      IB_MAD_ATTR_SLVL_RECORD
@@ -1211,6 +1242,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_SLVL_RECORD                                (CL_NTOH16(0x0013))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_MCMEMBER_RECORD
 * NAME
 *      IB_MAD_ATTR_MCMEMBER_RECORD
@@ -1222,6 +1254,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_MCMEMBER_RECORD                    (CL_NTOH16(0x0038))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_TRACE_RECORD
 * NAME
 *      IB_MAD_ATTR_MTRACE_RECORD
@@ -1233,6 +1266,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_TRACE_RECORD                       (CL_NTOH16(0x0039))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_MULTIPATH_RECORD
 * NAME
 *      IB_MAD_ATTR_MULTIPATH_RECORD
@@ -1244,6 +1278,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_MULTIPATH_RECORD                   (CL_NTOH16(0x003A))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_SVC_ASSOCIATION_RECORD
 * NAME
 *      IB_MAD_ATTR_SVC_ASSOCIATION_RECORD
@@ -1255,6 +1290,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_SVC_ASSOCIATION_RECORD             (CL_NTOH16(0x003B))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_IO_UNIT_INFO
 * NAME
 *      IB_MAD_ATTR_IO_UNIT_INFO
@@ -1266,6 +1302,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_IO_UNIT_INFO                       (CL_NTOH16(0x0010))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_IO_CONTROLLER_PROFILE
 * NAME
 *      IB_MAD_ATTR_IO_CONTROLLER_PROFILE
@@ -1277,6 +1314,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_IO_CONTROLLER_PROFILE      (CL_NTOH16(0x0011))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_SERVICE_ENTRIES
 * NAME
 *      IB_MAD_ATTR_SERVICE_ENTRIES
@@ -1288,6 +1326,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_SERVICE_ENTRIES                    (CL_NTOH16(0x0012))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_DIAGNOSTIC_TIMEOUT
 * NAME
 *      IB_MAD_ATTR_DIAGNOSTIC_TIMEOUT
@@ -1299,6 +1338,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_DIAGNOSTIC_TIMEOUT         (CL_NTOH16(0x0020))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_PREPARE_TO_TEST
 * NAME
 *      IB_MAD_ATTR_PREPARE_TO_TEST
@@ -1310,6 +1350,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_PREPARE_TO_TEST                    (CL_NTOH16(0x0021))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_TEST_DEVICE_ONCE
 * NAME
 *      IB_MAD_ATTR_TEST_DEVICE_ONCE
@@ -1321,6 +1362,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_TEST_DEVICE_ONCE           (CL_NTOH16(0x0022))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_TEST_DEVICE_LOOP
 * NAME
 *      IB_MAD_ATTR_TEST_DEVICE_LOOP
@@ -1332,6 +1374,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_TEST_DEVICE_LOOP           (CL_NTOH16(0x0023))
 /**********/
+
 /****d* IBA Base: Constants/IB_MAD_ATTR_DIAG_CODE
 * NAME
 *      IB_MAD_ATTR_DIAG_CODE
@@ -1355,6 +1398,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_MAD_ATTR_SVC_ASSOCIATION_RECORD     (CL_NTOH16(0x003B))
 /**********/
+
 /****d* IBA Base: Constants/IB_NODE_TYPE_CA
 * NAME
 *      IB_NODE_TYPE_CA
@@ -1366,6 +1410,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_NODE_TYPE_CA                                                0x01
 /**********/
+
 /****d* IBA Base: Constants/IB_NODE_TYPE_SWITCH
 * NAME
 *      IB_NODE_TYPE_SWITCH
@@ -1377,6 +1422,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_NODE_TYPE_SWITCH                                    0x02
 /**********/
+
 /****d* IBA Base: Constants/IB_NODE_TYPE_ROUTER
 * NAME
 *      IB_NODE_TYPE_ROUTER
@@ -1400,6 +1446,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_NOTICE_NODE_TYPE_CA                         (CL_NTOH32(0x000001))
 /**********/
+
 /****d* IBA Base: Constants/IB_NOTICE_NODE_TYPE_SWITCH
 * NAME
 *      IB_NOTICE_NODE_TYPE_SWITCH
@@ -1411,6 +1458,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_NOTICE_NODE_TYPE_SWITCH                     (CL_NTOH32(0x000002))
 /**********/
+
 /****d* IBA Base: Constants/IB_NOTICE_NODE_TYPE_ROUTER
 * NAME
 *      IB_NOTICE_NODE_TYPE_ROUTER
@@ -1422,6 +1470,7 @@ ib_class_is_vendor_specific(
 */
 #define IB_NOTICE_NODE_TYPE_ROUTER                     (CL_NTOH32(0x000003))
 /**********/
+
 /****d* IBA Base: Constants/IB_NOTICE_NODE_TYPE_SUBN_MGMT
 * NAME
 *      IB_NOTICE_NODE_TYPE_SUBN_MGMT
@@ -2162,18 +2211,22 @@ typedef struct _ib_path_rec
 #define IB_VLA_COMPMASK_LID               (CL_HTON64(((uint64_t)1)<<0))
 #define IB_VLA_COMPMASK_OUT_PORT          (CL_HTON64(((uint64_t)1)<<1))
 #define IB_VLA_COMPMASK_BLOCK             (CL_HTON64(((uint64_t)1)<<2))
+
 /* SLtoVL Mapping Record Masks */
 #define IB_SLVL_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))
 #define IB_SLVL_COMPMASK_IN_PORT          (CL_HTON64(((uint64_t)1)<<1))
 #define IB_SLVL_COMPMASK_OUT_PORT         (CL_HTON64(((uint64_t)1)<<2))
+
 /* P_Key Table Record Masks */
 #define IB_PKEY_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))
 #define IB_PKEY_COMPMASK_BLOCK            (CL_HTON64(((uint64_t)1)<<1))
 #define IB_PKEY_COMPMASK_PORT             (CL_HTON64(((uint64_t)1)<<2))
-/* LFT Record MASKS */
+
+/* LFT Record Masks */
 #define IB_LFTR_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))
 #define IB_LFTR_COMPMASK_BLOCK            (CL_HTON64(((uint64_t)1)<<1))
-/* ModeInfo Record MASKS */
+
+/* NodeInfo Record Masks */
 #define IB_NR_COMPMASK_LID                (CL_HTON64(((uint64_t)1)<<0))
 #define IB_NR_COMPMASK_RESERVED1          (CL_HTON64(((uint64_t)1)<<1))
 #define IB_NR_COMPMASK_BASEVERSION        (CL_HTON64(((uint64_t)1)<<2))
@@ -2189,6 +2242,7 @@ typedef struct _ib_path_rec
 #define  IB_NR_COMPMASK_PORTNUM           (CL_HTON64(((uint64_t)1)<<12))
 #define  IB_NR_COMPMASK_VENDID            (CL_HTON64(((uint64_t)1)<<13))
 #define  IB_NR_COMPMASK_NODEDESC          (CL_HTON64(((uint64_t)1)<<14))
+
 /* Service Record Component Mask Sec 15.2.5.14 Ver 1.1*/
 #define IB_SR_COMPMASK_SID                (CL_HTON64(((uint64_t)1)<<0))
 #define IB_SR_COMPMASK_SGID               (CL_HTON64(((uint64_t)1)<<1))
@@ -2227,6 +2281,7 @@ typedef struct _ib_path_rec
 #define IB_SR_COMPMASK_SDATA32_3       (CL_HTON64(((uint64_t)1)<<34))
 #define IB_SR_COMPMASK_SDATA64_0       (CL_HTON64(((uint64_t)1)<<35))
 #define IB_SR_COMPMASK_SDATA64_1       (CL_HTON64(((uint64_t)1)<<36))
+
 /* Port Info Record Component Masks */
 #define IB_PIR_COMPMASK_LID               (CL_HTON64(((uint64_t)1)<<0))
 #define IB_PIR_COMPMASK_PORTNUM           (CL_HTON64(((uint64_t)1)<<1))
@@ -2277,6 +2332,7 @@ typedef struct _ib_path_rec
 #define  IB_PIR_COMPMASK_RESPTIME         (CL_HTON64(((uint64_t)1)<<46))
 #define  IB_PIR_COMPMASK_LOCALPHYERR      (CL_HTON64(((uint64_t)1)<<47))
 #define  IB_PIR_COMPMASK_OVERRUNERR       (CL_HTON64(((uint64_t)1)<<48))
+
 /* Multicast Member Record Component Masks */
 #define IB_MCR_COMPMASK_GID         (CL_HTON64(((uint64_t)1)<<0))
 #define IB_MCR_COMPMASK_MGID        (CL_HTON64(((uint64_t)1)<<0))
@@ -2298,6 +2354,20 @@ typedef struct _ib_path_rec
 #define IB_MCR_COMPMASK_JOIN_STATE  (CL_HTON64(((uint64_t)1)<<16))
 #define IB_MCR_COMPMASK_PROXY       (CL_HTON64(((uint64_t)1)<<17))
 
+/* GUID Info Record Component Masks */
+#define IB_GIR_COMPMASK_LID            (CL_HTON64(((uint64_t)1)<<0))
+#define IB_GIR_COMPMASK_BLOCKNUM       (CL_HTON64(((uint64_t)1)<<1))
+#define IB_GIR_COMPMASK_RESV1          (CL_HTON64(((uint64_t)1)<<2))
+#define IB_GIR_COMPMASK_RESV2          (CL_HTON64(((uint64_t)1)<<3))
+#define IB_GIR_COMPMASK_GID0           (CL_HTON64(((uint64_t)1)<<4))
+#define IB_GIR_COMPMASK_GID1           (CL_HTON64(((uint64_t)1)<<5))
+#define IB_GIR_COMPMASK_GID2           (CL_HTON64(((uint64_t)1)<<6))
+#define IB_GIR_COMPMASK_GID3           (CL_HTON64(((uint64_t)1)<<7))
+#define IB_GIR_COMPMASK_GID4           (CL_HTON64(((uint64_t)1)<<8))
+#define IB_GIR_COMPMASK_GID5           (CL_HTON64(((uint64_t)1)<<9))
+#define IB_GIR_COMPMASK_GID6           (CL_HTON64(((uint64_t)1)<<10))
+#define IB_GIR_COMPMASK_GID7           (CL_HTON64(((uint64_t)1)<<11))
+
 /****f* IBA Base: Types/ib_path_rec_init_local
 * NAME
 *      ib_path_rec_init_local
@@ -3974,6 +4044,33 @@ ib_port_info_get_vl_cap(
 *
 * SEE ALSO
 *********/
+/****f* IBA Base: Types/ib_port_info_get_init_type
+* NAME
+*      ib_port_info_get_init_type
+*
+* DESCRIPTION
+*      Gets the init type of a port.
+*
+* SYNOPSIS
+*/
+OSM_INLINE uint8_t     AL_API
+ib_port_info_get_init_type(
+       IN const ib_port_info_t* const p_pi)
+{
+       return (uint8_t) (p_pi->vl_cap & 0x0F);
+}
+/*
+* PARAMETERS
+*      p_pi
+*              [in] Pointer to a PortInfo attribute.
+*
+* RETURN VALUES
+*      InitType field
+*
+* NOTES
+*
+* SEE ALSO
+*********/
 /****f* IBA Base: Types/ib_port_info_get_op_vls
 * NAME
 *      ib_port_info_get_op_vls
@@ -4316,59 +4413,76 @@ AL_INLINE uint8_t     AL_API
 ib_port_info_compute_rate(
        IN              const   ib_port_info_t* const           p_pi )
 {
+  uint8_t rate = 0;
+
   switch (ib_port_info_get_link_speed_active(p_pi))
   {
   case IB_LINK_SPEED_ACTIVE_2_5:
     switch(p_pi->link_width_active)
     {
     case IB_LINK_WIDTH_ACTIVE_1X:
-      return IB_PATH_RECORD_RATE_2_5_GBS;
+      rate = IB_PATH_RECORD_RATE_2_5_GBS;
+      break;
 
     case IB_LINK_WIDTH_ACTIVE_4X:
-      return IB_PATH_RECORD_RATE_10_GBS;
+      rate = IB_PATH_RECORD_RATE_10_GBS;
+      break;
 
     case IB_LINK_WIDTH_ACTIVE_12X:
-      return IB_PATH_RECORD_RATE_30_GBS;
+      rate = IB_PATH_RECORD_RATE_30_GBS;
+      break;
 
     default:
-      return IB_PATH_RECORD_RATE_2_5_GBS;
+      rate = IB_PATH_RECORD_RATE_2_5_GBS;
+      break;
     }
     break;
   case IB_LINK_SPEED_ACTIVE_5:
     switch (p_pi->link_width_active)
     {
     case IB_LINK_WIDTH_ACTIVE_1X:
-      return IB_PATH_RECORD_RATE_5_GBS;
+      rate = IB_PATH_RECORD_RATE_5_GBS;
+      break;
       
     case IB_LINK_WIDTH_ACTIVE_4X:
-      return IB_PATH_RECORD_RATE_20_GBS;
+      rate = IB_PATH_RECORD_RATE_20_GBS;
+      break;
       
     case IB_LINK_WIDTH_ACTIVE_12X:
-      return IB_PATH_RECORD_RATE_60_GBS;
+      rate = IB_PATH_RECORD_RATE_60_GBS;
+      break;
       
     default:
-      return IB_PATH_RECORD_RATE_5_GBS;
+      rate = IB_PATH_RECORD_RATE_5_GBS;
+      break;
     }
     break;
   case IB_LINK_SPEED_ACTIVE_10:
     switch (p_pi->link_width_active)
     {
     case IB_LINK_WIDTH_ACTIVE_1X:
-      return IB_PATH_RECORD_RATE_10_GBS;
+      rate = IB_PATH_RECORD_RATE_10_GBS;
+      break;
       
     case IB_LINK_WIDTH_ACTIVE_4X:
-      return IB_PATH_RECORD_RATE_40_GBS;
+      rate = IB_PATH_RECORD_RATE_40_GBS;
+      break;
       
     case IB_LINK_WIDTH_ACTIVE_12X:
-      return IB_PATH_RECORD_RATE_120_GBS;
+      rate = IB_PATH_RECORD_RATE_120_GBS;
+      break;
       
     default:
-      return IB_PATH_RECORD_RATE_10_GBS;
+      rate = IB_PATH_RECORD_RATE_10_GBS;
+      break;
     }
     break;
   default:
-    return IB_PATH_RECORD_RATE_2_5_GBS;
+    rate = IB_PATH_RECORD_RATE_2_5_GBS;
+    break;
   }
+
+  return rate;
 }
 /*
 * PARAMETERS
@@ -4401,11 +4515,11 @@ ib_path_get_ipd(
 
        switch(local_link_width_supported)
        {
-               //link_width_supported = 1: 1x
+     /* link_width_supported = 1: 1x */
                case 1:
                        break;
 
-               //link_width_supported = 3: 1x or 4x
+         /* link_width_supported = 3: 1x or 4x */
                case 3:
                        switch(path_rec_rate & 0x3F)
                        {
@@ -4417,7 +4531,7 @@ ib_path_get_ipd(
                        }
                        break;
 
-               //link_width_supported = 11: 1x or 4x or 12x
+         /* link_width_supported = 11: 1x or 4x or 12x */
                case 11:
                        switch(path_rec_rate & 0x3F)
                        {
@@ -4454,7 +4568,6 @@ ib_path_get_ipd(
 * SEE ALSO
 *********/
 
-
 /****f* IBA Base: Types/ib_port_info_get_mtu_cap
 * NAME
 *      ib_port_info_get_mtu_cap
@@ -4543,6 +4656,65 @@ ib_port_info_set_neighbor_mtu(
 * SEE ALSO
 *********/
 
+/****f* IBA Base: Types/ib_port_info_get_master_smsl
+* NAME
+*      ib_port_info_get_master_smsl
+*
+* DESCRIPTION
+*      Returns the encoded value for the Master SMSL at this port.
+*
+* SYNOPSIS
+*/
+OSM_INLINE uint8_t     AL_API
+ib_port_info_get_master_smsl(
+       IN const ib_port_info_t* const p_pi )
+{
+  return (uint8_t) (p_pi->mtu_smsl & 0x0F); 
+}
+/*
+* PARAMETERS
+*      p_pi
+*              [in] Pointer to a PortInfo attribute.
+*
+* RETURN VALUES
+*      Returns the encoded value for the Master SMSL at this port.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+/****f* IBA Base: Types/ib_port_info_set_master_smsl
+* NAME
+*      ib_port_info_set_master_smsl
+*
+* DESCRIPTION
+*      Sets the Master SMSL value in the PortInfo attribute.
+*
+* SYNOPSIS
+*/
+AL_INLINE void     AL_API
+ib_port_info_set_master_smsl(
+       IN                              ib_port_info_t* const           p_pi,
+       IN              const   uint8_t                                         smsl )
+{
+       p_pi->mtu_smsl = (uint8_t)((p_pi->mtu_smsl & 0xF0) | smsl );
+}
+/*
+* PARAMETERS
+*      p_pi
+*              [in] Pointer to a PortInfo attribute.
+*
+*      mtu
+*              [in] Encoded Master SMSL value to set
+*
+* RETURN VALUES
+*      None.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+
 /****f* IBA Base: Types/ib_port_info_set_timeout
 * NAME
 *      ib_port_info_set_timeout
@@ -4780,7 +4952,7 @@ ib_port_info_set_vl_stall_count(
  *
  * SYNOPSIS
  */
-AL_INLINE uint8_t     AL_API
+OSM_INLINE uint8_t     AL_API
 ib_port_info_get_vl_stall_count(
   IN           const ib_port_info_t* const             p_pi )
 {
@@ -4980,6 +5152,60 @@ ib_port_info_set_mpb(
 *
 * SEE ALSO
 *********/
+/****f* IBA Base: Types/ib_port_info_get_local_phy_err_thd
+* NAME
+*      ib_port_info_get_local_phy_err_thd
+*
+* DESCRIPTION
+*      Returns the Phy Link Threshold
+*
+* SYNOPSIS
+*/
+OSM_INLINE uint8_t     AL_API
+ib_port_info_get_local_phy_err_thd(
+       IN              const   ib_port_info_t* const           p_pi )
+{
+  return (uint8_t)( (p_pi->error_threshold & 0xF0) >> 4);
+}
+/*
+* PARAMETERS
+*      p_pi
+*              [in] Pointer to a PortInfo attribute.
+*
+* RETURN VALUES
+*      Returns the Phy Link error threshold assigned to this port.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
+/****f* IBA Base: Types/ib_port_info_get_overrun_err_thd
+* NAME
+*      ib_port_info_get_local_overrun_err_thd
+*
+* DESCRIPTION
+*      Returns the Credits Overrun Errors Threshold
+*
+* SYNOPSIS
+*/
+OSM_INLINE uint8_t     AL_API
+ib_port_info_get_overrun_err_thd(
+       IN              const   ib_port_info_t* const           p_pi )
+{
+  return (uint8_t)(p_pi->error_threshold & 0x0F);
+}
+/*
+* PARAMETERS
+*      p_pi
+*              [in] Pointer to a PortInfo attribute.
+*
+* RETURN VALUES
+*      Returns the Credits Overrun errors threshold assigned to this port.
+*
+* NOTES
+*
+* SEE ALSO
+*********/
 
 /****f* IBA Base: Types/ib_port_info_set_phy_and_overrun_err_thd
 * NAME
@@ -5241,6 +5467,17 @@ typedef struct _ib_guid_info
 #include <complib/cl_packoff.h>
 /************/
 
+#include <complib/cl_packon.h>
+typedef struct _ib_guidinfo_record
+{
+       ib_net16_t              lid;
+       uint8_t                 block_num;
+       uint8_t                 resv;
+       uint32_t                reserved;
+       ib_guid_info_t          guid_info;
+}      PACK_SUFFIX ib_guidinfo_record_t;
+#include <complib/cl_packoff.h>
+
 #define IB_NUM_PKEY_ELEMENTS_IN_BLOCK          32
 /****s* IBA Base: Types/ib_pkey_table_t
 * NAME
index cafde5e..07b45e8 100644 (file)
@@ -93,18 +93,6 @@ BEGIN_C_DECLS
 *      Steve King, Intel
 *
 *********/
-/****s* OpenSM: Base/OSM_VERSION
-* NAME
-*      OSM_VERSION
-*
-* DESCRIPTION
-*      The version String for OpenSM 
-*
-* SYNOPSIS
-*/
-#define OSM_VERSION "OpenSM Rev:openib-1.1.0"
-/********/
-
 /****s* OpenSM: Base/OSM_DEFAULT_M_KEY
 * NAME
 *      OSM_DEFAULT_M_KEY
@@ -126,7 +114,7 @@ BEGIN_C_DECLS
 *
 * SYNOPSIS
 */
-#define OSM_DEFAULT_SM_KEY 0
+#define OSM_DEFAULT_SM_KEY 1
 /********/
 
 /****s* OpenSM: Base/OSM_DEFAULT_LMC
@@ -173,11 +161,11 @@ BEGIN_C_DECLS
 *
 * DESCRIPTION
 *      Default SM priority value used by the OpenSM,
-*      as defined in the SMInfo attribute.  0 is the highest priority.
+*      as defined in the SMInfo attribute.  0 is the lowest priority.
 *
 * SYNOPSIS
 */
-#define OSM_DEFAULT_SM_PRIORITY 0
+#define OSM_DEFAULT_SM_PRIORITY 1
 /********/
 
 /****d* OpenSM: Base/OSM_DEFAULT_TMP_DIR
@@ -225,7 +213,7 @@ BEGIN_C_DECLS
 * SYNOPSIS
 */
 #ifdef __WIN__
-#define OSM_DEFAULT_LOG_FILE strcat(GetOsmPath(),"osm.log")
+#define OSM_DEFAULT_LOG_FILE strcat(GetOsmPath(), "osm.log")
 #else
 #define OSM_DEFAULT_LOG_FILE "/var/log/osm.log"
 #endif
@@ -251,7 +239,7 @@ BEGIN_C_DECLS
 *
 * SYNOPSIS
 */
-#define OSM_DEFAULT_TRANS_TIMEOUT_MILLISEC 100
+#define OSM_DEFAULT_TRANS_TIMEOUT_MILLISEC 200
 /***********/
 
 /****d* OpenSM: Base/OSM_DEFAULT_SUBNET_TIMEOUT
@@ -376,7 +364,7 @@ BEGIN_C_DECLS
 *
 * SYNOPSIS
 */
-#define OSM_DEFAULT_SMP_MAX_ON_WIRE 1
+#define OSM_DEFAULT_SMP_MAX_ON_WIRE 4
 /***********/
 
 /****d* OpenSM: Base/OSM_SM_DEFAULT_QP0_RCV_SIZE
@@ -583,8 +571,10 @@ typedef enum _osm_sm_state
        OSM_SM_STATE_PROCESS_REQUEST_WAIT,
        OSM_SM_STATE_PROCESS_REQUEST_DONE,
        OSM_SM_STATE_MASTER_OR_HIGHER_SM_DETECTED,
+       OSM_SM_STATE_SET_PKEY,
+       OSM_SM_STATE_SET_PKEY_WAIT,
+       OSM_SM_STATE_SET_PKEY_DONE,
        OSM_SM_STATE_MAX
-
 } osm_sm_state_t;
 /***********/
 
diff --git a/ulp/opensm/user/include/opensm/osm_console.h b/ulp/opensm/user/include/opensm/osm_console.h
new file mode 100644 (file)
index 0000000..b63f8b7
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+#ifndef _OSM_CONSOLE_H_
+#define _OSM_CONSOLE_H_
+
+#include <opensm/osm_base.h>
+#include <opensm/osm_subnet.h>
+#include <opensm/osm_opensm.h>
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else /* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
+void osm_console(osm_opensm_t *p_osm);
+
+END_C_DECLS
+
+#endif /* _OSM_CONSOLE_H_ */
index de35100..300bd19 100644 (file)
@@ -219,14 +219,12 @@ osm_dump_node_record(
        IN const ib_node_record_t* const p_nr,
        IN const osm_log_level_t log_level );
 
-
 void
 osm_dump_mc_record(
        IN osm_log_t* const p_log,
        IN const ib_member_rec_t* const p_mcmr,
        IN const osm_log_level_t log_level );
 
-
 void
 osm_dump_link_record(
        IN osm_log_t*                           const p_log,
@@ -245,6 +243,12 @@ osm_dump_portinfo_record(
        IN const ib_portinfo_record_t* const p_pir,
        IN const osm_log_level_t log_level );
 
+void
+osm_dump_guidinfo_record(
+       IN osm_log_t* const p_log,
+       IN const ib_guidinfo_record_t* const p_gir,
+       IN const osm_log_level_t log_level );
+
 void
 osm_dump_inform_info(
        IN osm_log_t* const p_log,
index 7d3a674..31fb18f 100644 (file)
@@ -338,6 +338,7 @@ osm_lin_fwd_tbl_set_block(
 {
        uint16_t lid_start;
        uint16_t num_lids;
+
        CL_ASSERT( p_tbl );
        CL_ASSERT( p_block );
 
index 869297e..e5a324e 100644 (file)
 
 BEGIN_C_DECLS
 
-#ifndef PRIx64
-#if __WORDSIZE == 64
-#define PRId64         "I64d"
-#define PRIx64         "I64x"
-#define PRIo64         "I64o"
-#define PRIu64         "I64u"
-#else // __WORDSIZE
-#define PRId64         "I64d"
-#define PRIx64         "I64x"
-#define PRIo64         "I64o"
-#define PRIu64         "I64u"
-
-#endif //__WORDSIZE
-#endif // PRIx64
-
-
-
 #define LOG_ENTRY_SIZE_MAX             4096
 #define BUF_SIZE                               LOG_ENTRY_SIZE_MAX
 
-#define OSM_LOG_DEFINE_FUNC( NAME ) \
-       static const char osm_log_func_name[] = #NAME
+#define __func__ __FUNCTION__
 
 #define OSM_LOG_ENTER( OSM_LOG_PTR, NAME ) \
-       OSM_LOG_DEFINE_FUNC( NAME ); \
        osm_log( OSM_LOG_PTR, OSM_LOG_FUNCS, \
-                "%s: [\n", osm_log_func_name );
+                "%s: [\n", __func__);
 
 #define OSM_LOG_EXIT( OSM_LOG_PTR ) \
        osm_log( OSM_LOG_PTR, OSM_LOG_FUNCS, \
-                "%s: ]\n", osm_log_func_name );
+                "%s: ]\n", __func__);
 
 /****h* OpenSM/Log
 * NAME
@@ -247,10 +228,10 @@ osm_log_init(
   else
   {
     if (accum_log_file)
-      p_log->out_port = fopen(log_file,"a+");
+      p_log->out_port = fopen(log_file, "a+");
     else
-      p_log->out_port = fopen(log_file,"w+");
-    
+      p_log->out_port = fopen(log_file, "w+");
+
     if (!p_log->out_port)
     {
       if (accum_log_file)
@@ -416,7 +397,7 @@ osm_log_raw(
           __exp__,__FILE__, __LINE__);            \
    cl_plock_excl_acquire( __exp__ );      \
    if (DBG_CL_LOCK)                      \
-     printf("cl_plock_excl_acquire: Acquired  %p file %s, line %d\n", \
+     printf("cl_plock_excl_acquire: Acquired %p file %s, line %d\n", \
           __exp__,__FILE__, __LINE__);            \
 }
 
@@ -427,7 +408,7 @@ osm_log_raw(
           __exp__,__FILE__, __LINE__);            \
    cl_plock_acquire( __exp__ );      \
    if (DBG_CL_LOCK)                      \
-     printf("cl_plock_acquire: Acquired  %p file %s, line %d\n", \
+     printf("cl_plock_acquire: Acquired %p file %s, line %d\n", \
           __exp__,__FILE__, __LINE__);            \
 }
 
@@ -457,11 +438,11 @@ osm_log_raw(
 #define CL_SPINLOCK_ACQUIRE( __exp__ )  \
 {                                                                                                      \
    if (DBG_CL_SPINLOCK)                      \
-     printf("cl_spinlock_acquire: Acquire %p file %s, line %d\n", \
+     printf("cl_spinlock_acquire: Acquiring %p file %s, line %d\n", \
           __exp__,__FILE__, __LINE__);            \
    cl_spinlock_acquire( __exp__ );      \
    if (DBG_CL_SPINLOCK)                      \
-     printf("cl_spinlock_acquire: Acquired  %p file %s, line %d\n", \
+     printf("cl_spinlock_acquire: Acquired %p file %s, line %d\n", \
           __exp__,__FILE__, __LINE__);            \
 }
 
index 3da0057..c5ac28d 100644 (file)
@@ -312,6 +312,7 @@ typedef struct _osm_vla_context
   boolean_t                       set_method;
 } osm_vla_context_t;
 /*********/
+#ifndef OSM_VENDOR_INTF_OPENIB
 /****s* OpenSM: MAD Wrapper/osm_arbitrary_context_t
 * NAME
 *      osm_sa_context_t
@@ -327,7 +328,7 @@ typedef struct _osm_arbitrary_context
   void*             context2;
 } osm_arbitrary_context_t;
 /*********/
-
+#endif
 /****s* OpenSM: MAD Wrapper/osm_madw_context_t
 * NAME
 *      osm_madw_context_t
@@ -348,7 +349,9 @@ typedef union _osm_madw_context
        osm_smi_context_t               smi_context;
        osm_slvl_context_t      slvl_context;
        osm_pkey_context_t      pkey_context;
-  osm_arbitrary_context_t arb_context;
+#ifndef OSM_VENDOR_INTF_OPENIB
+       osm_arbitrary_context_t arb_context;
+#endif
 } osm_madw_context_t;
 /*********/
 
@@ -877,6 +880,7 @@ osm_madw_get_slvl_context_ptr(
 *
 * SEE ALSO
 *********/
+
 /****f* OpenSM: MAD Wrapper/osm_madw_get_vla_context_ptr
 * NAME
 *      osm_madw_get_vla_context_ptr
@@ -904,6 +908,8 @@ osm_madw_get_vla_context_ptr(
 *
 * SEE ALSO
 *********/
+
+#ifndef OSM_VENDOR_INTF_OPENIB
 /****f* OpenSM: MAD Wrapper/osm_madw_get_arbitrary_context_ptr
 * NAME
 *      osm_madw_get_arbitrary_context_ptr
@@ -931,6 +937,7 @@ osm_madw_get_arbitrary_context_ptr(
 *
 * SEE ALSO
 *********/
+#endif
 
 /****f* OpenSM: MAD Wrapper/osm_madw_get_vend_ptr
 * NAME
index 665782e..b6a7946 100644 (file)
@@ -188,6 +188,7 @@ enum
        OSM_MSG_MAD_PKEY,
        OSM_MSG_MAD_VL_ARB,
        OSM_MSG_MAD_SLVL,
+       OSM_MSG_MAD_GUIDINFO_RECORD,
        OSM_MSG_MAX
 };
 
index d3dce38..a236215 100644 (file)
@@ -415,7 +415,7 @@ IN osm_opensm_t* const p_osm);
 *
 * SEE ALSO
 *********/
-#endif
+#endif /* __WIN__ */
 
 END_C_DECLS
 
index b2d405a..c30b14d 100644 (file)
@@ -161,7 +161,7 @@ void osm_pkey_tbl_destroy(
 *  osm_pkey_get_num_blocks
 *
 * DESCRIPTION
-*  Obtain the pointer to the IB PKey table block stored in the object
+*  Obtain the number of blocks in IB PKey table 
 *
 * SYNOPSIS
 */
diff --git a/ulp/opensm/user/include/opensm/osm_pkey_mgr.h b/ulp/opensm/user/include/opensm/osm_pkey_mgr.h
new file mode 100644 (file)
index 0000000..0c1c170
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+
+/*
+ * Abstract:
+ *     Declaration of osm_pkey_mgr_t.
+ *     This object represents the P_Key Manager object.
+ *     This object is part of the OpenSM family of objects.
+ *
+ * Environment:
+ *     Linux User Mode
+ *
+ * $Revision: 1.4 $
+ */
+
+
+#ifndef _OSM_PKEY_MGR_H_
+#define _OSM_PKEY_MGR_H_
+
+#include <complib/cl_passivelock.h>
+#include <opensm/osm_subnet.h>
+#include <opensm/osm_req.h>
+#include <opensm/osm_log.h>
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else /* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
+/****h* OpenSM/P_Key Manager
+* NAME
+*      P_Key Manager
+*
+* DESCRIPTION
+*      The P_Key Manager object manage the p_key tables of all
+*      objects in the subnet
+*
+* AUTHOR
+*      Ofer Gigi, Mellanox
+*
+*********/
+/****s* OpenSM: P_Key Manager/osm_pkey_mgr_t
+* NAME
+*      osm_pkey_mgr_t
+*
+* DESCRIPTION
+*      p_Key Manager structure.
+*
+*
+* SYNOPSIS
+*/
+
+typedef struct _osm_pkey_mgr
+{
+    osm_subn_t                                 *p_subn;
+       osm_log_t                                       *p_log;
+       osm_req_t                                       *p_req;
+       cl_plock_t                                      *p_lock;
+
+} osm_pkey_mgr_t;
+
+/*
+* FIELDS
+*      p_subn
+*              Pointer to the Subnet object for this subnet.
+*
+*      p_log
+*              Pointer to the log object.
+*
+*      p_req
+*              Pointer to the Request object.
+*
+*      p_lock
+*              Pointer to the serializing lock.
+*
+* SEE ALSO
+*      P_Key Manager object
+*********/
+
+/****** OpenSM: P_Key Manager/osm_pkey_mgr_construct
+* NAME
+*      osm_pkey_mgr_construct
+*
+* DESCRIPTION
+*      This function constructs a P_Key Manager object.
+*
+* SYNOPSIS
+*/
+void 
+osm_pkey_mgr_construct(
+       IN osm_pkey_mgr_t* const p_mgr );
+/*
+* PARAMETERS
+*      p_mgr
+*              [in] Pointer to a P_Key Manager object to construct.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Allows calling osm_pkey_mgr_init, osm_pkey_mgr_destroy
+*
+*      Calling osm_pkey_mgr_construct is a prerequisite to calling any other
+*      method except osm_pkey_mgr_init.
+*
+* SEE ALSO
+*      P_Key Manager object, osm_pkey_mgr_init,
+*      osm_pkey_mgr_destroy
+*********/
+
+/****f* OpenSM: P_Key Manager/osm_pkey_mgr_destroy
+* NAME
+*      osm_pkey_mgr_destroy
+*
+* DESCRIPTION
+*      The osm_pkey_mgr_destroy function destroys the object, releasing
+*      all resources.
+*
+* SYNOPSIS
+*/
+void
+osm_pkey_mgr_destroy(
+       IN osm_pkey_mgr_t* const p_mgr );
+/*
+* PARAMETERS
+*      p_mgr
+*              [in] Pointer to the object to destroy.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Performs any necessary cleanup of the specified
+*      P_Key Manager object.
+*      Further operations should not be attempted on the destroyed object.
+*      This function should only be called after a call to
+*      osm_pkey_mgr_construct or osm_pkey_mgr_init.
+*
+* SEE ALSO
+*      P_Key Manager object, osm_pkey_mgr_construct,
+*      osm_pkey_mgr_init
+*********/
+
+/****f* OpenSM: P_Key Manager/osm_pkey_mgr_init
+* NAME
+*      osm_pkey_mgr_init
+*
+* DESCRIPTION
+*      The osm_pkey_mgr_init function initializes a
+*      P_Key Manager object for use.
+*
+* SYNOPSIS
+*/
+ib_api_status_t
+osm_pkey_mgr_init(
+       IN osm_pkey_mgr_t* const p_mgr,
+       IN osm_subn_t* const p_subn,
+       IN osm_log_t* const p_log,
+       IN osm_req_t* const p_req,
+       IN cl_plock_t* const p_lock );
+/*
+* PARAMETERS
+*      p_mgr
+*              [in] Pointer to an osm_pkey_mgr_t object to initialize.
+*
+*      p_subn
+*              [in] Pointer to the Subnet object for this subnet.
+*
+*      p_log
+*              [in] Pointer to the log object.
+*
+*      p_req
+*              [in] Pointer to an osm_req_t object.
+*
+*      p_lock
+*              [in] Pointer to the OpenSM serializing lock.
+*
+* RETURN VALUES
+*      IB_SUCCESS if the P_Key Manager object was initialized
+*      successfully.
+*
+* NOTES
+*      Allows calling other P_Key Manager methods.
+*
+* SEE ALSO
+*      P_Key Manager object, osm_pkey_mgr_construct,
+*      osm_pkey_mgr_destroy
+*********/
+
+/****f* OpenSM: P_Key Manager/osm_pkey_mgr_process
+* NAME
+*      osm_pkey_mgr_process
+*
+* DESCRIPTION
+*      This function enforce pkey rules on the SM DB.
+*
+* SYNOPSIS
+*/
+osm_signal_t 
+osm_pkey_mgr_process(
+       IN const osm_pkey_mgr_t* const p_mgr );
+/*
+* PARAMETERS
+*      p_mgr
+*              [in] Pointer to an osm_pkey_mgr_t object.
+*
+* RETURN VALUES
+*      None
+*
+* NOTES
+*   Current Operations:
+*   - Inserts IB_DEFAULT_PKEY to all node objects that don't have 
+*      IB_DEFAULT_PARTIAL_PKEY or IB_DEFAULT_PKEY as part 
+*     of their p_key table
+*
+* SEE ALSO
+*      P_Key Manager
+*********/
+
+END_C_DECLS
+
+#endif /* _OSM_PKEY_MGR_H_ */
index 21cf041..244cb28 100644 (file)
@@ -343,7 +343,7 @@ osm_physp_is_healthy(
 *      Returns TRUE if the Physical Port has been maked as healthy
 *      FALSE otherwise.
 *  All physical ports are initialized as "healthy" but may be marked 
-*  otherwise if a  received trap claims otherwise.
+*  otherwise if a received trap claims otherwise.
 *
 * NOTES
 *
@@ -453,6 +453,46 @@ osm_physp_set_port_info(
 *      Port, Physical Port
 *********/
 
+/****f* OpenSM: Physical Port/osm_physp_trim_base_lid_to_valid_range
+* NAME
+*  osm_physp_trim_base_lid_to_valid_range 
+*
+* DESCRIPTION
+*  Validates the base LID in the Physical Port object
+*  and resets it if the base LID is invalid.
+*
+* SYNOPSIS
+*/
+static inline ib_net16_t 
+osm_physp_trim_base_lid_to_valid_range(
+       IN osm_physp_t* const p_physp )
+{
+       ib_net16_t orig_lid = 0;
+
+       CL_ASSERT( osm_physp_is_valid( p_physp ) );
+       if ( ( cl_ntoh16( p_physp->port_info.base_lid ) > IB_LID_UCAST_END_HO ) ||
+             ( cl_ntoh16( p_physp->port_info.base_lid ) < IB_LID_UCAST_START_HO ) )
+       {
+               orig_lid = p_physp->port_info.base_lid;
+               p_physp->port_info.base_lid = 0;
+       }
+       return orig_lid;
+}
+/*
+* PARAMETERS
+*      p_physp
+*              [in] Pointer to an osm_physp_t object.
+*
+* RETURN VALUES
+*      Returns 0 if the base LID in the Physical port object is valid.
+*      Returns original invalid LID otherwise.
+*
+* NOTES
+*
+* SEE ALSO
+*      Port, Physical Port
+*********/
+
 /****f* OpenSM: Physical Port/osm_physp_set_pkey_tbl
 * NAME
 *  osm_physp_set_pkey_tbl
@@ -1303,9 +1343,9 @@ osm_port_destroy(
 * SEE ALSO
 *      Port, osm_port_init, osm_port_destroy, osm_port_is_inited
 *********/
-/****f* OpenSM: Port/osm_port_destroy
+/****f* OpenSM: Port/osm_port_delete
 * NAME
-*      osm_port_destroy
+*      osm_port_delete
 *
 * DESCRIPTION
 *      This function destroys and deallocates a Port object.
index de20850..831f348 100644 (file)
@@ -108,9 +108,9 @@ typedef struct _osm_port_profile
 * SEE ALSO
 *********/
 
-/****f* OpenSM: Port Profile/osm_port_pro_construct
+/****f* OpenSM: Port Profile/osm_port_prof_construct
 * NAME
-*      osm_port_pro_construct
+*      osm_port_prof_construct
 *
 * DESCRIPTION
 *      
@@ -118,15 +118,15 @@ typedef struct _osm_port_profile
 * SYNOPSIS
 */
 static inline void
-osm_port_pro_construct(
-       IN osm_port_profile_t* const p_pro )
+osm_port_prof_construct(
+       IN osm_port_profile_t* const p_prof )
 {
-       CL_ASSERT( p_pro );
-       cl_memclr( p_pro, sizeof(*p_pro) );
+       CL_ASSERT( p_prof );
+       cl_memclr( p_prof, sizeof(*p_prof) );
 }
 /*
 * PARAMETERS
-*      p_pro
+*      p_prof
 *              [in] Pointer to the Port Profile object to construct.
 *
 * RETURN VALUE
@@ -137,9 +137,9 @@ osm_port_pro_construct(
 * SEE ALSO
 *********/
 
-/****f* OpenSM: Port Profile/osm_port_pro_path_count_inc
+/****f* OpenSM: Port Profile/osm_port_prof_path_count_inc
 * NAME
-*      osm_port_pro_path_count_inc
+*      osm_port_prof_path_count_inc
 *
 * DESCRIPTION
 *      Increments the count of the number of paths going through this port.
@@ -148,11 +148,11 @@ osm_port_pro_construct(
 * SYNOPSIS
 */
 static inline void
-osm_port_pro_path_count_inc(
-       IN osm_port_profile_t* const p_pro )
+osm_port_prof_path_count_inc(
+       IN osm_port_profile_t* const p_prof )
 {
-       CL_ASSERT( p_pro );
-       p_pro->num_paths++;
+       CL_ASSERT( p_prof );
+       p_prof->num_paths++;
 }
 /*
 * PARAMETERS
@@ -167,9 +167,9 @@ osm_port_pro_path_count_inc(
 * SEE ALSO
 *********/
 
-/****f* OpenSM: Port Profile/osm_port_pro_path_count_get
+/****f* OpenSM: Port Profile/osm_port_prof_path_count_get
 * NAME
-*      osm_port_pro_path_count_get
+*      osm_port_prof_path_count_get
 *
 * DESCRIPTION
 *      Returns the count of the number of paths going through this port.
@@ -177,10 +177,10 @@ osm_port_pro_path_count_inc(
 * SYNOPSIS
 */
 static inline uint32_t
-osm_port_pro_path_count_get(
-       IN const osm_port_profile_t* const p_pro )
+osm_port_prof_path_count_get(
+       IN const osm_port_profile_t* const p_prof )
 {
-       return( p_pro->num_paths );
+       return( p_prof->num_paths );
 }
 /*
 * PARAMETERS
@@ -196,22 +196,22 @@ osm_port_pro_path_count_get(
 *********/
 
 
-/****f* OpenSM: Port Profile Opt/osm_port_pro_is_ignored_port
+/****f* OpenSM: Port Profile Opt/osm_port_prof_is_ignored_port
 * NAME
-*      osm_port_pro_is_ignored_port
+*      osm_port_prof_is_ignored_port
 *
 * DESCRIPTION
 *      Check to see if this port is to be ignored in path counting.
-*  This is done by examining the optional list of port_pro_ignore_guids.
+*  This is done by examining the optional list of port_prof_ignore_guids.
 *
 * SYNOPSIS
 */
 static inline boolean_t
-osm_port_pro_is_ignored_port(
+osm_port_prof_is_ignored_port(
                                                                          IN const osm_subn_t *p_subn, 
                                                                          IN uint64_t port_guid,
                                                                          IN uint8_t port_num) {
-  const cl_map_t *p_map = &(p_subn->opt.port_pro_ignore_guids);
+  const cl_map_t *p_map = &(p_subn->opt.port_prof_ignore_guids);
   const void *p_obj = cl_map_get(p_map, port_guid);
   size_t res;
   // HACK: we currently support ignoring ports 0 - 31
@@ -237,9 +237,9 @@ osm_port_pro_is_ignored_port(
 * SEE ALSO
 *********/
 
-/****f* OpenSM: Port Profile Opt/osm_port_pro_set_ignored_port
+/****f* OpenSM: Port Profile Opt/osm_port_prof_set_ignored_port
 * NAME
-*      osm_port_pro_set_ignored_port
+*      osm_port_prof_set_ignored_port
 *
 * DESCRIPTION
 *      Set the ignored property of the port.
@@ -247,11 +247,11 @@ osm_port_pro_is_ignored_port(
 * SYNOPSIS
 */
 static inline void
-osm_port_pro_set_ignored_port(
+osm_port_prof_set_ignored_port(
                                                                          IN osm_subn_t *p_subn, 
                                                                          IN uint64_t port_guid,
                                                                          IN uint8_t port_num) {
-  cl_map_t *p_map = &(p_subn->opt.port_pro_ignore_guids);
+  cl_map_t *p_map = &(p_subn->opt.port_prof_ignore_guids);
   const void *p_obj = cl_map_get(p_map, port_guid);
   size_t value = 0;
   // HACK: we currently support ignoring ports 0 - 31
@@ -262,7 +262,7 @@ osm_port_pro_set_ignored_port(
   } 
   
   value = value | (1 << port_num);
-  cl_map_insert(&(p_subn->opt.port_pro_ignore_guids),
+  cl_map_insert(&(p_subn->opt.port_prof_ignore_guids),
                                         port_guid,
                                         (void *)value);
 }
index 43c3aa4..2260fe4 100644 (file)
@@ -305,7 +305,7 @@ osm_req_set(
        IN const osm_req_t* const p_req,
        IN const osm_dr_path_t* const p_path,
        IN const uint8_t* const p_payload,
-   IN const size_t payload_size,
+       IN const size_t payload_size,
        IN const uint16_t attr_id,
        IN const uint32_t attr_mod,
        IN const cl_disp_msgid_t err_msg,
index afd79c9..db53121 100644 (file)
@@ -61,6 +61,7 @@
 #include <opensm/osm_log.h>
 #include <opensm/osm_sa_node_record_ctrl.h>
 #include <opensm/osm_sa_portinfo_record_ctrl.h>
+#include <opensm/osm_sa_guidinfo_record_ctrl.h>
 #include <opensm/osm_sa_link_record_ctrl.h>
 #include <opensm/osm_sa_path_record_ctrl.h>
 #include <opensm/osm_sa_sminfo_record_ctrl.h>
@@ -151,6 +152,8 @@ typedef struct _osm_sa
        osm_nr_rcv_ctrl_t                       nr_rcv_ctrl;
        osm_pir_rcv_t                           pir_rcv;
        osm_pir_rcv_ctrl_t                      pir_rcv_ctrl;
+       osm_gir_rcv_t                           gir_rcv;
+       osm_gir_rcv_ctrl_t                      gir_rcv_ctrl;
        osm_lr_rcv_t                            lr_rcv;
        osm_lr_rcv_ctrl_t                       lr_rcv_ctrl;
        osm_pr_rcv_t                            pr_rcv;
index 2a558b3..e7922bf 100644 (file)
@@ -34,8 +34,8 @@
 
 /*
  * Abstract:
- *     Declaration of osm_pr_rcv_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
+ *     Declaration of osm_cpi_rcv_ctrl_t.
+ *     This object represents a controller that receives the IBA ClassPortInfo 
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
diff --git a/ulp/opensm/user/include/opensm/osm_sa_guidinfo_record.h b/ulp/opensm/user/include/opensm/osm_sa_guidinfo_record.h
new file mode 100644 (file)
index 0000000..7e30eb4
--- /dev/null
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+
+/*
+ * Abstract:
+ *     Declaration of osm_gir_rcv_t.
+ *     This object represents the GUIDInfo Record Receiver object.
+ *     This object is part of the OpenSM family of objects.
+ *
+ * Environment:
+ *     Linux User Mode
+ *
+ */
+
+
+#ifndef _OSM_GIR_RCV_H_
+#define _OSM_GIR_RCV_H_
+
+
+#include <complib/cl_passivelock.h>
+#include <complib/cl_qlist.h>
+#include <opensm/osm_base.h>
+#include <opensm/osm_madw.h>
+#include <opensm/osm_sa_response.h>
+#include <opensm/osm_subnet.h>
+#include <opensm/osm_port.h>
+#include <opensm/osm_log.h>
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else /* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
+/****h* OpenSM/GUIDInfo Record Receiver
+* NAME
+*      GUIDInfo Record Receiver
+*
+* DESCRIPTION
+*      The GUIDInfo Record Receiver object encapsulates the information
+*      needed to receive the GUIDInfoRecord attribute from a node.
+*
+*      The GUIDInfo Record Receiver object is thread safe.
+*
+*      This object should be treated as opaque and should be
+*      manipulated only through the provided functions.
+*
+* AUTHOR
+*      Hal Rosenstock, Voltaire 
+*
+*********/
+/****s* OpenSM: GUIDInfo Record Receiver/osm_gir_rcv_t
+* NAME
+*      osm_gir_rcv_t
+*
+* DESCRIPTION
+*      GUIDInfo Record Receiver structure.
+*
+*      This object should be treated as opaque and should
+*      be manipulated only through the provided functions.
+*
+* SYNOPSIS
+*/
+typedef struct _osm_gir_rcv
+{
+       const osm_subn_t                        *p_subn;
+       osm_sa_resp_t                           *p_resp;
+       osm_mad_pool_t                          *p_mad_pool;
+       osm_log_t                                       *p_log;
+       cl_plock_t                                      *p_lock;
+       cl_qlock_pool_t                 pool;
+
+} osm_gir_rcv_t;
+/*
+* FIELDS
+*      p_subn
+*              Pointer to the Subnet object for this subnet.
+*
+*      p_resp
+*              Pointer to the SA reponder.
+*
+*      p_mad_pool
+*              Pointer to the mad pool.
+*
+*      p_log
+*              Pointer to the log object.
+*
+*      p_lock
+*              Pointer to the serializing lock.
+*
+*      pool
+*              Pool of linkable GUIDInfo Record objects used to generate
+*              the query response.
+*
+* SEE ALSO
+*      
+*********/
+
+/****f* OpenSM: GUIDInfo Record Receiver/osm_gir_rcv_construct
+* NAME
+*      osm_gir_rcv_construct
+*
+* DESCRIPTION
+*      This function constructs a GUIDInfo Record Receiver object.
+*
+* SYNOPSIS
+*/
+void
+osm_gir_rcv_construct(
+       IN osm_gir_rcv_t* const p_rcv );
+/*
+* PARAMETERS
+*      p_rcv
+*              [in] Pointer to a GUIDInfo Record Receiver object to construct.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Allows calling osm_gir_rcv_init, osm_gir_rcv_destroy
+*
+*      Calling osm_gir_rcv_construct is a prerequisite to calling any other
+*      method except osm_gir_rcv_init.
+*
+* SEE ALSO
+*      GUIDInfo Record Receiver object, osm_gir_rcv_init,
+*      osm_gir_rcv_destroy
+*********/
+
+/****f* OpenSM: GUIDInfo Record Receiver/osm_gir_rcv_destroy
+* NAME
+*      osm_gir_rcv_destroy
+*
+* DESCRIPTION
+*      The osm_gir_rcv_destroy function destroys the object, releasing
+*      all resources.
+*
+* SYNOPSIS
+*/
+void
+osm_gir_rcv_destroy(
+       IN osm_gir_rcv_t* const p_rcv );
+/*
+* PARAMETERS
+*      p_rcv
+*              [in] Pointer to the object to destroy.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Performs any necessary cleanup of the specified
+*      GUIDInfo Record Receiver object.
+*      Further operations should not be attempted on the destroyed object.
+*      This function should only be called after a call to
+*      osm_gir_rcv_construct or osm_gir_rcv_init.
+*
+* SEE ALSO
+*      GUIDInfo Record Receiver object, osm_gir_rcv_construct,
+*      osm_gir_rcv_init
+*********/
+
+/****f* OpenSM: GUIDInfo Record Receiver/osm_gir_rcv_init
+* NAME
+*      osm_gir_rcv_init
+*
+* DESCRIPTION
+*      The osm_gir_rcv_init function initializes a
+*      GUIDInfo Record Receiver object for use.
+*
+* SYNOPSIS
+*/
+ib_api_status_t
+osm_gir_rcv_init(
+       IN osm_gir_rcv_t* const p_rcv,
+       IN osm_sa_resp_t* const p_resp,
+       IN osm_mad_pool_t* const p_mad_pool,
+       IN const osm_subn_t* const p_subn,
+       IN osm_log_t* const p_log,
+       IN cl_plock_t* const p_lock );
+/*
+* PARAMETERS
+*      p_rcv
+*              [in] Pointer to an osm_gir_rcv_t object to initialize.
+*
+*      p_req
+*              [in] Pointer to an osm_req_t object.
+*
+*      p_subn
+*              [in] Pointer to the Subnet object for this subnet.
+*
+*      p_log
+*              [in] Pointer to the log object.
+*
+*      p_lock
+*              [in] Pointer to the OpenSM serializing lock.
+*
+* RETURN VALUES
+*      CL_SUCCESS if the GUIDInfo Record Receiver object was initialized
+*      successfully.
+*
+* NOTES
+*      Allows calling other GUIDInfo Record Receiver methods.
+*
+* SEE ALSO
+*      GUIDInfo Record Receiver object, osm_gir_rcv_construct,
+*      osm_gir_rcv_destroy
+*********/
+
+/****f* OpenSM: GUIDInfo Record Receiver/osm_gir_rcv_process
+* NAME
+*      osm_gir_rcv_process
+*
+* DESCRIPTION
+*      Process the GUIDInfoRecord attribute.
+*
+* SYNOPSIS
+*/
+void
+osm_gir_rcv_process(
+       IN osm_gir_rcv_t* const p_rcv,
+       IN const osm_madw_t* const p_madw );
+/*
+* PARAMETERS
+*      p_rcv
+*              [in] Pointer to an osm_gir_rcv_t object.
+*
+*      p_madw
+*              [in] Pointer to the MAD Wrapper containing the MAD
+*              that contains the node's GUIDInfoRecord attribute.
+*
+* RETURN VALUES
+*      CL_SUCCESS if the GUIDInfoRecord processing was successful.
+*
+* NOTES
+*      This function processes a GUIDInfoRecord attribute.
+*
+* SEE ALSO
+*      GUIDInfo Record Receiver, GUIDInfo Record Response Controller
+*********/
+
+END_C_DECLS
+
+#endif /* _OSM_GIR_RCV_H_ */
diff --git a/ulp/opensm/user/include/opensm/osm_sa_guidinfo_record_ctrl.h b/ulp/opensm/user/include/opensm/osm_sa_guidinfo_record_ctrl.h
new file mode 100644 (file)
index 0000000..4fd4f77
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+
+/*
+ * Abstract:
+ *     Declaration of osm_sa_gir_rec_rcv_ctrl_t.
+ *     This object represents a controller that receives the IBA GUID Info 
+ *     record query from SA client.
+ *     This object is part of the OpenSM family of objects.
+ *
+ * Environment:
+ *     Linux User Mode
+ *
+ */
+
+
+#ifndef _OSM_GIR_CTRL_H_
+#define _OSM_GIR_CTRL_H_
+
+
+#include <opensm/cl_dispatcher.h>
+#include <opensm/osm_base.h>
+#include <opensm/osm_madw.h>
+#include <opensm/osm_log.h>
+#include <opensm/osm_sa_guidinfo_record.h>
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else /* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
+/****h* OpenSM/GUID Info Record Receive Controller
+* NAME
+*      GUID Info Record Receive Controller
+*
+* DESCRIPTION
+*      The GUID Info Record Receive Controller object encapsulates
+*      the information needed to handle GUID Info record query from SA client.
+*
+*      The GUID Info Record Receive Controller object is thread safe.
+*
+*      This object should be treated as opaque and should be
+*      manipulated only through the provided functions.
+*
+* AUTHOR
+*      Hal Rosenstock, Voltaire 
+*
+*********/
+/****s* OpenSM: GUID Info Record Receive Controller/osm_gir_rcv_ctrl_t
+* NAME
+*      osm_gir_rcv_ctrl_t
+*
+* DESCRIPTION
+*      GUID Info Record Receive Controller structure.
+*
+*      This object should be treated as opaque and should
+*      be manipulated only through the provided functions.
+*
+* SYNOPSIS
+*/
+typedef struct _osm_gir_rcv_ctrl
+{
+       osm_gir_rcv_t                   *p_rcv;
+       osm_log_t                                       *p_log;
+       cl_dispatcher_t                 *p_disp;
+       cl_disp_reg_handle_t            h_disp;
+
+} osm_gir_rcv_ctrl_t;
+/*
+* FIELDS
+*      p_rcv
+*              Pointer to the GUID Info Record Receiver object.
+*
+*      p_log
+*              Pointer to the log object.
+*
+*      p_disp
+*              Pointer to the Dispatcher.
+*
+*      h_disp
+*              Handle returned from dispatcher registration.
+*
+* SEE ALSO
+*      GUID Info Record Receive Controller object
+*      GUID Info Record Receiver object
+*********/
+
+/****f* OpenSM: GUID Info Record Receive Controller/osm_gir_rec_rcv_ctrl_construct
+* NAME
+*      osm_gir_rcv_ctrl_construct
+*
+* DESCRIPTION
+*      This function constructs a GUID Info Record Receive Controller object.
+*
+* SYNOPSIS
+*/
+void osm_gir_rcv_ctrl_construct(
+       IN osm_gir_rcv_ctrl_t* const p_ctrl );
+/*
+* PARAMETERS
+*      p_ctrl
+*              [in] Pointer to a GUID Info Record Receive Controller
+*              object to construct.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Allows calling osm_gir_rcv_ctrl_init, osm_gir_rcv_ctrl_destroy
+*
+*      Calling osm_gir_rcv_ctrl_construct is a prerequisite to calling any other
+*      method except osm_gir_rcv_ctrl_init.
+*
+* SEE ALSO
+*      GUID Info Record Receive Controller object, osm_gir_rcv_ctrl_init,
+*      osm_gir_rcv_ctrl_destroy
+*********/
+
+/****f* OpenSM: GUID Info Record Receive Controller/osm_gir_rcv_ctrl_destroy
+* NAME
+*      osm_gir_rcv_ctrl_destroy
+*
+* DESCRIPTION
+*      The osm_gir_rcv_ctrl_destroy function destroys the object, releasing
+*      all resources.
+*
+* SYNOPSIS
+*/
+void osm_gir_rcv_ctrl_destroy(
+       IN osm_gir_rcv_ctrl_t* const p_ctrl );
+/*
+* PARAMETERS
+*      p_ctrl
+*              [in] Pointer to the object to destroy.
+*
+* RETURN VALUE
+*      This function does not return a value.
+*
+* NOTES
+*      Performs any necessary cleanup of the specified
+*      GUIDInfo Record Receive Controller object.
+*      Further operations should not be attempted on the destroyed object.
+*      This function should only be called after a call to
+*      osm_gir_rcv_ctrl_construct or osm_gir_rcv_ctrl_init.
+*
+* SEE ALSO
+*      GUIDInfo Record Receive Controller object, osm_gir_rcv_ctrl_construct,
+*      osm_gir_rcv_ctrl_init
+*********/
+
+/****f* OpenSM: GUID Info Record Receive Controller/osm_gir_rcv_ctrl_init
+* NAME
+*      osm_gir_rcv_ctrl_init
+*
+* DESCRIPTION
+*      The osm_gir_rcv_ctrl_init function initializes a
+*      GUID Info Record Receive Controller object for use.
+*
+* SYNOPSIS
+*/
+ib_api_status_t osm_gir_rcv_ctrl_init(
+       IN osm_gir_rcv_ctrl_t* const p_ctrl,
+       IN osm_gir_rcv_t* const p_rcv,
+       IN osm_log_t* const p_log,
+       IN cl_dispatcher_t* const p_disp );
+/*
+* PARAMETERS
+*      p_ctrl
+*              [in] Pointer to an osm_gir_rcv_ctrl_t object to initialize.
+*
+*      p_rcv
+*              [in] Pointer to an osm_gir_rcv_t object.
+*
+*      p_log
+*              [in] Pointer to the log object.
+*
+*      p_disp
+*              [in] Pointer to the OpenSM central Dispatcher.
+*
+* RETURN VALUES
+*      CL_SUCCESS if the GUID Info Record Receive Controller object was initialized
+*      successfully.
+*
+* NOTES
+*      Allows calling other GUID Info Record Receive Controller methods.
+*
+* SEE ALSO
+*      GUID Info Record Receive Controller object, osm_gir_rcv_ctrl_construct,
+*      osm_gir_rcv_ctrl_destroy
+*********/
+
+END_C_DECLS
+
+#endif /* _OSM_GIR_CTRL_H_ */
index 694e28c..4f8bc44 100644 (file)
@@ -269,7 +269,7 @@ void osm_lr_rcv_process(
 *      This function processes a Link Record attribute.
 *
 * SEE ALSO
-*      Link Record Receiver, Node Info Response Controller
+*      Link Record Receiver, Link Record Response Controller
 *********/
 
 END_C_DECLS
index 60615f8..198387a 100644 (file)
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Link Recrod Receive Controller
+/****h* OpenSM/Link Record Receive Controller
 * NAME
-*      Link Recrod Receive Controller
+*      Link Record Receive Controller
 *
 * DESCRIPTION
-*      The Link Recrod Receive Controller object encapsulates
-*      the information needed to receive the NodeInfo attribute from a node.
+*      The Link Record Receive Controller object encapsulates
+*      the information needed to receive the LinkRecord attribute from a node.
 *
-*      The Link Recrod Receive Controller object is thread safe.
+*      The Link Record Receive Controller object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -82,12 +82,12 @@ BEGIN_C_DECLS
 *      Ranjit Pandit, Intel
 *
 *********/
-/****s* OpenSM: Link Recrod Receive Controller/osm_lr_rcv_ctrl_t
+/****s* OpenSM: Link Record Receive Controller/osm_lr_rcv_ctrl_t
 * NAME
 *      osm_lr_rcv_ctrl_t
 *
 * DESCRIPTION
-*      Link Recrod Receive Controller structure.
+*      Link Record Receive Controller structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -105,7 +105,7 @@ typedef struct _osm_lr_rcv_ctrl
 /*
 * FIELDS
 *      p_rcv
-*              Pointer to the Link Recrod Receiver object.
+*              Pointer to the Link Record Receiver object.
 *
 *      p_log
 *              Pointer to the log object.
@@ -121,12 +121,12 @@ typedef struct _osm_lr_rcv_ctrl
 *      Link Record Receiver object
 *********/
 
-/****f* OpenSM: Link Recrod Receive Controller/osm_lr_rcv_ctrl_construct
+/****f* OpenSM: Link Record Receive Controller/osm_lr_rcv_ctrl_construct
 * NAME
 *      osm_lr_rcv_ctrl_construct
 *
 * DESCRIPTION
-*      This function constructs a Link Recrod Receive Controller object.
+*      This function constructs a Link Record Receive Controller object.
 *
 * SYNOPSIS
 */
@@ -135,7 +135,7 @@ void osm_lr_rcv_ctrl_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Link Recrod Receive Controller
+*              [in] Pointer to a Link Record Receive Controller
 *              object to construct.
 *
 * RETURN VALUE
@@ -149,11 +149,11 @@ void osm_lr_rcv_ctrl_construct(
 *      method except osm_lr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Link Recrod Receive Controller object, osm_lr_rcv_ctrl_init,
+*      Link Record Receive Controller object, osm_lr_rcv_ctrl_init,
 *      osm_lr_rcv_ctrl_destroy, osm_lr_rcv_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Link Recrod Receive Controller/osm_lr_rcv_ctrl_destroy
+/****f* OpenSM: Link Record Receive Controller/osm_lr_rcv_ctrl_destroy
 * NAME
 *      osm_lr_rcv_ctrl_destroy
 *
@@ -175,23 +175,23 @@ void osm_lr_rcv_ctrl_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Link Recrod Receive Controller object.
+*      Link Record Receive Controller object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_lr_rcv_ctrl_construct or osm_lr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Link Recrod Receive Controller object, osm_lr_rcv_ctrl_construct,
+*      Link Record Receive Controller object, osm_lr_rcv_ctrl_construct,
 *      osm_lr_rcv_ctrl_init
 *********/
 
-/****f* OpenSM: Link Recrod Receive Controller/osm_lr_rcv_ctrl_init
+/****f* OpenSM: Link Record Receive Controller/osm_lr_rcv_ctrl_init
 * NAME
 *      osm_lr_rcv_ctrl_init
 *
 * DESCRIPTION
 *      The osm_lr_rcv_ctrl_init function initializes a
-*      Link Recrod Receive Controller object for use.
+*      Link Record Receive Controller object for use.
 *
 * SYNOPSIS
 */
@@ -216,18 +216,18 @@ osm_lr_rcv_ctrl_init(
 *              [in] Pointer to the OpenSM central Dispatcher.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Link Recrod Receive Controller object was initialized
+*      CL_SUCCESS if the Link Record Receive Controller object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Link Recrod Receive Controller methods.
+*      Allows calling other Link Record Receive Controller methods.
 *
 * SEE ALSO
-*      Link Recrod Receive Controller object, osm_lr_rcv_ctrl_construct,
+*      Link Record Receive Controller object, osm_lr_rcv_ctrl_construct,
 *      osm_lr_rcv_ctrl_destroy, osm_lr_rcv_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Link Recrod Receive Controller/osm_lr_rcv_ctrl_is_inited
+/****f* OpenSM: Link Record Receive Controller/osm_lr_rcv_ctrl_is_inited
 * NAME
 *      osm_lr_rcv_ctrl_is_inited
 *
@@ -252,7 +252,7 @@ boolean_t osm_lr_rcv_ctrl_is_inited(
 *      called before using     this function.
 *
 * SEE ALSO
-*      Link Recrod Receive Controller object, osm_lr_rcv_ctrl_construct,
+*      Link Record Receive Controller object, osm_lr_rcv_ctrl_construct,
 *      osm_lr_rcv_ctrl_init
 *********/
 
index 8107b2e..35dfd5f 100644 (file)
@@ -35,8 +35,8 @@
 /*
  * Abstract:
  *     Declaration of osm_sa_mad_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
- *     attribute from a node.
+ *     This object represents a controller that receives the IBA SA 
+ *     attributes from a node.
  *     This object is part of the OpenSM family of objects.
  *
  * Environment:
index af2d1bf..ffd6d45 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_mcmr_recv_t.
- *     This object represents the NodeRecord Receiver object.
+ *     This object represents the MCMemberRecord Receiver object.
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Node Info Receiver
+/****h* OpenSM/MCMember Receiver
 * NAME
-*      Node Info Receiver
+*      MCMember Receiver
 *
 * DESCRIPTION
-*      The Node Info Receiver object encapsulates the information
-*      needed to receive the NodeRecord attribute from a node.
+*      The MCMember Receiver object encapsulates the information
+*      needed to receive the MCMemberRecord attribute from a node.
 *
-*      The Node Info Receiver object is thread safe.
+*      The MCMember Receiver object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -87,12 +87,12 @@ BEGIN_C_DECLS
 *      Anil Keshavamurthy, Intel
 *
 *********/
-/****s* OpenSM: Node Info Receiver/osm_mcmr_recv_t
+/****s* OpenSM: MCMember Receiver/osm_mcmr_recv_t
 * NAME
 *      osm_mcmr_recv_t
 *
 * DESCRIPTION
-*      Node Info Receiver structure.
+*      MCMember Receiver structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -129,15 +129,15 @@ typedef struct _osm_mcmr
 *              Pointer to the serializing lock.
 *
 * SEE ALSO
-*      Node Info Receiver object
+*      MCMember Receiver object
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_mcmr_rcv_construct
+/****f* OpenSM: MCMember Receiver/osm_mcmr_rcv_construct
 * NAME
 *      osm_mcmr_rcv_construct
 *
 * DESCRIPTION
-*      This function constructs a Node Info Receiver object.
+*      This function constructs a MCMember Receiver object.
 *
 * SYNOPSIS
 */
@@ -146,7 +146,7 @@ void osm_mcmr_rcv_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Node Info Receiver object to construct.
+*              [in] Pointer to a MCMember Receiver object to construct.
 *
 * RETURN VALUE
 *      This function does not return a value.
@@ -158,11 +158,11 @@ void osm_mcmr_rcv_construct(
 *      method except osm_mcmr_init.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_mcmr_init,
+*      MCMember Receiver object, osm_mcmr_init,
 *      osm_mcmr_rcv_destroy
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_mcmr_rcv_destroy
+/****f* OpenSM: MCMember Receiver/osm_mcmr_rcv_destroy
 * NAME
 *      osm_mcmr_rcv_destroy
 *
@@ -184,23 +184,23 @@ void osm_mcmr_rcv_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Node Info Receiver object.
+*      MCMember Receiver object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_mcmr_rcv_construct or osm_mcmr_init.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_mcmr_rcv_construct,
+*      MCMember Receiver object, osm_mcmr_rcv_construct,
 *      osm_mcmr_init
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_mcmr_rcv_init
+/****f* OpenSM: MCMember Receiver/osm_mcmr_rcv_init
 * NAME
 *      osm_mcmr_init
 *
 * DESCRIPTION
 *      The osm_mcmr_init function initializes a
-*      Node Info Receiver object for use.
+*      MCMember Receiver object for use.
 *
 * SYNOPSIS
 */
@@ -232,23 +232,23 @@ ib_api_status_t osm_mcmr_rcv_init(
 *              [in] Pointer to the OpenSM serializing lock.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Node Info Receiver object was initialized
+*      CL_SUCCESS if the MCMember Receiver object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Node Info Receiver methods.
+*      Allows calling other MCMember Receiver methods.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_mcmr_rcv_construct,
+*      MCMember Receiver object, osm_mcmr_rcv_construct,
 *      osm_mcmr_rcv_destroy
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_mcmr_mcmrocess
+/****f* OpenSM: MCMember Receiver/osm_mcmr_mcmrocess
 * NAME
 *      osm_mcmr_mcmrocess
 *
 * DESCRIPTION
-*      Process the NodeRecord attribute.
+*      Process the MCMemberRecord attribute.
 *
 * SYNOPSIS
 */
@@ -262,16 +262,16 @@ void osm_mcmr_rcv_process(
 *
 *      p_madw
 *              [in] Pointer to the MAD Wrapper containing the MAD
-*              that contains the node's NodeRecord attribute.
+*              that contains the node's MCMemberRecord attribute.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the NodeRecord processing was successful.
+*      CL_SUCCESS if the MCMemberRecord processing was successful.
 *
 * NOTES
-*      This function processes a NodeRecord attribute.
+*      This function processes a MCMemberRecord attribute.
 *
 * SEE ALSO
-*      Node Info Receiver, Node Info Response Controller
+*      MCMember Receiver, MCMember Response Controller
 *********/
 
 
@@ -291,6 +291,7 @@ osm_mcmr_rcv_create_new_mgrp(
                                                                          IN osm_mcmr_recv_t* const p_mcmr,
                                                                          IN uint64_t comp_mask,
                                                                          IN const ib_member_rec_t* const p_recvd_mcmember_rec, 
+                             IN const osm_physp_t* const p_req_physp,
                                                                          OUT osm_mgrp_t **pp_mgrp);
 /*
 * PARAMETERS
@@ -299,6 +300,10 @@ osm_mcmr_rcv_create_new_mgrp(
 *      p_recvd_mcmember_rec
 *              [in] Received Multicast member record
 *
+*  p_req_physp
+*     [in] The requesting osm_physp_t object. 
+*     NULL if the creation is without a requesting port (e.g - ipoib known mcgroups)
+*
 *      pp_mgrp
 *              [out] pointer the osm_mgrp_t object
 *              
index b295c43..6b558f9 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_mcmr_rcv_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
+ *     This object represents a controller that receives the IBA MCMemberRecord 
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Node Info Receive Controller
+/****h* OpenSM/MCMember Receive Controller
 * NAME
-*      Node Info Receive Controller
+*      MCMember Receive Controller
 *
 * DESCRIPTION
-*      The Node Info Receive Controller object encapsulates
-*      the information needed to receive the NodeInfo attribute from a node.
+*      The MCMember Receive Controller object encapsulates
+*      the information needed to receive the MCMemberRecord attribute from a node.
 *
-*      The Node Info Receive Controller object is thread safe.
+*      The MCMember Receive Controller object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -83,12 +83,12 @@ BEGIN_C_DECLS
 *      Ranjit Pandit, Intel
 *
 *********/
-/****s* OpenSM: Node Info Receive Controller/osm_mcmr_rcv_ctrl_t
+/****s* OpenSM: MCMember Receive Controller/osm_mcmr_rcv_ctrl_t
 * NAME
 *      osm_mcmr_rcv_ctrl_t
 *
 * DESCRIPTION
-*      Node Info Receive Controller structure.
+*      MCMember Receive Controller structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -106,7 +106,7 @@ typedef struct _osm_mcmr_rcv_ctrl
 /*
 * FIELDS
 *      p_rcv
-*              Pointer to the Node Info Receiver object.
+*              Pointer to the MCMember Receiver object.
 *
 *      p_log
 *              Pointer to the log object.
@@ -118,16 +118,16 @@ typedef struct _osm_mcmr_rcv_ctrl
 *              Handle returned from dispatcher registration.
 *
 * SEE ALSO
-*      Node Info Receive Controller object
-*      Node Info Receiver object
+*      MCMember Receive Controller object
+*      MCMember Receiver object
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_mcmr_rcv_ctrl_construct
+/****f* OpenSM: MCMember Receive Controller/osm_mcmr_rcv_ctrl_construct
 * NAME
 *      osm_mcmr_rcv_ctrl_construct
 *
 * DESCRIPTION
-*      This function constructs a Node Info Receive Controller object.
+*      This function constructs a MCMember Receive Controller object.
 *
 * SYNOPSIS
 */
@@ -136,7 +136,7 @@ void osm_mcmr_rcv_ctrl_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Node Info Receive Controller
+*              [in] Pointer to a MCMember Receive Controller
 *              object to construct.
 *
 * RETURN VALUE
@@ -150,11 +150,11 @@ void osm_mcmr_rcv_ctrl_construct(
 *      method except osm_mcmr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_mcmr_rcv_ctrl_init,
+*      MCMember Receive Controller object, osm_mcmr_rcv_ctrl_init,
 *      osm_mcmr_rcv_ctrl_destroy, osm_mcmr_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_mcmr_rcv_ctrl_destroy
+/****f* OpenSM: MCMember Receive Controller/osm_mcmr_rcv_ctrl_destroy
 * NAME
 *      osm_mcmr_rcv_ctrl_destroy
 *
@@ -176,23 +176,23 @@ void osm_mcmr_rcv_ctrl_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Node Info Receive Controller object.
+*      MCMember Receive Controller object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_mcmr_rcv_ctrl_construct or osm_mcmr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_mcmr_rcv_ctrl_construct,
+*      MCMember Receive Controller object, osm_mcmr_rcv_ctrl_construct,
 *      osm_mcmr_rcv_ctrl_init
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_mcmr_rcv_ctrl_init
+/****f* OpenSM: MCMember Receive Controller/osm_mcmr_rcv_ctrl_init
 * NAME
 *      osm_mcmr_rcv_ctrl_init
 *
 * DESCRIPTION
 *      The osm_mcmr_rcv_ctrl_init function initializes a
-*      Node Info Receive Controller object for use.
+*      MCMember Receive Controller object for use.
 *
 * SYNOPSIS
 */
@@ -216,18 +216,18 @@ ib_api_status_t osm_mcmr_rcv_ctrl_init(
 *              [in] Pointer to the OpenSM central Dispatcher.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Node Info Receive Controller object was initialized
+*      CL_SUCCESS if the MCMember Receive Controller object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Node Info Receive Controller methods.
+*      Allows calling other MCMember Receive Controller methods.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_mcmr_rcv_ctrl_construct,
+*      MCMember Receive Controller object, osm_mcmr_rcv_ctrl_construct,
 *      osm_mcmr_rcv_ctrl_destroy, osm_mcmr_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_mcmr_ctrl_is_inited
+/****f* OpenSM: MCMember Receive Controller/osm_mcmr_ctrl_is_inited
 * NAME
 *      osm_mcmr_ctrl_is_inited
 *
@@ -252,7 +252,7 @@ boolean_t osm_mcmr_ctrl_is_inited(
 *      called before using     this function.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_mcmr_rcv_ctrl_construct,
+*      MCMember Receive Controller object, osm_mcmr_rcv_ctrl_construct,
 *      osm_mcmr_rcv_ctrl_init
 *********/
 
index 23f65fd..0ce7ac2 100644 (file)
@@ -125,7 +125,7 @@ typedef struct _osm_pr_rcv
 *              Pointer to the serializing lock.
 *
 *      pr_pool
-*              Pool of path record objects used to generate query reponses.
+*              Pool of path record objects used to generate query responses.
 *
 * SEE ALSO
 *      Path Record Receiver object
@@ -267,7 +267,7 @@ osm_pr_rcv_process(
 *      This function processes a PathRecord attribute.
 *
 * SEE ALSO
-*      Path Record Receiver, Node Info Response Controller
+*      Path Record Receiver, Path Record Response Controller
 *********/
 
 END_C_DECLS
index 4e18ff4..541ee03 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_pr_rcv_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
+ *     This object represents a controller that receives the IBA PathRecord 
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Node Info Receive Controller
+/****h* OpenSM/Path Record Receive Controller
 * NAME
-*      Node Info Receive Controller
+*      Path Record Receive Controller
 *
 * DESCRIPTION
-*      The Node Info Receive Controller object encapsulates
-*      the information needed to receive the NodeInfo attribute from a node.
+*      The Path Record Receive Controller object encapsulates
+*      the information needed to receive the PathRecord attribute from a node.
 *
-*      The Node Info Receive Controller object is thread safe.
+*      The Path record Receive Controller object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -83,12 +83,12 @@ BEGIN_C_DECLS
 *      Ranjit Pandit, Intel
 *
 *********/
-/****s* OpenSM: Node Info Receive Controller/osm_pr_rcv_ctrl_t
+/****s* OpenSM: Path Record Receive Controller/osm_pr_rcv_ctrl_t
 * NAME
 *      osm_pr_rcv_ctrl_t
 *
 * DESCRIPTION
-*      Node Info Receive Controller structure.
+*      Path Record Receive Controller structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -106,7 +106,7 @@ typedef struct _osm_pr_rcv_ctrl
 /*
 * FIELDS
 *      p_rcv
-*              Pointer to the Node Info Receiver object.
+*              Pointer to the Path Record Receiver object.
 *
 *      p_log
 *              Pointer to the log object.
@@ -118,16 +118,16 @@ typedef struct _osm_pr_rcv_ctrl
 *              Handle returned from dispatcher registration.
 *
 * SEE ALSO
-*      Node Info Receive Controller object
-*      Node Info Receiver object
+*      Path Record Receive Controller object
+*      Path Record Receiver object
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_pr_rcv_ctrl_construct
+/****f* OpenSM: Path Record Receive Controller/osm_pr_rcv_ctrl_construct
 * NAME
 *      osm_pr_rcv_ctrl_construct
 *
 * DESCRIPTION
-*      This function constructs a Node Info Receive Controller object.
+*      This function constructs a Path Record Receive Controller object.
 *
 * SYNOPSIS
 */
@@ -136,7 +136,7 @@ void osm_pr_rcv_ctrl_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Node Info Receive Controller
+*              [in] Pointer to a Path Record Receive Controller
 *              object to construct.
 *
 * RETURN VALUE
@@ -150,11 +150,11 @@ void osm_pr_rcv_ctrl_construct(
 *      method except osm_pr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_pr_rcv_ctrl_init,
+*      Path Record Receive Controller object, osm_pr_rcv_ctrl_init,
 *      osm_pr_rcv_ctrl_destroy, osm_pr_rcv_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_pr_rcv_ctrl_destroy
+/****f* OpenSM: Path Record Receive Controller/osm_pr_rcv_ctrl_destroy
 * NAME
 *      osm_pr_rcv_ctrl_destroy
 *
@@ -176,23 +176,23 @@ void osm_pr_rcv_ctrl_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Node Info Receive Controller object.
+*      Path Record Receive Controller object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_pr_rcv_ctrl_construct or osm_pr_rcv_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_pr_rcv_ctrl_construct,
+*      Path Record Receive Controller object, osm_pr_rcv_ctrl_construct,
 *      osm_pr_rcv_ctrl_init
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_pr_rcv_ctrl_init
+/****f* OpenSM: Path Record Receive Controller/osm_pr_rcv_ctrl_init
 * NAME
 *      osm_pr_rcv_ctrl_init
 *
 * DESCRIPTION
 *      The osm_pr_rcv_ctrl_init function initializes a
-*      Node Info Receive Controller object for use.
+*      Path Record Receive Controller object for use.
 *
 * SYNOPSIS
 */
@@ -216,18 +216,18 @@ ib_api_status_t osm_pr_rcv_ctrl_init(
 *              [in] Pointer to the OpenSM central Dispatcher.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Node Info Receive Controller object was initialized
+*      CL_SUCCESS if the Path Record Receive Controller object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Node Info Receive Controller methods.
+*      Allows calling other Path Record Receive Controller methods.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_pr_rcv_ctrl_construct,
+*      Path Record Receive Controller object, osm_pr_rcv_ctrl_construct,
 *      osm_pr_rcv_ctrl_destroy, osm_pr_rcv_ctrl_is_inited
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_pr_rcv_ctrl_is_inited
+/****f* OpenSM: Path Record Receive Controller/osm_pr_rcv_ctrl_is_inited
 * NAME
 *      osm_pr_rcv_ctrl_is_inited
 *
@@ -252,7 +252,7 @@ boolean_t osm_pr_rcv_ctrl_is_inited(
 *      called before using     this function.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_pr_rcv_ctrl_construct,
+*      Path Record Receive Controller object, osm_pr_rcv_ctrl_construct,
 *      osm_pr_rcv_ctrl_init
 *********/
 
index 89ad79c..960b0ee 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_pir_rcv_t.
- *     This object represents the NodeRecord Receiver object.
+ *     This object represents the PortInfo Record Receiver object.
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
@@ -75,7 +75,7 @@ BEGIN_C_DECLS
 *
 * DESCRIPTION
 *      The PortInfo Record Receiver object encapsulates the information
-*      needed to receive the NodeRecord attribute from a node.
+*      needed to receive the PortInfoRecord attribute from a node.
 *
 *      The PortInfo Record Receiver object is thread safe.
 *
@@ -249,7 +249,7 @@ osm_pir_rcv_init(
 *      osm_pir_rcv_process
 *
 * DESCRIPTION
-*      Process the NodeRecord attribute.
+*      Process the PortInfoRecord attribute.
 *
 * SYNOPSIS
 */
@@ -264,13 +264,13 @@ osm_pir_rcv_process(
 *
 *      p_madw
 *              [in] Pointer to the MAD Wrapper containing the MAD
-*              that contains the node's NodeRecord attribute.
+*              that contains the node's PortInfoRecord attribute.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the NodeRecord processing was successful.
+*      CL_SUCCESS if the PortInfoRecord processing was successful.
 *
 * NOTES
-*      This function processes a NodeRecord attribute.
+*      This function processes a PortInfoRecord attribute.
 *
 * SEE ALSO
 *      PortInfo Record Receiver, PortInfo Record Response Controller
index 81bea3b..4db1352 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_pir_rcv_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
+ *     This object represents a controller that receives the IBA PortInfo
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
@@ -72,7 +72,7 @@ BEGIN_C_DECLS
 *
 * DESCRIPTION
 *      The PortInfo Record Receive Controller object encapsulates
-*      the information needed to receive the NodeInfo attribute from a node.
+*      the information needed to receive the PortInfo attribute from a node.
 *
 *      The PortInfo Record Receive Controller object is thread safe.
 *
index a7c2369..fcfabe9 100644 (file)
@@ -235,7 +235,7 @@ osm_sa_send_error(
 *              [in] Pointer to an osm_sa_resp_t object.
 *
 *      p_madw
-*              [in] Original MAD to which the reponse must be sent.
+*              [in] Original MAD to which the response must be sent.
 *
 *      sa_status
 *              [in] Status to send in the response.
index a5ca56e..e3d9d82 100644 (file)
@@ -126,7 +126,7 @@ typedef struct _osm_sr_rcv
 *              Pointer to the serializing lock.
 *
 *      sr_pool
-*              Pool of Service Record objects used to generate query reponses.
+*              Pool of Service Record objects used to generate query responses.
 *
 * SEE ALSO
 *      Service Record Receiver object
index d67977d..e472a19 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_smir_rcv_t.
- *     This object represents the NodeRecord Receiver object.
+ *     This object represents the SMInfo Receiver object.
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Node Info Receiver
+/****h* OpenSM/SM Info Receiver
 * NAME
-*      Node Info Receiver
+*      SM Info Receiver
 *
 * DESCRIPTION
-*      The Node Info Receiver object encapsulates the information
-*      needed to receive the NodeRecord attribute from a node.
+*      The SM Info Receiver object encapsulates the information
+*      needed to receive the SMInfoRecord attribute from a node.
 *
-*      The Node Info Receiver object is thread safe.
+*      The SM Info Receiver object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -86,12 +86,12 @@ BEGIN_C_DECLS
 *      Ranjit Pandit, Intel
 *
 *********/
-/****s* OpenSM: Node Info Receiver/osm_smir_rcv_t
+/****s* OpenSM: SM Info Receiver/osm_smir_rcv_t
 * NAME
 *      osm_smir_rcv_t
 *
 * DESCRIPTION
-*      Node Info Receiver structure.
+*      SM Info Receiver structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -114,15 +114,15 @@ typedef struct _osm_smir
 *              Pointer to the Subnet object for this subnet.
 *
 * SEE ALSO
-*      Node Info Receiver object
+*      SM Info Receiver object
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_smir_rcv_construct
+/****f* OpenSM: SM Info Receiver/osm_smir_rcv_construct
 * NAME
 *      osm_smir_rcv_construct
 *
 * DESCRIPTION
-*      This function constructs a Node Info Receiver object.
+*      This function constructs a SM Info Receiver object.
 *
 * SYNOPSIS
 */
@@ -131,7 +131,7 @@ void osm_smir_rcv_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Node Info Receiver object to construct.
+*              [in] Pointer to a SM Info Receiver object to construct.
 *
 * RETURN VALUE
 *      This function does not return a value.
@@ -143,10 +143,10 @@ void osm_smir_rcv_construct(
 *      method except osm_smir_rcv_init.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_smir_rcv_init, osm_smir_rcv_destroy
+*      SM Info Receiver object, osm_smir_rcv_init, osm_smir_rcv_destroy
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_smir_rcv_destroy
+/****f* OpenSM: SM Info Receiver/osm_smir_rcv_destroy
 * NAME
 *      osm_smir_rcv_destroy
 *
@@ -168,23 +168,23 @@ void osm_smir_rcv_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Node Info Receiver object.
+*      SM Info Receiver object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_smir_rcv_construct or osm_smir_rcv_init.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_smir_rcv_construct,
+*      SM Info Receiver object, osm_smir_rcv_construct,
 *      osm_smir_rcv_init
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_smir_rcv_init
+/****f* OpenSM: SM Info Receiver/osm_smir_rcv_init
 * NAME
 *      osm_smir_rcv_init
 *
 * DESCRIPTION
 *      The osm_smir_rcv_init function initializes a
-*      Node Info Receiver object for use.
+*      SM Info Receiver object for use.
 *
 * SYNOPSIS
 */
@@ -217,22 +217,22 @@ ib_api_status_t osm_smir_rcv_init(
 *              [in] Pointer to the OpenSM serializing lock.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Node Info Receiver object was initialized
+*      CL_SUCCESS if the SM Info Receiver object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Node Info Receiver methods.
+*      Allows calling other SM Info Receiver methods.
 *
 * SEE ALSO
-*      Node Info Receiver object, osm_smir_rcv_construct, osm_smir_rcv_destroy
+*      SM Info Receiver object, osm_smir_rcv_construct, osm_smir_rcv_destroy
 *********/
 
-/****f* OpenSM: Node Info Receiver/osm_smir_rcv_process
+/****f* OpenSM: SM Info Receiver/osm_smir_rcv_process
 * NAME
 *      osm_smir_rcv_process
 *
 * DESCRIPTION
-*      Process the NodeRecord attribute.
+*      Process the SMInfoRecord attribute.
 *
 * SYNOPSIS
 */
@@ -246,16 +246,16 @@ void osm_smir_rcv_process(
 *
 *      p_madw
 *              [in] Pointer to the MAD Wrapper containing the MAD
-*              that contains the node's NodeRecord attribute.
+*              that contains the node's SMInfoRecord attribute.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the NodeRecord processing was successful.
+*      CL_SUCCESS if the SMInfoRecord processing was successful.
 *
 * NOTES
-*      This function processes a NodeRecord attribute.
+*      This function processes a SMInfoRecord attribute.
 *
 * SEE ALSO
-*      Node Info Receiver, Node Info Response Controller
+*      SM Info Receiver, SM Info Response Controller
 *********/
 #if 0
 /*
index fd3cd5e..8b2fc4e 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_smir_ctrl_t.
- *     This object represents a controller that receives the IBA NodeInfo
+ *     This object represents a controller that receives the IBA SMInfo
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Node Info Receive Controller
+/****h* OpenSM/SM Info Receive Controller
 * NAME
-*      Node Info Receive Controller
+*      SM Info Receive Controller
 *
 * DESCRIPTION
-*      The Node Info Receive Controller object encapsulates
-*      the information needed to receive the NodeInfo attribute from a node.
+*      The SM Info Receive Controller object encapsulates
+*      the information needed to receive the SMInfo attribute from a node.
 *
-*      The Node Info Receive Controller object is thread safe.
+*      The SM Info Receive Controller object is thread safe.
 *
 *      This object should be treated as opaque and should be
 *      manipulated only through the provided functions.
@@ -83,12 +83,12 @@ BEGIN_C_DECLS
 *      Ranjit Pandit, Intel
 *
 *********/
-/****s* OpenSM: Node Info Receive Controller/osm_smir_ctrl_t
+/****s* OpenSM: SM Info Receive Controller/osm_smir_ctrl_t
 * NAME
 *      osm_smir_ctrl_t
 *
 * DESCRIPTION
-*      Node Info Receive Controller structure.
+*      SM Info Receive Controller structure.
 *
 *      This object should be treated as opaque and should
 *      be manipulated only through the provided functions.
@@ -106,7 +106,7 @@ typedef struct _osm_smir_ctrl
 /*
 * FIELDS
 *      p_rcv
-*              Pointer to the Node Info Receiver object.
+*              Pointer to the SM Info Receiver object.
 *
 *      p_log
 *              Pointer to the log object.
@@ -118,16 +118,16 @@ typedef struct _osm_smir_ctrl
 *              Handle returned from dispatcher registration.
 *
 * SEE ALSO
-*      Node Info Receive Controller object
-*      Node Info Receiver object
+*      SM Info Receive Controller object
+*      SM Info Receiver object
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_smir_ctrl_construct
+/****f* OpenSM: SM Info Receive Controller/osm_smir_ctrl_construct
 * NAME
 *      osm_smir_ctrl_construct
 *
 * DESCRIPTION
-*      This function constructs a Node Info Receive Controller object.
+*      This function constructs a SM Info Receive Controller object.
 *
 * SYNOPSIS
 */
@@ -136,7 +136,7 @@ void osm_smir_ctrl_construct(
 /*
 * PARAMETERS
 *      p_ctrl
-*              [in] Pointer to a Node Info Receive Controller
+*              [in] Pointer to a SM Info Receive Controller
 *              object to construct.
 *
 * RETURN VALUE
@@ -149,11 +149,11 @@ void osm_smir_ctrl_construct(
 *      method except osm_smir_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_smir_ctrl_init,
+*      SM Info Receive Controller object, osm_smir_ctrl_init,
 *      osm_smir_ctrl_destroy
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_smir_ctrl_destroy
+/****f* OpenSM: SM Info Receive Controller/osm_smir_ctrl_destroy
 * NAME
 *      osm_smir_ctrl_destroy
 *
@@ -175,23 +175,23 @@ void osm_smir_ctrl_destroy(
 *
 * NOTES
 *      Performs any necessary cleanup of the specified
-*      Node Info Receive Controller object.
+*      SM Info Receive Controller object.
 *      Further operations should not be attempted on the destroyed object.
 *      This function should only be called after a call to
 *      osm_smir_ctrl_construct or osm_smir_ctrl_init.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_smir_ctrl_construct,
+*      SM Info Receive Controller object, osm_smir_ctrl_construct,
 *      osm_smir_ctrl_init
 *********/
 
-/****f* OpenSM: Node Info Receive Controller/osm_smir_ctrl_init
+/****f* OpenSM: SM Info Receive Controller/osm_smir_ctrl_init
 * NAME
 *      osm_smir_ctrl_init
 *
 * DESCRIPTION
 *      The osm_smir_ctrl_init function initializes a
-*      Node Info Receive Controller object for use.
+*      SM Info Receive Controller object for use.
 *
 * SYNOPSIS
 */
@@ -215,14 +215,14 @@ ib_api_status_t osm_smir_ctrl_init(
 *              [in] Pointer to the OpenSM central Dispatcher.
 *
 * RETURN VALUES
-*      CL_SUCCESS if the Node Info Receive Controller object was initialized
+*      CL_SUCCESS if the SM Info Receive Controller object was initialized
 *      successfully.
 *
 * NOTES
-*      Allows calling other Node Info Receive Controller methods.
+*      Allows calling other SM Info Receive Controller methods.
 *
 * SEE ALSO
-*      Node Info Receive Controller object, osm_smir_ctrl_construct,
+*      SM Info Receive Controller object, osm_smir_ctrl_construct,
 *      osm_smir_ctrl_destroy
 *********/
 
index 3522d15..18d6547 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Abstract:
  *     Declaration of osm_vlarb_rec_rcv_t.
- *     This object represents the NodeRecord Receiver object.
+ *     This object represents the VLArbitration Record Receiver object.
  *     attribute from a node.
  *     This object is part of the OpenSM family of objects.
  *
index 4698e37..fd0cd3f 100644 (file)
@@ -66,9 +66,9 @@
 
 BEGIN_C_DECLS
 
-/****h* OpenSM/Vlarbitration Record Receive Controller
+/****h* OpenSM/VLArbitration Record Receive Controller
 * NAME
-*      Vlarbitration Record Receive Controller
+*      VLArbitration Record Receive Controller
 *
 * DESCRIPTION
 *      The VLArbitration Record Receive Controller object encapsulates
index 78efd12..0934eaf 100644 (file)
@@ -71,6 +71,7 @@
 #include <opensm/osm_ucast_mgr.h>
 #include <opensm/osm_link_mgr.h>
 #include <opensm/osm_drop_mgr.h>
+#include <opensm/osm_pkey_mgr.h>
 #include <opensm/osm_lin_fwd_rcv_ctrl.h>
 #include <opensm/osm_mcast_fwd_rcv_ctrl.h>
 #include <opensm/osm_sweep_fail_ctrl.h>
@@ -158,6 +159,7 @@ typedef struct _osm_sm
   osm_link_mgr_t           link_mgr;
   osm_state_mgr_t          state_mgr;
   osm_drop_mgr_t           drop_mgr;
+  osm_pkey_mgr_t           pkey_mgr;
   osm_lft_rcv_t            lft_rcv;
   osm_lft_rcv_ctrl_t       lft_rcv_ctrl;
   osm_mft_rcv_t            mft_rcv;
@@ -537,8 +539,8 @@ osm_sm_wait_for_subnet_up(
 }
 /*
 * PARAMETERS
-*      p_osm
-*              [in] Pointer to an osm_opensm_t object.
+*      p_sm
+*              [in] Pointer to an osm_sm_t object.
 *
 *      wait_us 
 *              [in] Number of microseconds to wait.
index 0d83607..17ea7e8 100644 (file)
@@ -57,6 +57,7 @@
 #include <opensm/osm_mcast_mgr.h>
 #include <opensm/osm_link_mgr.h>
 #include <opensm/osm_drop_mgr.h>
+#include <opensm/osm_pkey_mgr.h>
 #include <opensm/osm_sm_mad_ctrl.h>
 #include <opensm/osm_log.h>
 
@@ -109,6 +110,7 @@ typedef struct _osm_state_mgr
   osm_mcast_mgr_t                      *p_mcast_mgr;
   osm_link_mgr_t                               *p_link_mgr;
   osm_drop_mgr_t                               *p_drop_mgr;
+  osm_pkey_mgr_t                               *p_pkey_mgr;
   osm_req_t                                    *p_req;
   osm_stats_t                                  *p_stats;
   struct _osm_sm_state_mgr  *p_sm_state_mgr;
@@ -146,6 +148,9 @@ typedef struct _osm_state_mgr
 *      p_drop_mgr
 *              Pointer to the Drop Manager object.
 *
+*      p_pkey_mgr
+*              Pointer to the P_Key Manager object.
+* 
 *      p_req
 *              Pointer to the Requester object sending SMPs.
 *
@@ -371,6 +376,7 @@ osm_state_mgr_init(
        IN osm_mcast_mgr_t*                     const p_mcast_mgr,
        IN osm_link_mgr_t*                      const p_link_mgr,
        IN osm_drop_mgr_t*                      const p_drop_mgr,
+       IN osm_pkey_mgr_t*                      const p_pkey_mgr,
        IN osm_req_t*                           const p_req,
    IN osm_stats_t*               const p_stats,
    IN struct _osm_sm_state_mgr*  const p_sm_state_mgr,
@@ -402,6 +408,9 @@ osm_state_mgr_init(
 *      p_drop_mgr
 *              [in] Pointer to the Drop Manager object.
 *
+*      p_pkey_mgr
+*              [in] Pointer to the P_Key Manager object.
+*  
 *      p_req
 *              [in] Pointer to the Request Controller object.
 *
index 2ec5a2a..c8c5e26 100644 (file)
@@ -218,7 +218,8 @@ typedef struct _osm_subn_opt
   char *                   dump_files_dir;
   char *                   log_file;
   boolean_t                accum_log_file;
-  cl_map_t                 port_pro_ignore_guids;
+  boolean_t                console;
+  cl_map_t                 port_prof_ignore_guids;
   boolean_t                port_profile_switch_nodes;
   uint32_t                 max_port_profile;
   osm_pfn_ui_extension_t   pfn_ui_pre_lid_assign;
@@ -231,6 +232,7 @@ typedef struct _osm_subn_opt
   osm_testability_modes_t  testability_mode;
   boolean_t                updn_activate;
   char *                   updn_guid_file;
+  boolean_t                exit_on_fatal;
 } osm_subn_opt_t;
 /*
 * FIELDS
@@ -321,7 +323,7 @@ typedef struct _osm_subn_opt
 *     If TRUE (default) - the log file will be accumulated.
 *     If FALSE - the log file will be erased before starting current opensm run.
 *
-*  port_pro_ignore_guids
+*  port_prof_ignore_guids
 *     A map of guids to be ignored by port profiling.
 *
 *  port_profile_switch_nodes
@@ -368,6 +370,13 @@ typedef struct _osm_subn_opt
 *  updn_guid_file
 *     Pointer to name of the UPDN guid file given by User
 *
+*  exit_on_fatal
+*     If TRUE (default) - SM will exit on fatal subnet initialization issues.
+*     If FALSE - SM will not exit.
+*     Fatal initialization issues:
+*     a. SM recognizes 2 different nodes with the same guid, or 12x link with
+*        lane reversal badly configured.
+*
 * SEE ALSO
 *      Subnet object
 *********/
index 320a45b..ffcfa8b 100644 (file)
@@ -125,7 +125,7 @@ typedef struct _osm_switch
        ib_switch_info_t                        switch_info;
        osm_fwd_tbl_t                           fwd_tbl;
        osm_lid_matrix_t                        lmx;
-       osm_port_profile_t                      *p_pro;
+       osm_port_profile_t                      *p_prof;
        osm_mcast_tbl_t                         mcast_tbl;
        uint32_t                                        discovery_count;
 
@@ -962,13 +962,13 @@ osm_switch_set_path(
        IN osm_switch_t* const p_sw,
        IN const uint16_t lid_ho,
        IN const uint8_t port,
-       IN const boolean_t ignore_port_pro
+       IN const boolean_t ignore_port_prof
        )
 {
        CL_ASSERT( p_sw );
        osm_fwd_tbl_set( &p_sw->fwd_tbl, lid_ho, port );
-       if (! ignore_port_pro)
-         osm_port_pro_path_count_inc( &p_sw->p_pro[port] );
+       if (! ignore_port_prof)
+         osm_port_prof_path_count_inc( &p_sw->p_prof[port] );
 }
 /*
 * PARAMETERS
@@ -1253,7 +1253,7 @@ osm_switch_path_count_get(
        IN const osm_switch_t* const p_sw,
        IN const uint8_t port_num )
 {
-       return( osm_port_pro_path_count_get( &p_sw->p_pro[port_num] ) );
+       return( osm_port_prof_path_count_get( &p_sw->p_prof[port_num] ) );
 }
 /*
 * PARAMETERS
diff --git a/ulp/opensm/user/include/opensm/osm_version.h b/ulp/opensm/user/include/opensm/osm_version.h
new file mode 100644 (file)
index 0000000..e1c4687
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+
+#ifndef _OSM_VERSION_H_
+#define _OSM_VERSION_H_
+
+#ifdef __cplusplus
+#  define BEGIN_C_DECLS extern "C" {
+#  define END_C_DECLS   }
+#else /* !__cplusplus */
+#  define BEGIN_C_DECLS
+#  define END_C_DECLS
+#endif /* __cplusplus */
+
+BEGIN_C_DECLS
+
+/****s* OpenSM: Base/OSM_VERSION
+* NAME
+*      OSM_VERSION
+*
+* DESCRIPTION
+*      The version string for OpenSM 
+*
+* SYNOPSIS
+*/
+#define OSM_VERSION "OpenSM Rev:openib-1.2.0"
+/********/
+
+END_C_DECLS
+
+#endif /* _OSM_VERSION_H_ */
index 2e53298..b2cb8c6 100644 (file)
@@ -37,6 +37,8 @@
 #ifndef ST_INCLUDED
 #define ST_INCLUDED
 
+#include <stdlib.h>
+
 #ifdef __cplusplus
 #  define BEGIN_C_DECLS extern "C" {
 #  define END_C_DECLS   }
@@ -76,11 +78,11 @@ struct st_table {
 enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE};
 
 st_table *st_init_table(struct st_hash_type *);
-st_table *st_init_table_with_size(struct st_hash_type *, int);
+st_table *st_init_table_with_size(struct st_hash_type *, size_t);
 st_table *st_init_numtable(void);
-st_table *st_init_numtable_with_size(int);
+st_table *st_init_numtable_with_size(size_t);
 st_table *st_init_strtable(void);
-st_table *st_init_strtable_with_size(int);
+st_table *st_init_strtable_with_size(size_t);
 int st_delete(st_table *, st_data_t *, st_data_t *);
 int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
 int st_insert(st_table *, st_data_t, st_data_t);
index bac57b3..40bbcd3 100644 (file)
@@ -271,7 +271,7 @@ ib_get_sa_method_str(
     method = method & 0x7f;
     if( method >= OSM_SA_METHOD_STR_UNKNOWN_VAL  )
       method = OSM_SA_METHOD_STR_UNKNOWN_VAL;
-    /* it is a response - use the reponse table */
+    /* it is a response - use the response table */
     return( __ib_sa_resp_method_str[method] );
   }
   else
@@ -646,7 +646,7 @@ osm_dump_port_info(
              cl_ntoh16( p_pi->q_key_violations ),
              p_pi->guid_cap,
              ib_port_info_get_client_rereg( p_pi ),
-             ib_port_info_get_timeout(p_pi),
+             ib_port_info_get_timeout( p_pi ),
              p_pi->resp_time_value,
              p_pi->error_threshold
              );
@@ -661,7 +661,6 @@ osm_dump_port_info(
 
 /**********************************************************************
  **********************************************************************/
-
 void
 osm_dump_portinfo_record(
   IN osm_log_t* const p_log,
@@ -758,6 +757,49 @@ osm_dump_portinfo_record(
   }
 }
 
+/**********************************************************************
+ **********************************************************************/
+void
+osm_dump_guidinfo_record(
+  IN osm_log_t* const p_log,
+  IN const ib_guidinfo_record_t* const p_gir,
+  IN const osm_log_level_t log_level )
+{
+  const ib_guid_info_t * const p_gi = &p_gir->guid_info;
+
+  if( osm_log_is_active( p_log, log_level ) )
+  {
+    osm_log( p_log, log_level,
+             "GUIDInfo Record dump:\n"
+             "\t\t\t\tRID\n"
+             "\t\t\t\tLid.....................0x%X\n"
+             "\t\t\t\tBlockNum................0x%X\n"
+             "\t\t\t\tReserved................0x%X\n"
+             "\t\t\t\tGUIDInfo dump\n"
+             "\t\t\t\tReserved................0x%X\n"
+             "\t\t\t\tGUID 0..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 1..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 2..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 3..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 4..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 5..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 6..................0x%016" PRIx64 "\n"
+             "\t\t\t\tGUID 7..................0x%016" PRIx64 "\n",
+             cl_ntoh16(p_gir->lid),
+             p_gir->block_num,
+             p_gir->resv,
+             cl_ntoh32(p_gir->reserved),
+             cl_ntoh64(p_gi->guid[0]),
+             cl_ntoh64(p_gi->guid[1]),
+             cl_ntoh64(p_gi->guid[2]),
+             cl_ntoh64(p_gi->guid[3]),
+             cl_ntoh64(p_gi->guid[4]),
+             cl_ntoh64(p_gi->guid[5]),
+             cl_ntoh64(p_gi->guid[6]),
+             cl_ntoh64(p_gi->guid[7])
+           );
+  }
+}
 
 /**********************************************************************
  **********************************************************************/
@@ -925,11 +967,14 @@ osm_dump_mc_record(
              "0x%016" PRIx64 "\n"
              "\t\t\t\tqkey....................0x%X\n"
              "\t\t\t\tMlid....................0x%X\n"
-             "\t\t\t\tScopeState..............0x%X\n"
-             "\t\t\t\tRate....................0x%X\n"
              "\t\t\t\tMtu.....................0x%X\n"
              "\t\t\t\tTClass..................0x%X\n"
+             "\t\t\t\tpkey....................0x%X\n"
+             "\t\t\t\tRate....................0x%X\n"
+             "\t\t\t\tPacketLife..............0x%X\n"
              "\t\t\t\tSLFlowLabelHopLimit.....0x%X\n"
+             "\t\t\t\tScopeState..............0x%X\n"
+             "\t\t\t\tProxyJoin...............0x%X\n"
              "",
              cl_ntoh64( p_mcmr->mgid.unicast.prefix ),
              cl_ntoh64( p_mcmr->mgid.unicast.interface_id ),
@@ -937,16 +982,18 @@ osm_dump_mc_record(
              cl_ntoh64( p_mcmr->port_gid.unicast.interface_id ),
              cl_ntoh32( p_mcmr->qkey ),
              cl_ntoh16( p_mcmr->mlid ),
-             p_mcmr->scope_state,
-             p_mcmr->rate,
              p_mcmr->mtu,
              p_mcmr->tclass,
-             cl_ntoh32( p_mcmr->sl_flow_hop )
+             cl_ntoh16( p_mcmr->pkey ),
+             p_mcmr->rate,
+             p_mcmr->pkt_life,
+             cl_ntoh32( p_mcmr->sl_flow_hop ),
+             p_mcmr->scope_state,
+             p_mcmr->proxy_join
              );
   }
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -1021,7 +1068,6 @@ osm_dump_service_record(
              "\t\t\t\tServiceData64.1.........0x%016" PRIx64 "\n"
              "\t\t\t\tServiceData64.2.........0x%016" PRIx64 "\n"
              "",
-
              cl_ntoh64( p_sr->service_id ),
              cl_ntoh64( p_sr->service_gid.unicast.prefix ),
              cl_ntoh64( p_sr->service_gid.unicast.interface_id ),
@@ -1129,7 +1175,6 @@ osm_dump_inform_info(
   }
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -1176,7 +1221,7 @@ osm_dump_switch_info(
              "\t\t\t\tdef_mcast_not_port......0x%X\n"
              "\t\t\t\tlife_state..............0x%X\n"
              "\t\t\t\tlids_per_port...........0x%X\n"
-             "\t\t\t\tenforce_cap.............0x%X\n"
+             "\t\t\t\tpartition_enf_cap.......0x%X\n"
              "\t\t\t\tflags...................0x%X\n"
              "",
              cl_ntoh16( p_si->lin_cap ),
@@ -1194,7 +1239,6 @@ osm_dump_switch_info(
   }
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -1229,7 +1273,6 @@ osm_dump_pkey_block(
   }
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -1244,6 +1287,7 @@ osm_dump_slvl_map_table(
   uint8_t i;
   char buf_line1[1024];
   char buf_line2[1024];
+
   if( osm_log_is_active( p_log, log_level ) )
   {
     buf_line1[0] = '\0';
@@ -1278,6 +1322,7 @@ osm_dump_vl_arb_table(
   int i;
   char buf_line1[1024];
   char buf_line2[1024];
+
   if( osm_log_is_active( p_log, log_level ) )
   {
     buf_line1[0] = '\0';
@@ -1336,6 +1381,7 @@ osm_dump_notice(
 {
   char buff[1024];
   buff[0] = '\0';
+
   if( osm_log_is_active( p_log, log_level ) )
   {
     if (ib_notice_is_generic(p_ntci))
@@ -1458,9 +1504,7 @@ osm_dump_dr_smp(
              "\t\t\t\tattr_id.................0x%X (%s)\n"
              "\t\t\t\tresv....................0x%X\n"
              "\t\t\t\tattr_mod................0x%X\n"
-             "\t\t\t\tm_key...................0x%016" PRIx64 "\n"
-             "\t\t\t\tdr_slid.................0x%X\n"
-             "\t\t\t\tdr_dlid.................0x%X\n",
+             "\t\t\t\tm_key...................0x%016" PRIx64 "\n",
              p_smp->hop_ptr,
              p_smp->hop_count,
              cl_ntoh64(p_smp->trans_id),
@@ -1468,14 +1512,20 @@ osm_dump_dr_smp(
              ib_get_sm_attr_str( p_smp->attr_id ),
              cl_ntoh16(p_smp->resv),
              cl_ntoh32(p_smp->attr_mod),
-             cl_ntoh64(p_smp->m_key),
-             cl_ntoh16(p_smp->dr_slid),
-             cl_ntoh16(p_smp->dr_dlid)
+             cl_ntoh64(p_smp->m_key)
              );
     strcat( buf, line );
 
     if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)
     {
+      sprintf( line,
+               "\t\t\t\tdr_slid.................0x%X\n"
+               "\t\t\t\tdr_dlid.................0x%X\n",
+               cl_ntoh16(p_smp->dr_slid),
+               cl_ntoh16(p_smp->dr_dlid)
+               );
+      strcat( buf, line );
+
       strcat( buf, "\n\t\t\t\tInitial path: " );
 
       for( i = 0; i <= p_smp->hop_count; i++ )
@@ -1653,7 +1703,7 @@ osm_dump_smp_dr_path(
 
   if( osm_log_is_active( p_log, log_level) )
   {
-    sprintf( buf, "Received SMP on a %u hop path:"
+    sprintf( buf, "Received SMP on a %u hop path:"
              "\n\t\t\t\tInitial path = ", p_smp->hop_count );
 
     for( i = 0; i <= p_smp->hop_count; i++ )
@@ -1699,19 +1749,22 @@ const char* const __osm_sm_state_str[] =
   "OSM_SM_STATE_SET_LINK_PORTS",                 /* 19 */
   "OSM_SM_STATE_SET_LINK_PORTS_WAIT",               /* 20 */
   "OSM_SM_STATE_SET_LINK_PORTS_DONE",               /* 21 */
-  "OSM_SM_STATE_SET_ARMED",                /* 19 */
-  "OSM_SM_STATE_SET_ARMED_WAIT",              /* 20 */
-  "OSM_SM_STATE_SET_ARMED_DONE",              /* 21 */
-  "OSM_SM_STATE_SET_ACTIVE",                  /* 22 */
-  "OSM_SM_STATE_SET_ACTIVE_WAIT",             /* 23 */
-  "OSM_SM_STATE_LOST_NEGOTIATION",            /* 24 */
-  "OSM_SM_STATE_STANDBY",                     /* 25 */
-  "OSM_SM_STATE_SUBNET_UP",                /* 26 */
-  "OSM_SM_STATE_PROCESS_REQUEST",             /* 27 */
-  "OSM_SM_STATE_PROCESS_REQUEST_WAIT",        /* 28 */
-  "OSM_SM_STATE_PROCESS_REQUEST_DONE",        /* 29 */
-  "OSM_SM_STATE_MASTER_OR_HIGHER_SM_DETECTED",  /* 30 */
-  "UNKNOWN STATE!!"                        /* 31 */
+  "OSM_SM_STATE_SET_ARMED",                   /* 22 */
+  "OSM_SM_STATE_SET_ARMED_WAIT",              /* 23 */
+  "OSM_SM_STATE_SET_ARMED_DONE",              /* 24 */
+  "OSM_SM_STATE_SET_ACTIVE",                  /* 25 */
+  "OSM_SM_STATE_SET_ACTIVE_WAIT",             /* 26 */
+  "OSM_SM_STATE_LOST_NEGOTIATION",            /* 27 */
+  "OSM_SM_STATE_STANDBY",                     /* 28 */
+  "OSM_SM_STATE_SUBNET_UP",                   /* 29 */
+  "OSM_SM_STATE_PROCESS_REQUEST",             /* 30 */
+  "OSM_SM_STATE_PROCESS_REQUEST_WAIT",        /* 31 */
+  "OSM_SM_STATE_PROCESS_REQUEST_DONE",        /* 32 */
+  "OSM_SM_STATE_MASTER_OR_HIGHER_SM_DETECTED",/* 33 */
+  "OSM_SM_STATE_SET_PKEY",                    /* 34 */
+  "OSM_SM_STATE_SET_PKEY_WAIT",               /* 35 */
+  "OSM_SM_STATE_SET_PKEY_DONE",               /* 36 */
+  "UNKNOWN STATE!!"                           /* 37 */
 };
 
 const char* const __osm_sm_signal_str[] =
@@ -1847,9 +1900,11 @@ osm_get_node_type_str_fixed_width(
 #define OSM_VENDOR_ID_FUJITSU    0x00E000
 #define OSM_VENDOR_ID_FUJITSU2      0x000B5D
 #define OSM_VENDOR_ID_VOLTAIRE   0x0008F1
-#define OSM_VENDOR_ID_YOTTAYOTTA    0x000453
+#define OSM_VENDOR_ID_YOTTAYOTTA    0x000453   /* Also, Obsidian Research */
 #define OSM_VENDOR_ID_PATHSCALE     0x001175
 #define OSM_VENDOR_ID_IBM           0x000255
+#define OSM_VENDOR_ID_DIVERGENET    0x00084E
+#define OSM_VENDOR_ID_FLEXTRONICS   0x000B8C
 
 /**********************************************************************
  **********************************************************************/
@@ -1867,6 +1922,8 @@ osm_get_manufacturer_str(
   static const char* yotta_str         = "YottaYotta ";
   static const char* pathscale_str     = "PathScale  ";
   static const char* ibm_str           = "IBM        ";
+  static const char* divergenet_str    = "DivergeNet ";
+  static const char* flextronics_str   = "Flextronics ";
   static const char* unknown_str       = "Unknown    ";
 
   switch( (uint32_t)(guid_ho >> (5 * 8)) )
@@ -1892,6 +1949,10 @@ osm_get_manufacturer_str(
     return( pathscale_str );
   case OSM_VENDOR_ID_IBM:
     return( ibm_str );
+  case OSM_VENDOR_ID_DIVERGENET:
+    return( divergenet_str );
+  case OSM_VENDOR_ID_FLEXTRONICS:
+    return( flextronics_str );
   default:
     return( unknown_str );
   }
index 113d967..9034cdf 100644 (file)
@@ -101,7 +101,6 @@ osm_log(
   tim = time_usecs/1000000;
   usecs = time_usecs % 1000000;
   localtime_r(&tim, &result);
-
 #endif /* WIN32 */
 
   /* If this is a call to syslog - always print it */
@@ -136,7 +135,6 @@ osm_log(
 #endif    
   }
 
-
   /* SYS messages go to the log anyways */
   if (p_log->level & verbosity)
   {
index a260ade..e8eb792 100644 (file)
@@ -107,6 +107,7 @@ osm_mad_pool_init(
   IN osm_log_t* const p_log )
 {
   ib_api_status_t status;
+
   OSM_LOG_ENTER( p_log, osm_mad_pool_init );
 
   p_pool->p_log = p_log;
@@ -124,7 +125,7 @@ osm_mad_pool_init(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_mad_pool_init: ERR 0702: "
-             "Grow pool initialization failed (%s).\n",
+             "Grow pool initialization failed (%s)\n",
              ib_get_err_str(status) );
     goto Exit;
   }
@@ -159,7 +160,7 @@ osm_mad_pool_get(
   {
     osm_log( p_pool->p_log, OSM_LOG_ERROR,
              "osm_mad_pool_get: ERR 0703: "
-             "Unable to acquire MAD wrapper object.\n" );
+             "Unable to acquire MAD wrapper object\n" );
     goto Exit;
   }
 
@@ -174,7 +175,7 @@ osm_mad_pool_get(
   {
     osm_log( p_pool->p_log, OSM_LOG_ERROR,
              "osm_mad_pool_get: ERR 0704: "
-             "Unable to acquire wire MAD.\n" );
+             "Unable to acquire wire MAD\n" );
 
     /* Don't leak wrappers! */
     cl_qlock_pool_put( &p_pool->madw_pool, (cl_pool_item_t*)p_madw );
@@ -190,7 +191,7 @@ osm_mad_pool_get(
 
   osm_log( p_pool->p_log, OSM_LOG_DEBUG,
            "osm_mad_pool_get: Acquired p_madw = %p, p_mad = %p, "
-           "size = %u.\n", p_madw, p_madw->p_mad, total_size );
+           "size = %u\n", p_madw, p_madw->p_mad, total_size );
 
  Exit:
   OSM_LOG_EXIT( p_pool->p_log );
@@ -223,7 +224,7 @@ osm_mad_pool_get_wrapper(
   {
     osm_log( p_pool->p_log, OSM_LOG_ERROR,
              "osm_mad_pool_get_wrapper: ERR 0705: "
-             "Unable to acquire MAD wrapper object.\n" );
+             "Unable to acquire MAD wrapper object\n" );
     goto Exit;
   }
 
@@ -257,7 +258,7 @@ osm_mad_pool_get_wrapper_raw(
 
   osm_log( p_pool->p_log, OSM_LOG_DEBUG,
            "osm_mad_pool_get_wrapper_raw: "
-           "Getting p_madw = %p.\n", p_madw );
+           "Getting p_madw = %p\n", p_madw );
 
   osm_madw_init( p_madw, 0, 0, 0 );
   osm_madw_set_mad( p_madw, 0 );
@@ -267,7 +268,6 @@ osm_mad_pool_get_wrapper_raw(
   return( p_madw );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -280,7 +280,7 @@ osm_mad_pool_put(
   CL_ASSERT( p_madw );
 
   osm_log( p_pool->p_log, OSM_LOG_DEBUG,
-           "osm_mad_pool_put: Releasing p_madw = %p, p_mad = %p.\n",
+           "osm_mad_pool_put: Releasing p_madw = %p, p_mad = %p\n",
            p_madw, p_madw->p_mad );
 
   /*
index f53685d..f432df6 100644 (file)
@@ -37,6 +37,7 @@
 #  include <config.h>
 #endif /* HAVE_CONFIG_H */
 
+#include <complib/cl_debug.h>
 #include <complib/cl_timer.h>
 #include <vendor/osm_vendor_api.h>
 #include <vendor/osm_vendor_sa_api.h>
@@ -204,7 +205,7 @@ __osmv_sa_mad_err_cb(
 
   /* Obtain the sent context etc */
   p_query_req_copy =
-    (osmv_query_req_t *)(p_madw->context.arb_context.context1);
+       (osmv_query_req_t *)(p_madw->context.arb_context.context1);
 
   /* provide the context of the original request in the result */
   query_res.query_context = p_query_req_copy->query_context;
index 29324d0..9a10e43 100644 (file)
@@ -44,6 +44,7 @@ SOURCES=\
         osm_node_info_rcv_ctrl.c \
         osm_opensm.c \
         osm_pkey.c \
+        osm_pkey_mgr.c \
         osm_pkey_rcv.c \
         osm_pkey_rcv_ctrl.c \
         osm_port.c \
@@ -56,6 +57,8 @@ SOURCES=\
         osm_sa.c \
         osm_sa_class_port_info.c \
         osm_sa_class_port_info_ctrl.c \
+        osm_sa_guidinfo_record.c \
+        osm_sa_guidinfo_record_ctrl.c \
         osm_sa_informinfo.c \
         osm_sa_informinfo_ctrl.c \
         osm_sa_lft_record.c \
index 97cceb2..d657cdf 100644 (file)
@@ -37,8 +37,8 @@
 #endif /* HAVE_CONFIG_H */
 
 #include <math.h>
-#include <complib/cl_debug.h>
 #include <opensm/cl_event_wheel.h>
+#include <complib/cl_debug.h>
 
 cl_status_t
 __event_will_age_before(
@@ -184,7 +184,7 @@ __cl_event_wheel_callback( IN void* context )
     if (cl_status != CL_SUCCESS)
     {
       osm_log (p_event_wheel->p_log, OSM_LOG_ERROR,
-               "__cl_event_wheel_callback : ERROR 1000: "
+               "__cl_event_wheel_callback : ERR 6100: "
                "Failed to start timer\n" );
     }
   }
@@ -228,7 +228,7 @@ cl_event_wheel_init(
   if (cl_status != CL_SUCCESS)
   {
     osm_log (p_event_wheel->p_log, OSM_LOG_ERROR,
-             "cl_event_wheel_init : ERROR 1000: "
+             "cl_event_wheel_init : ERR 6101: "
              "Failed to initialize cl_spinlock\n" );
     goto Exit;
   }
@@ -243,7 +243,7 @@ cl_event_wheel_init(
   if (cl_status != CL_SUCCESS)
   {
     osm_log (p_event_wheel->p_log, OSM_LOG_ERROR,
-             "cl_event_wheel_init : ERROR 1000: "
+             "cl_event_wheel_init : ERR 6102: "
              "Failed to initialize cl_timer\n" );
     goto Exit;
   }
@@ -282,7 +282,7 @@ cl_event_wheel_dump(
   p_list_item = cl_qlist_head(&p_event_wheel->events_wheel);
   osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
            "cl_event_wheel_dump: "
-           "event_wheel ptr:%p \n",
+           "event_wheel ptr:%p\n",
            p_event_wheel);
 
   while (p_list_item != cl_qlist_end(&p_event_wheel->events_wheel) )
@@ -290,7 +290,7 @@ cl_event_wheel_dump(
     p_event = PARENT_STRUCT(p_list_item, cl_event_wheel_reg_info_t, list_item);
     osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
              "cl_event_wheel_dump: "
-             "Found event key:<0x%"PRIx64">, aging time:%" PRIu64".\n",
+             "Found event key:<0x%"PRIx64">, aging time:%" PRIu64"\n",
              p_event->key, p_event->aging_time );
     p_list_item = cl_qlist_next( p_list_item );
   }
@@ -320,7 +320,7 @@ cl_event_wheel_destroy(
 
     osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
              "cl_event_wheel_destroy: "
-             "Found outstanding event key:<0x%"PRIx64">.\n",
+             "Found outstanding event key:<0x%"PRIx64">\n",
              p_event->key );
 
     /* remove it from the map */
@@ -351,6 +351,7 @@ cl_event_wheel_reg(
 {
   cl_event_wheel_reg_info_t *p_event;
   uint64_t timeout;
+  uint32_t to;
   cl_status_t cl_status = CL_SUCCESS;
   cl_list_item_t *prev_event_list_item;
   cl_map_item_t  *p_map_item;
@@ -394,7 +395,7 @@ cl_event_wheel_reg(
 
   osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
            "cl_event_wheel_reg: "
-           "Registering event key:0x%"PRIx64" aging in %u [msec].\n",
+           "Registering event key:0x%"PRIx64" aging in %u [msec]\n",
            p_event->key,
            (uint32_t)((p_event->aging_time - cl_get_time_stamp()) / 1000 ));
 
@@ -425,21 +426,22 @@ cl_event_wheel_reg(
 
     /* The timeout for the cl_timer_start should be given as uint32_t.
        if there is an overflow - warn about it. */
+    to = (uint32_t)timeout;
     if ( timeout > (uint32_t)timeout )
     {
+      to = 0xffffffff; /* max 32 bit timer */
       osm_log (p_event_wheel->p_log, OSM_LOG_INFO,
                "cl_event_wheel_reg: "
-               "timeout requested is too large. Using timeout: %u \n",
-               (uint32_t)timeout );
+               "timeout requested is too large. Using timeout: %u\n",
+               to );
     }
 
     /* start the timer to the timeout [msec] */
-    cl_status = cl_timer_start(&p_event_wheel->timer, (uint32_t)timeout);
-
+    cl_status = cl_timer_start(&p_event_wheel->timer, to);
     if (cl_status != CL_SUCCESS)
     {
       osm_log (p_event_wheel->p_log, OSM_LOG_ERROR,
-               "cl_event_wheel_reg : ERROR 1000: "
+               "cl_event_wheel_reg : ERR 6103: "
                "Failed to start timer\n" );
       goto Exit;
     }
@@ -479,7 +481,7 @@ cl_event_wheel_unreg(
 
   osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
            "cl_event_wheel_unreg: "
-           "Removing key:0x%"PRIx64".\n", key );
+           "Removing key:0x%"PRIx64"\n", key );
 
   CL_SPINLOCK_ACQUIRE( &p_event_wheel->lock );
   p_map_item = cl_qmap_get( &p_event_wheel->events_map, key );
@@ -495,7 +497,7 @@ cl_event_wheel_unreg(
 
     osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
              "cl_event_wheel_unreg: "
-             "Removed key:0x%"PRIx64".\n", key );
+             "Removed key:0x%"PRIx64"\n", key );
 
     /* free the item */
     cl_free(p_event);
@@ -527,7 +529,7 @@ cl_event_wheel_num_regs(
   /* try to find the key in the map */
   osm_log( p_event_wheel->p_log, OSM_LOG_DEBUG,
            "cl_event_wheel_num_regs: "
-           "Looking for key:0x%"PRIx64".\n", key );
+           "Looking for key:0x%"PRIx64"\n", key );
 
   CL_SPINLOCK_ACQUIRE( &p_event_wheel->lock );
   p_map_item = cl_qmap_get( &p_event_wheel->events_map, key );
index facbd6f..245f948 100644 (file)
@@ -51,6 +51,7 @@
 #include <stdlib.h>
 #include <complib/cl_types.h>
 #include <complib/cl_debug.h>
+#include <opensm/osm_version.h>
 #include <opensm/osm_opensm.h>
 #include <vendor/osm_vendor_api.h>
 #include <opensm/osm_ucast_updn.h>
@@ -61,7 +62,7 @@
 /*
   This is the global opensm object.
   One opensm object is required per subnet.
-  Future versions could support multiple subents by
+  Future versions could support multiple subnets by
   instantiating more than one opensm object.
 */
 osm_opensm_t osm;
@@ -86,8 +87,8 @@ show_usage(void)
           "          /var/cache/osm/opensm.opts for use next invocation\n"
           "          The cache directory can be changed by the environment\n"
           "          variable OSM_CACHE_DIR\n\n");
-  printf( "-g <GUID in hex>\n"
-          "--guid <GUID in hex>\n"
+  printf( "-g[=]<GUID in hex>\n"
+          "--guid[=]<GUID in hex>\n"
           "          This option specifies the local port GUID value\n"
           "          with which OpenSM should bind.  OpenSM may be\n"
           "          bound to 1 port at a time.\n"
@@ -110,6 +111,9 @@ show_usage(void)
           "          This option specifies the SM's PRIORITY.\n"
           "          This will effect the handover cases, where master\n"
           "          is chosen by priority and GUID.\n" );
+  printf( "-smkey <SM_Key>\n"
+          "          This option specifies the SM's SM_Key (64 bits).\n"
+          "          This will effect SM authentication.\n" );
   printf( "-r\n"
           "--reassign_lids\n"
           "          This option causes OpenSM to reassign LIDs to all\n"
@@ -129,7 +133,7 @@ show_usage(void)
   printf( "-o\n"
           "--once\n"
           "          This option causes OpenSM to configure the subnet\n"
-          "          once, then exit.  Ports remain in the ACTIVE state.\n" );
+          "          once, then exit.  Ports remain in the ACTIVE state.\n\n" );
   printf( "-s <interval>\n"
           "--sweep <interval>\n"
           "          This option specifies the number of seconds between\n"
@@ -142,7 +146,7 @@ show_usage(void)
           "          used for transaction timeouts.\n"
           "          Specifying -t 0 disables timeouts.\n"
           "          Without -t, OpenSM defaults to a timeout value of\n"
-          "          100 milliseconds.\n\n" );
+          "          200 milliseconds.\n\n" );
   printf( "-maxsmps <number>\n"
           "          This option specifies the number of VL15 SMP MADs\n"
           "          allowed on the wire at any one time.\n"
@@ -152,7 +156,7 @@ show_usage(void)
           "          one outstanding SMP.\n\n" );
   printf( "-i <equalize-ignore-guids-file>\n"
           "-ignore-guids <equalize-ignore-guids-file>\n"
-          "          This option provides means to define a set of ports\n"
+          "          This option provides the means to define a set of ports\n"
           "          (by guids) that will be ignored by the link load \n"
           "          equalization algorithm.\n\n" );
   printf( "-f\n"
@@ -165,6 +169,12 @@ show_usage(void)
           "          This option will cause deletion of the log file \n"
           "          (if it previously exists). By default, the log file \n"
           "          is accumulative.\n\n");
+  printf( "-y\n"
+          "--stay_on_fatal\n"
+          "          This option will cause SM not to exit on fatal initialization\n"
+          "          issues: if SM discovers duplicated guids or 12x link with\n"
+          "          lane reversal badly configured.\n"
+          "          By default, the SM will exit on these errors.\n\n");
   printf( "-v\n"
           "--verbose\n"
           "          This option increases the log verbosity level.\n"
@@ -206,13 +216,13 @@ show_usage(void)
           "          option to enable as follows:\n"
           "          OPT   Description\n"
           "          ---    -----------------\n"
-          "          -d0  - Ignore other SM nodes.\n"
-          "          -d1  - Force single threaded dispatching.\n"
-          "          -d2  - Force log flushing after each log message.\n"
-          "          -d3  - Disable multicast support.\n"
-          "          -d4  - Put OpenSM in memory tracking mode.\n"
-          "          -d10.. Put OpenSM in testability mode.\n"
-          "          Without -d, no debug options are enabled.\n\n" );
+          "          -d0  - Ignore other SM nodes\n"
+          "          -d1  - Force single threaded dispatching\n"
+          "          -d2  - Force log flushing after each log message\n"
+          "          -d3  - Disable multicast support\n"
+          "          -d4  - Put OpenSM in memory tracking mode\n"
+          "          -d10 - Put OpenSM in testability mode\n"
+          "          Without -d, no debug options are enabled\n\n" );
   printf( "-h\n"
           "--help\n"
           "          Display this usage info then exit.\n\n" );
@@ -254,7 +264,7 @@ get_port_guid(
   status = osm_vendor_get_all_port_attr( p_osm->p_vendor, attr_array, &num_ports );
   if( status != IB_SUCCESS )
   {
-    printf( "\nError from osm_opensm_init (%x)\n", status);
+    printf( "\nError from osm_vendor_get_all_port_attr (%x)\n", status);
     return( 0 );
   }
 
@@ -361,6 +371,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
   uint64_t port_guid;
   ib_api_status_t status = IB_SUCCESS;
   unsigned int  port_num;
+
   OSM_LOG_ENTER( &p_osm->log, parse_ignore_guids_file );
 
   fh = fopen( guids_file_name, "r" );
@@ -368,7 +379,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
   {
     osm_log( &p_osm->log, OSM_LOG_ERROR,
              "parse_ignore_guids_file: ERR 0601: "
-             "Unable to open ignore guids file (%s).\n" );
+             "Unable to open ignore guids file (%s)\n" );
     status = IB_ERROR;
     goto Exit;
   }
@@ -386,7 +397,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
     {
       osm_log( &p_osm->log, OSM_LOG_ERROR,
                "parse_ignore_guids_file: ERR 0602: "
-               "Error in line (%u): %s" ,
+               "Error in line (%u): %s\n" ,
                line_num, line
                );
       status = IB_ERROR;
@@ -398,7 +409,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
     {
       osm_log( &p_osm->log, OSM_LOG_ERROR,
                "parse_ignore_guids_file: ERR 0603: "
-               "Error in line (%u): %s" ,
+               "Error in line (%u): %s\n" ,
                line_num, p_ec
                );
       status = IB_ERROR;
@@ -408,7 +419,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
     if (port_num > 256)
     {
       osm_log( &p_osm->log, OSM_LOG_ERROR,
-               "parse_ignore_guids_file: ERR XXX: "
+               "parse_ignore_guids_file: ERR 0604: "
                "Error in line (%u): %s. "
                "port number is greater than 256 (%d) \n",
                line_num, p_ec, port_num
@@ -417,7 +428,7 @@ parse_ignore_guids_file(IN char *guids_file_name,
       goto Exit;
     }
     /* ok insert it */
-    osm_port_pro_set_ignored_port(&p_osm->subn, port_guid, (uint8_t)port_num);
+    osm_port_prof_set_ignored_port(&p_osm->subn, port_guid, (uint8_t)port_num);
     osm_log( &p_osm->log, OSM_LOG_DEBUG,
              "parse_ignore_guids_file: "
              "Inserted Port: 0x%" PRIx64 " into ignored guids list\n" ,
@@ -443,6 +454,7 @@ main(
 {
   osm_subn_opt_t        opt;
   ib_net64_t            guid = 0;
+  ib_net64_t            sm_key = 0;
   ib_api_status_t       status;
   uint32_t              log_flags = OSM_LOG_DEFAULT_LEVEL;
   int long              temp;
@@ -454,7 +466,7 @@ main(
   boolean_t             cache_options = FALSE;
   char                 *ignore_guids_file_name = NULL;
   uint32_t              val;
-  const char * const    short_option = "i:f:ed:g:l:s:t:a:uvVhorc";
+  const char * const    short_option = "i:f:ed:g:l:s:t:a:uvVhorcy";
 
   /*
     In the array below, the 2nd parameter specified the number
@@ -481,9 +493,11 @@ main(
       {  "once",          0, NULL, 'o'},
       {  "reassign_lids", 0, NULL, 'r'},
       {  "priority",      1, NULL, 'p'},
+      {  "smkey",         1, NULL, 'k'},
       {  "updn",          0, NULL, 'u'},
       {  "add_guid_file", 1, NULL, 'a'},
       {  "cache-options", 0, NULL, 'c'},
+      {  "stay_on_fatal", 0, NULL, 'y'},
       {  NULL,            0, NULL,  0 }  /* Required at the end of the array */
     };
 
@@ -553,7 +567,6 @@ main(
     case 't':
       opt.transaction_timeout = strtol(optarg, NULL, 0);
       printf(" Transaction timeout = %d\n", opt.transaction_timeout);
-
       break;
 
     case 'n':
@@ -573,7 +586,7 @@ main(
       }
       else if(dbg_lvl == 1)
       {
-        printf(" Debug mode: Force Signale Thread\n");
+        printf(" Debug mode: Forcing Single Thread\n");
         opt.single_thread = TRUE;
       }
       else if(dbg_lvl == 2)
@@ -626,7 +639,12 @@ main(
 
     case 'e':
       opt.accum_log_file = FALSE;
-      printf(" Erasing existing(old) log file\n");
+      printf(" Creating new log file\n");
+      break;
+
+    case 'y':
+      opt.exit_on_fatal = FALSE;
+      printf(" Staying on fatal initialization errors\n");
       break;
 
     case 'v':
@@ -650,6 +668,12 @@ main(
       printf(" Priority = %d\n", temp);
       break;
 
+    case 'k':
+      sm_key = cl_hton64( strtoull( optarg, NULL, 16 ));
+      printf(" SM Key <0x%"PRIx64">\n", cl_hton64( sm_key ));
+      opt.sm_key = sm_key;
+      break;
+
     case 'u':
       opt.updn_activate = TRUE;
       printf(" Activate UPDN algorithm\n");
@@ -690,7 +714,8 @@ main(
   /* Done with options description */
   printf("-------------------------------------------------\n");
 
-  if (mem_track) __cl_mem_track(TRUE);
+  if (mem_track) 
+    __cl_mem_track(TRUE);
 
   opt.log_flags = (uint8_t)log_flags;
 
@@ -716,7 +741,7 @@ main(
     If the user didn't specify a GUID on the command line,
     then get a port GUID value with which to bind.
   */
-  if( guid == 0 || cl_hton64(guid) == cl_hton64(INVALID_GUID))
+  if( guid == 0 || cl_hton64(guid) == CL_HTON64(INVALID_GUID))
     guid = get_port_guid( &osm, guid );
 
   if ( guid == 0 )
@@ -785,9 +810,9 @@ main(
     sleep(exitTimeout); 
   */
 
-  if ((osm.mad_pool.mads_out))
+  if (osm.mad_pool.mads_out)
     fprintf(stdout, 
-            "There are still %u mads out. Forcing the exit of the OpenSM application...\n",
+            "There are still %u MADs out. Forcing the exit of the OpenSM application...\n",
             osm.mad_pool.mads_out);
 
  Exit:
diff --git a/ulp/opensm/user/opensm/osm_console.c b/ulp/opensm/user/opensm/osm_console.c
new file mode 100644 (file)
index 0000000..48731ca
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
+ * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under 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.
+ *
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#  include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+#define _GNU_SOURCE            /* for getline */
+#include <stdio.h>
+#include <stdlib.h>
+#include <opensm/osm_console.h>
+
+#define OSM_COMMAND_LINE_LEN   120
+#define OSM_COMMAND_PROMPT     "$ "
+
+struct command {
+       char *name;
+       void (*help_function)(void);
+       void (*parse_function)(char **p_last, osm_opensm_t *p_osm);
+};
+
+static const struct command console_cmds[];
+
+static inline char *next_token(char **p_last)
+{
+       return strtok_r(NULL, " \t\n", p_last);
+}
+
+static void help_command()
+{
+       int i;
+
+       printf("Supported commands and syntax:\n");
+       printf("help [<command>]\n");
+       /* skip help command */
+       for (i = 1; console_cmds[i].name; i++)
+               console_cmds[i].help_function();
+}
+
+static void help_loglevel()
+{
+       printf("loglevel [<log-level>]\n");
+}
+
+static void help_priority()
+{
+       printf("priority [<sm-priority>]\n");
+}
+
+/* more help routines go here */
+
+static void help_parse(char **p_last, osm_opensm_t *p_osm)
+{
+       char *p_cmd;
+       int i, found = 0;
+
+       p_cmd = next_token(p_last);
+       if (!p_cmd)
+               help_command();
+       else {
+               for (i = 1; console_cmds[i].name; i++) {
+                       if (!strcmp(p_cmd, console_cmds[i].name)) {
+                               found = 1;
+                               console_cmds[i].help_function();
+                               break;
+                       }
+               }
+               if (!found) {
+                       printf("Command %s not found\n\n", p_cmd);
+                       help_command();
+               }
+       }
+}
+
+static void loglevel_parse(char **p_last, osm_opensm_t *p_osm)
+{
+       char *p_cmd;
+       int level;
+
+       p_cmd = next_token(p_last);
+       if (!p_cmd)
+               printf("Current log level is 0x%x\n", osm_log_get_level(&p_osm->log));
+       else {
+               /* Handle x, 0x, and decimal specification of log level */
+               if (!strncmp(p_cmd, "x", 1)) { 
+                       p_cmd++;
+                       level = strtoul(p_cmd, NULL, 16); 
+               } else {
+                       if (!strncmp(p_cmd, "0x", 2)) {
+                               p_cmd += 2;
+                               level = strtoul(p_cmd, NULL, 16); 
+                       } else
+                               level = strtol(p_cmd, NULL, 10);
+               }
+               if ((level >= 0) && (level < 256)) {
+                       printf("Setting log level to 0x%x\n", level);
+                       osm_log_set_level(&p_osm->log, level);
+               } else
+                       printf("Invalid log level 0x%x\n", level);
+       }
+}
+
+static void priority_parse(char **p_last, osm_opensm_t *p_osm)
+{
+       char *p_cmd;
+       int priority;
+
+       p_cmd = next_token(p_last);
+       if (!p_cmd)
+               printf("Current sm-priority is %d\n", p_osm->subn.opt.sm_priority);
+       else {
+               priority = strtol(p_cmd, NULL, 0);
+               if (0 > priority || 15 < priority)
+                       printf("Invalid sm-priority %d; must be between 0 and 15\n", priority);
+               else {
+                       printf("Setting sm-priority to %d\n", priority);
+                       p_osm->subn.opt.sm_priority = (uint8_t)priority;
+                       /* Does the SM state machine need a kick now ? */
+               }
+       }
+}
+
+/* more parse routines go here */
+
+static const struct command console_cmds[] =
+{
+       { "help",       &help_command,          &help_parse},
+       { "loglevel",   &help_loglevel,         &loglevel_parse},       
+       { "priority",   &help_priority,         &priority_parse},
+       { NULL,         NULL,                   NULL}   /* end of array */
+};
+
+static void parse_cmd_line(char *line, osm_opensm_t *p_osm)
+{
+       char *p_cmd, *p_last;
+       int i, found = 0;
+
+       /* find first token which is the command */
+       p_cmd = strtok_r(line, " \t\n", &p_last);
+       if (p_cmd) {
+               for (i = 0; console_cmds[i].name; i++) {
+                       if (!strcmp(p_cmd, console_cmds[i].name)) {
+                               found = 1;
+                               console_cmds[i].parse_function(&p_last, p_osm);
+                               break;
+                       }
+               }
+               if (!found) {
+                       printf("Command %s not found\n\n", p_cmd);
+                       help_command();
+               }
+       } else {
+               printf("Error parsing command line: %s\n", line);
+               return;
+       }
+}
+
+void osm_console(osm_opensm_t *p_osm)
+{
+       char *p_line;
+       size_t len;
+       ssize_t n;
+
+       printf("\nOpenSM Console\n\n");
+       while (1) {
+               printf("%s", OSM_COMMAND_PROMPT);
+               p_line = NULL;
+               /* Get input line */
+               n = getline(&p_line, &len, stdin);
+               if (n > 0) {
+                       /* Parse and act on input */
+                       parse_cmd_line(p_line, p_osm);
+                       free(p_line);
+               } else {
+                       printf("Input error\n");
+                       fflush(stdin);
+               }
+       }
+}
+
index 05be9ce..9d53f4b 100644 (file)
@@ -123,6 +123,7 @@ osm_db_domain_destroy(
 {
   osm_db_domain_imp_t *p_domain_imp;
   p_domain_imp = (osm_db_domain_imp_t *)p_db_domain->p_domain_imp;
+
   osm_db_clear( p_db_domain );
 
   cl_spinlock_destroy( &p_domain_imp->lock );
@@ -168,19 +169,19 @@ osm_db_init(
   if ( p_db_imp->db_dir_name == NULL )
     p_db_imp->db_dir_name = OSM_DEFAULT_CACHE_DIR;
 
-  /* create the directory if it doesn't exist */
-  /* There is difference between creating in windows and in linux */
+  /* Create the directory if it doesn't exist */
+  /* There is a difference in creating directory between windows and linux */
 #ifdef __WIN__
   /* Check if the directory exists. If not - create it. */
   CreateDirectory(p_db_imp->db_dir_name, NULL);
 #else /* __WIN__ */  
-  /* make sure the directory exists, also if it is a link */
+  /* make sure the directory exists */
   if (lstat(p_db_imp->db_dir_name, &dstat))
   {
     if (mkdir(p_db_imp->db_dir_name, 777))
     {
       osm_log( p_log, OSM_LOG_ERROR,
-               "osm_db_init: ERR 6901: "
+               "osm_db_init: ERR 6101: "
                " Fail to create the db directory:%s\n",
                p_db_imp->db_dir_name);
       OSM_LOG_EXIT( p_log );
@@ -236,7 +237,7 @@ osm_db_domain_init(
   if (! p_file)
   {
     osm_log( p_log, OSM_LOG_ERROR,
-             "osm_db_domain_init: ERR 6902: "
+             "osm_db_domain_init: ERR 6102: "
              " Fail to open the db file:%s\n",
              p_domain_imp->file_name);
     cl_free(p_domain_imp);
@@ -291,7 +292,7 @@ osm_db_restore(
   if (! p_file)
   {
     osm_log( p_log, OSM_LOG_ERROR,
-             "osm_db_restore: ERR 6903: "
+             "osm_db_restore: ERR 6103: "
              " Fail to open the db file:%s\n",
              p_domain_imp->file_name);
     status = 1;
@@ -330,9 +331,10 @@ osm_db_restore(
         if (! p_first_word)
         {
           osm_log( p_log, OSM_LOG_ERROR,
-                   "osm_db_restore: ERR 6904: "
+                   "osm_db_restore: ERR 6104: "
                    " Fail to get key from line:%u : %s\n",
                    line_num, sLine);
+          status = 1;
           goto EndParsing;
         }
 
@@ -355,7 +357,7 @@ osm_db_restore(
       else if (sLine[0] != '\n')
       {
         osm_log( p_log, OSM_LOG_ERROR,
-                 "osm_db_restore: ERR 6905: "
+                 "osm_db_restore: ERR 6105: "
                  " How did we get here? line:%u : %s\n",
                  line_num, sLine);
         status = 1;
@@ -377,9 +379,9 @@ osm_db_restore(
                       (st_data_t*)&p_prev_val))
         {
           osm_log( p_log, OSM_LOG_ERROR,
-                   "osm_db_restore: ERR 6906: "
+                   "osm_db_restore: ERR 6106: "
                    " Key:%s already exists in:%s with value:%s."
-                   " Removing it.\n",
+                   " Removing it\n",
                    p_key,
                    p_domain_imp->file_name,
                    p_prev_val);
@@ -453,11 +455,10 @@ osm_db_store(
 
   /* open up the output file */
   p_file = fopen(p_tmp_file_name, "w");
-
   if (! p_file)
   {
     osm_log( p_log, OSM_LOG_ERROR,
-             "osm_db_store: ERR 6907: "
+             "osm_db_store: ERR 6107: "
              " Fail to open the db file:%s for writing\n",
              p_domain_imp->file_name);
     status = 1;
@@ -472,15 +473,16 @@ osm_db_store(
   if (status)
   {
     osm_log( p_log, OSM_LOG_ERROR,
-             "osm_db_store: ERR 6909: "
+             "osm_db_store: ERR 6109: "
              " Fail to remove file:%s (err:%u)\n",
              p_domain_imp->file_name, status);
   }
+
   status = rename(p_tmp_file_name, p_domain_imp->file_name);
   if (status)
   {
     osm_log( p_log, OSM_LOG_ERROR,
-             "osm_db_store: ERR 6908: "
+             "osm_db_store: ERR 6108: "
              " Fail to rename the db file to:%s (err:%u)\n",
              p_domain_imp->file_name, status);
   }
@@ -588,7 +590,7 @@ osm_db_update(
   {
     osm_log( p_log, OSM_LOG_DEBUG,
              "osm_db_update: "
-             " Key:%s previously exists in:%s with value:%s.\n",
+             " Key:%s previously exists in:%s with value:%s\n",
              p_key,
              p_domain_imp->file_name,
              p_prev_val);
@@ -638,7 +640,7 @@ osm_db_delete(
     {
       osm_log( p_log, OSM_LOG_ERROR,
                "osm_db_delete: "
-               " key:%s still exists in:%s with value:%s.\n",
+               " key:%s still exists in:%s with value:%s\n",
                p_key,
                p_domain_imp->file_name,
                p_prev_val);
index 9d6df77..bf45d77 100644 (file)
@@ -37,6 +37,7 @@
 #endif /* HAVE_CONFIG_H */
 
 #include <stdlib.h>
+#include <complib/cl_debug.h>
 #include <opensm/osm_db_pack.h>
 static inline void
 __osm_pack_guid(uint64_t guid, char *p_guid_str)
index 1e75ef5..ed8933b 100644 (file)
@@ -68,6 +68,7 @@ void
 osm_drop_mgr_construct(
   IN osm_drop_mgr_t* const p_mgr )
 {
+  CL_ASSERT( p_mgr );
   cl_memclr( p_mgr, sizeof(*p_mgr) );
 }
 
@@ -77,9 +78,10 @@ void
 osm_drop_mgr_destroy(
   IN osm_drop_mgr_t* const p_mgr )
 {
+  CL_ASSERT( p_mgr );
+
   OSM_LOG_ENTER( p_mgr->p_log, osm_drop_mgr_destroy );
 
-  CL_ASSERT( p_mgr );
   OSM_LOG_EXIT( p_mgr->p_log );
 }
 
@@ -94,6 +96,7 @@ osm_drop_mgr_init(
   IN cl_plock_t* const p_lock )
 {
   ib_api_status_t status = IB_SUCCESS;
+
   OSM_LOG_ENTER( p_log, osm_drop_mgr_init );
 
   osm_drop_mgr_construct( p_mgr );
@@ -144,7 +147,7 @@ __osm_drop_mgr_remove_port(
   port_guid = osm_port_get_guid( p_port );
   osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
            "__osm_drop_mgr_remove_port: "
-           "Unreachable port 0x%016" PRIx64 ".\n",
+           "Unreachable port 0x%016" PRIx64 "\n",
            cl_ntoh64( port_guid ) );
 
   /*
@@ -175,7 +178,7 @@ __osm_drop_mgr_remove_port(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_drop_mgr_remove_port: ERR 0101: "
-             "Port 0x%016" PRIx64 " not in guid table.\n",
+             "Port 0x%016" PRIx64 " not in guid table\n",
              cl_ntoh64( port_guid ) );
     goto Exit;
   }
@@ -195,7 +198,7 @@ __osm_drop_mgr_remove_port(
 
   osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
            "__osm_drop_mgr_remove_port: "
-           "Clearing abandoned LID range [0x%X,0x%X].\n",
+           "Clearing abandoned LID range [0x%X,0x%X]\n",
            min_lid_ho, max_lid_ho );
 
   for( lid_ho = min_lid_ho; lid_ho <= max_lid_ho; lid_ho++ )
@@ -238,7 +241,7 @@ __osm_drop_mgr_remove_port(
                      "__osm_drop_mgr_remove_port: "
                      "Forcing delayed heavy sweep. Remote "
                      "port 0x%016" PRIx64 " port num: 0x%X "
-                     "was recognized in ACTIVE state \n",
+                     "was recognized in ACTIVE state\n",
                      cl_ntoh64( p_remote_physp->port_guid ),
                      remote_port_num );
             p_mgr->p_subn->force_delayed_heavy_sweep = TRUE;
@@ -249,7 +252,7 @@ __osm_drop_mgr_remove_port(
                  "__osm_drop_mgr_remove_port: "
                  "Unlinking local node 0x%016" PRIx64 ", port 0x%X"
                  "\n\t\t\t\tand remote node 0x%016" PRIx64
-                 ", port 0x%X.\n",
+                 ", port 0x%X\n",
                  cl_ntoh64( osm_node_get_node_guid( p_node ) ),
                  port_num,
                  cl_ntoh64( osm_node_get_node_guid( p_remote_node ) ),
@@ -269,7 +272,7 @@ __osm_drop_mgr_remove_port(
             osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                      "__osm_drop_mgr_remove_port: "
                      "resetting discovery count of node: "
-                     "0x%016" PRIx64 " port num:%u.\n",
+                     "0x%016" PRIx64 " port num:%u\n",
                      cl_ntoh64( osm_node_get_node_guid( p_remote_node ) ),
                      remote_port_num );
           }
@@ -278,7 +281,7 @@ __osm_drop_mgr_remove_port(
 
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_drop_mgr_remove_port: "
-               "Clearing physical port number %u.\n",
+               "Clearing physical port number %u\n",
                port_num );
 
       osm_physp_destroy( p_physp );
@@ -330,13 +333,13 @@ __osm_drop_mgr_remove_port(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_drop_mgr_remove_port: ERR 0103: "
-             "Error sending trap reports (%s).\n",
+             "Error sending trap reports (%s)\n",
              ib_get_err_str( status ) );
     goto Exit;
   }
   osm_log( p_mgr->p_log, OSM_LOG_INFO, 
            "Removed port with GUID:0x%016" PRIx64 
-           " LID range [0x%X,0x%X] of node:%s \n",
+           " LID range [0x%X,0x%X] of node:%s\n",
            cl_ntoh64( port_gid.unicast.interface_id ),
            min_lid_ho, max_lid_ho, p_node_desc );
   
@@ -365,7 +368,7 @@ __osm_drop_mgr_remove_switch(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_drop_mgr_remove_switch: ERR 0102: "
-             "Node 0x%016" PRIx64 " not in switch table.\n",
+             "Node 0x%016" PRIx64 " not in switch table\n",
              cl_ntoh64( osm_node_get_node_guid( p_node ) ) );
   }
   else
@@ -390,7 +393,7 @@ __osm_drop_mgr_remove_router(
 
   osm_log( p_mgr->p_log, OSM_LOG_ERROR,
            "__osm_drop_mgr_remove_router: ERR 0106: "
-           "Routers are not supported.\n" );
+           "Routers are not supported\n" );
 
   OSM_LOG_EXIT( p_mgr->p_log );
 }
@@ -416,7 +419,7 @@ __osm_drop_mgr_process_node(
 
   osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
            "__osm_drop_mgr_process_node: "
-           "Unreachable node 0x%016" PRIx64 ".\n",
+           "Unreachable node 0x%016" PRIx64 "\n",
            cl_ntoh64( osm_node_get_node_guid( p_node ) ) );
 
   /*
@@ -460,7 +463,7 @@ __osm_drop_mgr_process_node(
   default:
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_drop_mgr_process_node: ERR 0104: "
-             "Node 0x%016" PRIx64 " unknown node type: %u.\n",
+             "Node 0x%016" PRIx64 " unknown node type: %u\n",
              cl_ntoh64( osm_node_get_node_guid( p_node ) ),
              osm_node_get_type( p_node ) );
     break;
@@ -472,7 +475,7 @@ __osm_drop_mgr_process_node(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_drop_mgr_process_node: ERR 0105: "
-             "Node 0x%016" PRIx64 " not in guid table.\n",
+             "Node 0x%016" PRIx64 " not in guid table\n",
              cl_ntoh64( osm_node_get_node_guid( p_node ) ) );
   }
 
@@ -520,7 +523,7 @@ __osm_drop_mgr_check_node(
     /* We do not have switch info for this node */
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_drop_mgr_check_node: "
-             "Node 0x%016" PRIx64 " no switch in table.\n",
+             "Node 0x%016" PRIx64 " no switch in table\n",
              cl_ntoh64( node_guid ) );
     
     __osm_drop_mgr_process_node( p_mgr, p_node );
@@ -534,7 +537,7 @@ __osm_drop_mgr_check_node(
   {
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_drop_mgr_check_node: "
-             "Node 0x%016" PRIx64 " no valid physical port 0.\n",
+             "Node 0x%016" PRIx64 " no valid physical port 0\n",
              cl_ntoh64( node_guid ) );
     
     __osm_drop_mgr_process_node( p_mgr, p_node );
@@ -550,7 +553,7 @@ __osm_drop_mgr_check_node(
   {
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_drop_mgr_check_node: "
-             "Node 0x%016" PRIx64 " no port object.\n",
+             "Node 0x%016" PRIx64 " no port object\n",
              cl_ntoh64( node_guid ) );
     
     __osm_drop_mgr_process_node( p_mgr, p_node );
@@ -561,7 +564,7 @@ __osm_drop_mgr_check_node(
   {
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_drop_mgr_check_node: "
-             "Node 0x%016" PRIx64 " port has discovery count zero.\n",
+             "Node 0x%016" PRIx64 " port has discovery count zero\n",
              cl_ntoh64( node_guid ) );
     
     __osm_drop_mgr_process_node( p_mgr, p_node );
@@ -591,10 +594,10 @@ osm_drop_mgr_process(
   uint8_t      port_num;
   osm_physp_t *p_physp;
 
-  OSM_LOG_ENTER( p_mgr->p_log, osm_drop_mgr_process );
-
   CL_ASSERT( p_mgr );
 
+  OSM_LOG_ENTER( p_mgr->p_log, osm_drop_mgr_process );
+
   p_node_guid_tbl = &p_mgr->p_subn->node_guid_tbl;
   p_port_guid_tbl = &p_mgr->p_subn->port_guid_tbl;
   p_lsweep_ports = &p_mgr->p_subn->light_sweep_physp_list;
@@ -615,7 +618,7 @@ osm_drop_mgr_process(
       node_guid = osm_node_get_node_guid( p_node );
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_drop_mgr_process: "
-               "Checking node 0x%016" PRIx64 ".\n",
+               "Checking node 0x%016" PRIx64 "\n",
                cl_ntoh64( node_guid ) );
     }
 
@@ -630,7 +633,7 @@ osm_drop_mgr_process(
 
   /*
     Go over all the nodes. If the node is a switch - make sure
-    there is also a switch record for it, and portInfo record for
+    there is also a switch record for it, and portInfo record for
     port zero of of the node.
     If not - this means that there was some error in getting the data
     of this node. Drop the node.
@@ -646,7 +649,7 @@ osm_drop_mgr_process(
       node_guid = osm_node_get_node_guid( p_node );
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_drop_mgr_process: "
-               "Checking full discovery of node 0x%016" PRIx64 ".\n",
+               "Checking full discovery of node 0x%016" PRIx64 "\n",
                cl_ntoh64( node_guid ) );
     }
 
@@ -671,7 +674,7 @@ osm_drop_mgr_process(
       port_guid = osm_port_get_guid( p_port );
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_drop_mgr_process: "
-               "Checking port 0x%016" PRIx64 ".\n",
+               "Checking port 0x%016" PRIx64 "\n",
                cl_ntoh64( port_guid ) );
     }
 
@@ -704,7 +707,7 @@ osm_drop_mgr_process(
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "osm_drop_mgr_process: ERR 0108: "
                  "Unknown remote side for node 0x%016" PRIx64 
-                 " port %u. Adding to light sweep sampling list.\n",
+                 " port %u. Adding to light sweep sampling list\n",
                  cl_ntoh64( osm_node_get_node_guid( p_node )),
                  port_num);
         
index 6edfad6..89d735b 100644 (file)
@@ -63,6 +63,7 @@ osm_fwd_tbl_init(
 {
   uint16_t tbl_cap;
   ib_api_status_t status = IB_SUCCESS;
+
   /*
     Determine the type and size of the forwarding table
     used by this switch, then initialize accordingly.
index 655e969..7a7c89c 100644 (file)
@@ -46,6 +46,7 @@
 #  include <config.h>
 #endif /* HAVE_CONFIG_H */
 
+#include <complib/cl_debug.h>
 #include <complib/cl_memory.h>
 #include <complib/cl_timer.h>
 #include <opensm/osm_sa_informinfo.h>
@@ -130,7 +131,6 @@ __match_rid_of_inf_rec(
   osm_infr_t* p_infr = (osm_infr_t*)p_list_item;
   int32_t count;
 
-
   count = cl_memcmp(
     &p_infr->inform_record,
     p_infr_rec,
@@ -146,7 +146,6 @@ __match_rid_of_inf_rec(
 
 /**********************************************************************
  **********************************************************************/
-
 osm_infr_t*
 osm_infr_get_by_rid(
   IN osm_subn_t   const *p_subn,
@@ -154,6 +153,7 @@ osm_infr_get_by_rid(
   IN ib_inform_info_record_t* const p_infr_rec )
 {
   cl_list_item_t* p_list_item;
+
   OSM_LOG_ENTER( p_log, osm_infr_get_by_rid );
 
   p_list_item = cl_qlist_find_from_head(
@@ -168,7 +168,6 @@ osm_infr_get_by_rid(
   return (osm_infr_t*)p_list_item;
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -177,6 +176,7 @@ __dump_all_informs(
     IN osm_log_t *p_log)
 {
    cl_list_item_t* p_list_item;
+
    OSM_LOG_ENTER( p_log, __dump_all_informs );
 
    p_list_item = cl_qlist_head( &p_subn->sa_infr_list );
@@ -229,9 +229,9 @@ __match_inf_rec(
   return status;
   
 }
+
 /**********************************************************************
  **********************************************************************/
-
 osm_infr_t*
 osm_infr_get_by_rec(
   IN osm_subn_t   const *p_subn,
@@ -272,12 +272,11 @@ osm_infr_insert_to_db(
   IN osm_log_t *p_log,
   IN osm_infr_t   *p_infr)
 {
-
   OSM_LOG_ENTER( p_log, osm_infr_insert_to_db );
 
   osm_log( p_log, OSM_LOG_DEBUG,
            "osm_infr_insert_to_db: "
-           "Inserting a new InformInfo Record:\n");
+           "Inserting a new InformInfo Record into Database\n");
   osm_log( p_log, OSM_LOG_DEBUG,
            "osm_infr_insert_to_db: "
           "Dump before insertion (size : %d) : \n",
@@ -372,7 +371,7 @@ osm_send_report(
   {
     osm_log(p_log, OSM_LOG_ERROR,
             "osm_send_report: ERR 0203: "
-            "osm_mad_pool_get failed.\n" );
+            "osm_mad_pool_get failed\n" );
     status = IB_ERROR;
     goto Exit;
   }
@@ -437,6 +436,7 @@ __match_notice_to_inf_rec(
   osm_port_t*           p_dest_port;
 
   OSM_LOG_ENTER( p_log, __match_notice_to_inf_rec );
+
   /* matching rules
    * InformInfo   Notice
    * GID          IssuerGID    if non zero must match the trap
@@ -715,4 +715,3 @@ osm_report_notice(
 
   return(IB_SUCCESS);
 }
-
index c42ab7d..a4c469e 100644 (file)
@@ -170,7 +170,7 @@ __osm_lid_mgr_validate_db(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_lid_mgr_validate_db: ERR 0310: "
-             "could not get guid list.\n");
+             "could not get guid list\n");
     goto Exit;
   }
 
@@ -181,7 +181,7 @@ __osm_lid_mgr_validate_db(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_lid_mgr_validate_db: ERR 0311: "
-               "could not get lid for guid:0x%016" PRIx64".\n",
+               "could not get lid for guid:0x%016" PRIx64 "\n",
                p_item->guid
                );
     }
@@ -195,7 +195,7 @@ __osm_lid_mgr_validate_db(
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "__osm_lid_mgr_validate_db: ERR 0312: "
                  "Illegal LID range [0x%x:0x%x] for guid:0x%016" PRIx64
-                 ".\n",
+                 "\n",
                  min_lid, max_lid, p_item->guid
                  );
         lids_ok = FALSE;
@@ -207,7 +207,7 @@ __osm_lid_mgr_validate_db(
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "__osm_lid_mgr_validate_db: ERR 0313: "
                  "LID range [0x%x:0x%x] for guid:0x%016" PRIx64
-                 " is not aligned acording to mask:0x%04x.\n",
+                 " is not aligned acording to mask:0x%04x\n",
                  min_lid, max_lid, p_item->guid, lmc_mask
                  );
         lids_ok = FALSE;
@@ -223,7 +223,7 @@ __osm_lid_mgr_validate_db(
             osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                      "__osm_lid_mgr_validate_db: ERR 0314: "
                      "0x%04x for guid:0x%016" PRIx64
-                     " was previously used.\n",
+                     " was previously used\n",
                      lid, p_item->guid
                      );
             lids_ok = FALSE;
@@ -237,7 +237,7 @@ __osm_lid_mgr_validate_db(
           osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                    "__osm_lid_mgr_validate_db: ERR 0315: "
                    "failed to delete entry for guid:0x%016" PRIx64
-                   ".\n",
+                   "\n",
                    p_item->guid
                    );
       }
@@ -288,7 +288,7 @@ osm_lid_mgr_init(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_lid_mgr_init: ERR 0316: "
-             "Error initializing Guid-to-Lid persistent database.\n");
+             "Error initializing Guid-to-Lid persistent database\n");
     status = IB_ERROR;
     goto Exit;
   }
@@ -303,7 +303,7 @@ osm_lid_mgr_init(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_lid_mgr_init: ERR 0317: "
-               "Error restoring Guid-to-Lid persistent database.\n");
+               "Error restoring Guid-to-Lid persistent database\n");
       status = IB_ERROR;
       goto Exit;
     }
@@ -313,7 +313,7 @@ osm_lid_mgr_init(
     __osm_lid_mgr_validate_db(p_mgr);
   }
 
- Exit:
+Exit:
   OSM_LOG_EXIT( p_mgr->p_log );
   return( status );
 }
@@ -328,7 +328,6 @@ int
 __osm_lid_mgr_init_sweep(
   IN osm_lid_mgr_t* const p_mgr )
 {
-
   cl_ptr_vector_t     *p_discovered_vec = &p_mgr->p_subn->port_lid_tbl;
   cl_ptr_vector_t     *p_persistent_vec = &p_mgr->used_lids;
   uint16_t             max_defined_lid;
@@ -385,7 +384,7 @@ __osm_lid_mgr_init_sweep(
   {
     osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
              "__osm_lid_mgr_init_sweep: "
-             "Skipping all lids - as we are reassigning them.\n");
+             "Skipping all lids - as we are reassigning them\n");
     p_range =
       (osm_lid_mgr_range_t *)cl_malloc(sizeof(osm_lid_mgr_range_t));
     p_range->min_lid = 1;
@@ -470,7 +469,7 @@ __osm_lid_mgr_init_sweep(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_lid_mgr_init_sweep: "
-               "0x%04x is not free as its mapped by the persistent db.\n",
+               "0x%04x is not free as its mapped by the persistent db\n",
                lid);
       is_free = FALSE;
     }
@@ -488,16 +487,16 @@ __osm_lid_mgr_init_sweep(
               b. Make sure all needed lids (for the lmc) are free according
                  to persistency table.
         */
-        /* qualify the guid of the port is not persistently mapped to
-           another range */
-        if (!osm_db_guid2lid_get( p_mgr->p_g2l,
-                                  cl_ntoh64(osm_port_get_guid(p_port)),
-                                  &db_min_lid, &db_max_lid))
-        {
+      /* qualify the guid of the port is not persistently mapped to 
+         another range */
+      if (!osm_db_guid2lid_get( p_mgr->p_g2l,
+                                cl_ntoh64(osm_port_get_guid(p_port)),
+                                &db_min_lid, &db_max_lid))
+      {
           osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                    "__osm_lid_mgr_init_sweep: "
                    "0x%04x is free as it was discovered "
-                   "but mapped by the persistent db to [0x%04x:0x%04x].\n",
+                   "but mapped by the persistent db to [0x%04x:0x%04x]\n",
                    lid, db_min_lid, db_max_lid);
         }
         else
@@ -511,48 +510,48 @@ __osm_lid_mgr_init_sweep(
           {
             disc_max_lid = disc_min_lid + lmc_num_lids - 1;
             num_lids = lmc_num_lids;
-          }
-          else
-          {
+        }
+        else
+        {
             num_lids = 1;
           }
           /* Make sure the lid is aligned */
           if ((num_lids != 1) && ((disc_min_lid & lmc_mask) != disc_min_lid))
           {
             /* The lid cannot be used */
-            osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
-                     "__osm_lid_mgr_init_sweep: "
+          osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
+                   "__osm_lid_mgr_init_sweep: "
                      "0x%04x is free as it was discovered "
-                     "but not aligned\n",
+                     "but not aligned\n",
                      lid );
-          }
-          else
-          {
+      }
+      else
+      {
             /* check that all needed lids are not persistently mapped */
             is_free = FALSE;
             for ( req_lid = disc_min_lid + 1 ; req_lid <= disc_max_lid ; req_lid++ )
             {
               if ((req_lid <= max_persistent_lid) && cl_ptr_vector_get(p_persistent_vec, req_lid))
               {
-                osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
-                         "__osm_lid_mgr_init_sweep: "
+        osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
+                 "__osm_lid_mgr_init_sweep: "
                          "0x%04x is free as it was discovered "
-                         "but mapped\n",
-                         lid);
+                         "but mapped\n",
+                 lid);
                 is_free = TRUE;
                 break;
               }
-            }
-            if (is_free == FALSE)
-            {
+      }
+      if (is_free == FALSE)
+      {
               /* This port will use its local lid, and consume the entire required lid range.
                  Thus we can skip that range. */
               /* If the disc_max_lid is greater then lid - we can skip right to it, 
                  since we've done all neccessary checks on the lids in between. */
               if (disc_max_lid > lid)
                 lid = disc_max_lid;
-            }
-          }
+      }
+    }
         }
       }
     }
@@ -669,10 +668,9 @@ __osm_lid_mgr_find_free_lid_range(
   uint8_t              lmc_num_lids;
   uint16_t             lmc_mask;
 
-
   osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
            "__osm_lid_mgr_find_free_lid_range: "
-           "LMC = %u, number LIDs = %u.\n",
+           "LMC = %u, number LIDs = %u\n",
            p_mgr->p_subn->opt.lmc, num_lids );
 
   lmc_num_lids = (1 << p_mgr->p_subn->opt.lmc );
@@ -735,9 +733,9 @@ __osm_lid_mgr_find_free_lid_range(
 /**********************************************************************
  **********************************************************************/
 void
-__osm_lid_mgr_cleanup_discovered_port_lid_range(
-  IN osm_lid_mgr_t* p_mgr,
-  IN osm_port_t *p_port )
+ __osm_lid_mgr_cleanup_discovered_port_lid_range(
+   IN osm_lid_mgr_t* p_mgr,
+   IN osm_port_t *p_port )
 {
   cl_ptr_vector_t *p_discovered_vec = &p_mgr->p_subn->port_lid_tbl;
   uint16_t         lid, min_lid, max_lid;
@@ -806,7 +804,7 @@ __osm_lid_mgr_get_port_lid(
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_lid_mgr_get_port_lid: "
                "0x%016" PRIx64
-               " with lid:0x%04x does not matches its known lid:0x%04x\n",
+               " with lid:0x%04x does not match its known lid:0x%04x\n",
                guid, cl_ntoh16(osm_port_get_base_lid(p_port)), min_lid);
       __osm_lid_mgr_cleanup_discovered_port_lid_range( p_mgr, p_port );
       /* we still need to send the setting to the target port */
@@ -818,7 +816,7 @@ __osm_lid_mgr_get_port_lid(
   {
     osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
              "__osm_lid_mgr_get_port_lid: "
-             "0x%016" PRIx64" has no persistent lid assigned.\n",
+             "0x%016" PRIx64" has no persistent lid assigned\n",
              guid);
   }
 
@@ -851,7 +849,7 @@ __osm_lid_mgr_get_port_lid(
         osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                  "__osm_lid_mgr_get_port_lid: "
                  "0x%016" PRIx64
-                 " existing lid range:[0x%x:0x%x] is not free.\n",
+                 " existing lid range:[0x%x:0x%x] is not free\n",
                  guid, min_lid, min_lid + num_lids - 1);
       }
     }
@@ -860,7 +858,7 @@ __osm_lid_mgr_get_port_lid(
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_lid_mgr_get_port_lid: "
                "0x%016" PRIx64
-               " existing lid range:[0x%x:0x%x] is not lmc aligned.\n",
+               " existing lid range:[0x%x:0x%x] is not lmc aligned\n",
                guid, min_lid, min_lid + num_lids - 1);
     }
   }
@@ -896,6 +894,7 @@ __osm_lid_mgr_get_port_lid(
 static boolean_t
 __osm_lid_mgr_set_physp_pi(
   IN osm_lid_mgr_t *       const p_mgr,
+  IN osm_port_t*           const p_port,
   IN osm_physp_t*          const p_physp,
   IN ib_net16_t               const lid )
 {
@@ -909,6 +908,7 @@ __osm_lid_mgr_set_physp_pi(
   uint8_t               op_vls;
   uint8_t               port_num;
   boolean_t             send_set = FALSE;
+  boolean_t             new_port = FALSE;
 
   OSM_LOG_ENTER( p_mgr->p_log, __osm_lid_mgr_set_physp_pi );
 
@@ -936,7 +936,7 @@ __osm_lid_mgr_set_physp_pi(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_lid_mgr_set_physp_pi: "
-               "Skipping switch port %u, GUID = 0x%016" PRIx64 ".\n",
+               "Skipping switch port %u, GUID = 0x%016" PRIx64 "\n",
                port_num,
                cl_ntoh64( osm_physp_get_port_guid( p_physp ) ) );
     }
@@ -1094,14 +1094,14 @@ __osm_lid_mgr_set_physp_pi(
       To reset the port state machine we can send PortInfo.State = DOWN.
       (see: 7.2.7 p161 lines:10-19.)
     */
-    if ( (mtu != ib_port_info_get_mtu_cap( p_old_pi )) ||
+    if ( (mtu != ib_port_info_get_neighbor_mtu( p_old_pi )) ||
          (op_vls !=  ib_port_info_get_op_vls(p_old_pi)))
     {
       if( osm_log_is_active( p_mgr->p_log, OSM_LOG_DEBUG ) )
       {
         osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                  "__osm_lid_mgr_set_physp_pi: "
-                 "Sending Link Down due to op_vls or mtu change. MTU:%u,%u VL_CAP:%u,%u \n",
+                 "Sending Link Down due to op_vls or mtu change. MTU:%u,%u VL_CAP:%u,%u\n",
                  mtu, ib_port_info_get_mtu_cap( p_old_pi ),
                  op_vls, ib_port_info_get_op_vls(p_old_pi)
                  );
@@ -1139,18 +1139,28 @@ __osm_lid_mgr_set_physp_pi(
   /*
     We need to set the cli_rereg bit when we are in first_time_master_sweep for
     ports supporting the ClientReregistration Vol1 (v1.2) p811 14.4.11
+    Also, if this port was just now discovered, then we should also set the
+    cli_rereg bit. We know that the port was just discovered if it is in 
+    the p_subn->new_ports_list list.
   */
-  if ( ( p_mgr->p_subn->first_time_master_sweep == TRUE ) &&
+  if ( cl_is_object_in_list(&p_mgr->p_subn->new_ports_list, p_port) )
+  {
+    /* p_port is in new_ports_list, mark new_port as TRUE */
+    new_port = TRUE;
+  }
+
+  if ( ( p_mgr->p_subn->first_time_master_sweep == TRUE || 
+         new_port == TRUE ) &&
        ( (p_old_pi->capability_mask & IB_PORT_CAP_HAS_CLIENT_REREG) != 0 ) )
     ib_port_info_set_client_rereg( p_pi, 1 );
   else
     ib_port_info_set_client_rereg( p_pi, 0 );
 
-  /* We need to send the PortInfoSet request with the new sm_lid
+  /* We need to send the PortInfo Set request with the new sm_lid
      in the following cases:
      1. There is a change in the values (send_set == TRUE)
      2. first_time_master_sweep flag on the subnet is TRUE. This means the
-     SM just became master, and it then needs to send at PortInfoSet to
+     SM just became master, and it then needs to send a PortInfo Set to
      every port.
      3. got_set_resp on the physical port is FALSE. This means we haven't seen
      this port before - need to send Set of PortInfo to it.
@@ -1202,7 +1212,7 @@ __osm_lid_mgr_process_our_sm_node(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_lid_mgr_process_our_sm_node: ERR 0308: "
-             "Can't acquire SM's Port object, GUID = 0x%016" PRIx64 ".\n",
+             "Can't acquire SM's Port object, GUID = 0x%016" PRIx64 "\n",
              cl_ntoh64( p_mgr->p_subn->sm_port_guid ) );
     res = FALSE;
     goto Exit;
@@ -1219,7 +1229,7 @@ __osm_lid_mgr_process_our_sm_node(
   __osm_lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho, &max_lid_ho);
   osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
            "__osm_lid_mgr_process_our_sm_node: "
-           "Current base LID is 0x%X.\n", min_lid_ho );
+           "Current base LID is 0x%X\n", min_lid_ho );
   /*
     Update subnet object.
   */
@@ -1231,7 +1241,7 @@ __osm_lid_mgr_process_our_sm_node(
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_lid_mgr_process_our_sm_node: "
              "Assigning SM's port 0x%016" PRIx64
-             "\n\t\t\t\tto LID range [0x%X,0x%X].\n",
+             "\n\t\t\t\tto LID range [0x%X,0x%X]\n",
              cl_ntoh64( osm_port_get_guid( p_port ) ),
              min_lid_ho, max_lid_ho );
   }
@@ -1242,7 +1252,7 @@ __osm_lid_mgr_process_our_sm_node(
   */
   p_physp = osm_port_get_default_phys_ptr( p_port );
 
-  __osm_lid_mgr_set_physp_pi( p_mgr, p_physp, cl_hton16( min_lid_ho ) );
+  __osm_lid_mgr_set_physp_pi( p_mgr, p_port, p_physp, cl_hton16( min_lid_ho ) );
 
  Exit:
   OSM_LOG_EXIT( p_mgr->p_log );
@@ -1311,10 +1321,10 @@ osm_lid_mgr_process_subnet(
   osm_physp_t    *p_physp;
   int             lid_changed;
 
-  OSM_LOG_ENTER( p_mgr->p_log, osm_lid_mgr_process_subnet );
-
   CL_ASSERT( p_mgr );
 
+  OSM_LOG_ENTER( p_mgr->p_log, osm_lid_mgr_process_subnet );
+
   CL_PLOCK_EXCL_ACQUIRE( p_mgr->p_lock );
 
   CL_ASSERT( p_mgr->p_subn->sm_port_guid );
@@ -1344,7 +1354,7 @@ osm_lid_mgr_process_subnet(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_lid_mgr_process_subnet: "
-               "Skipping our own port 0x%016" PRIx64 ".\n",
+               "Skipping our own port 0x%016" PRIx64 "\n",
                cl_ntoh64( port_guid ) );
     }
     else
@@ -1366,7 +1376,7 @@ osm_lid_mgr_process_subnet(
       
       p_physp = osm_port_get_default_phys_ptr( p_port );
       /* the proc returns the fact it sent a set port info */
-      if (__osm_lid_mgr_set_physp_pi( p_mgr, p_physp, cl_hton16( min_lid_ho )))
+      if (__osm_lid_mgr_set_physp_pi( p_mgr, p_port, p_physp, cl_hton16( min_lid_ho )))
         p_mgr->send_set_reqs = TRUE;
     }
   } /* all ports */
index b725b2b..b358cec 100644 (file)
@@ -72,9 +72,10 @@ void
 osm_lft_rcv_destroy(
   IN osm_lft_rcv_t* const p_rcv )
 {
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_lft_rcv_destroy );
 
-  CL_ASSERT( p_rcv );
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
@@ -88,6 +89,7 @@ osm_lft_rcv_init(
   IN cl_plock_t* const p_lock )
 {
   ib_api_status_t status = IB_SUCCESS;
+
   OSM_LOG_ENTER( p_log, osm_lft_rcv_init );
 
   osm_lft_rcv_construct( p_rcv );
@@ -116,9 +118,10 @@ osm_lft_rcv_process(
   ib_net64_t node_guid;
   ib_api_status_t status;
 
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_lft_rcv_process );
 
-  CL_ASSERT( p_rcv );
   CL_ASSERT( p_madw );
 
   p_sw_tbl = &p_rcv->p_subn->sw_guid_tbl;
@@ -140,7 +143,7 @@ osm_lft_rcv_process(
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "osm_lft_rcv_process: ERR 0401: "
              "LFT received for nonexistent node "
-             "0x%" PRIx64 ".\n", cl_ntoh64( node_guid ) );
+             "0x%" PRIx64 "\n", cl_ntoh64( node_guid ) );
   }
   else
   {
@@ -150,7 +153,7 @@ osm_lft_rcv_process(
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "osm_lft_rcv_process: ERR 0402: "
                "Setting forwarding table block failed (%s)"
-               "\n\t\t\t\tSwitch 0x%" PRIx64 ".\n",
+               "\n\t\t\t\tSwitch 0x%" PRIx64 "\n",
                ib_get_err_str( status ),
                cl_ntoh64( node_guid ) );
     }
index ea3322b..b6285fb 100644 (file)
@@ -84,7 +84,6 @@ osm_lft_rcv_ctrl_destroy(
   cl_disp_unregister( p_ctrl->h_disp );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -113,7 +112,7 @@ osm_lft_rcv_ctrl_init(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_lft_rcv_ctrl_init: ERR 1601: "
-             "Dispatcher registration failed.\n" );
+             "Dispatcher registration failed\n" );
     status = IB_INSUFFICIENT_RESOURCES;
     goto Exit;
   }
index cf99298..d0bc8c9 100644 (file)
@@ -74,11 +74,9 @@ osm_link_mgr_destroy(
 {
   OSM_LOG_ENTER( p_mgr->p_log, osm_link_mgr_destroy );
 
-
   OSM_LOG_EXIT( p_mgr->p_log );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -165,7 +163,7 @@ osm_link_mgr_set_physp_pi(
       {
         osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                  "osm_link_mgr_set_physp_pi: "
-                 "Skipping port 0, GUID = 0x%016" PRIx64 ".\n",
+                 "Skipping port 0, GUID = 0x%016" PRIx64 "\n",
                  cl_ntoh64( osm_physp_get_port_guid( p_physp ) ) );
       }
       goto Exit;
@@ -383,7 +381,7 @@ __osm_link_mgr_process_port(
   {
     osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
              "__osm_link_mgr_process_port: "
-             "Port 0x%" PRIx64 " going to %s.\n",
+             "Port 0x%" PRIx64 " going to %s\n",
              cl_ntoh64( osm_port_get_guid( p_port ) ),
              ib_get_port_state_str( link_state ) );
   }
@@ -432,7 +430,7 @@ __osm_link_mgr_process_port(
         {
           osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                    "__osm_link_mgr_process_port: "
-                   "Physical port 0x%X already %s.  Skipping.\n",
+                   "Physical port 0x%X already %s. Skipping\n",
                    osm_physp_get_port_num( p_physp ),
                    ib_get_port_state_str( current_state ) );
         }
index 3c3dc48..26763e8 100644 (file)
@@ -68,6 +68,7 @@ __osm_lid_matrix_vec_init(
   IN void* context )
 {
   osm_lid_matrix_t* const p_lmx = (osm_lid_matrix_t*)context;
+
   cl_memset( p_elem, OSM_NO_PATH, p_lmx->num_ports + 1);
   return( CL_SUCCESS );
 }
@@ -82,6 +83,7 @@ __osm_lid_matrix_vec_clear(
   IN void* context )
 {
   osm_lid_matrix_t* const p_lmx = (osm_lid_matrix_t*)context;
+
   UNUSED_PARAM( index );
   cl_memset( p_elem, OSM_NO_PATH, p_lmx->num_ports + 1);
 }
index 6c0a519..abe35ab 100644 (file)
@@ -74,13 +74,13 @@ void
 osm_mft_rcv_destroy(
   IN osm_mft_rcv_t* const p_rcv )
 {
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_mft_rcv_destroy );
 
-  CL_ASSERT( p_rcv );
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -91,6 +91,7 @@ osm_mft_rcv_init(
   IN cl_plock_t* const p_lock )
 {
   ib_api_status_t status = IB_SUCCESS;
+
   OSM_LOG_ENTER( p_log, osm_mft_rcv_init );
 
   osm_mft_rcv_construct( p_rcv );
@@ -120,9 +121,10 @@ osm_mft_rcv_process(
   ib_net64_t node_guid;
   ib_api_status_t status;
 
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_mft_rcv_process );
 
-  CL_ASSERT( p_rcv );
   CL_ASSERT( p_madw );
 
   p_sw_tbl = &p_rcv->p_subn->sw_guid_tbl;
@@ -143,7 +145,7 @@ osm_mft_rcv_process(
     osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
              "osm_mft_rcv_process: "
              "Setting MFT block %u, position %u"
-             "\n\t\t\t\tSwitch 0x%016" PRIx64 ", TID 0x%" PRIx64 ".\n",
+             "\n\t\t\t\tSwitch 0x%016" PRIx64 ", TID 0x%" PRIx64 "\n",
              block_num, position, cl_ntoh64( node_guid ),
              cl_ntoh64( p_smp->trans_id ) );
   }
@@ -156,7 +158,7 @@ osm_mft_rcv_process(
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "osm_mft_rcv_process: ERR 0801: "
              "LFT received for nonexistent node "
-             "0x%016" PRIx64 ".\n", cl_ntoh64( node_guid ) );
+             "0x%016" PRIx64 "\n", cl_ntoh64( node_guid ) );
   }
   else
   {
@@ -168,7 +170,7 @@ osm_mft_rcv_process(
                "osm_mft_rcv_process: ERR 0802: "
                "Setting forwarding table block failed (%s)"
                "\n\t\t\t\tSwitch 0x%016" PRIx64
-               ", block_num = %u, position = %u.\n",
+               ", block_num = %u, position = %u\n",
                ib_get_err_str( status ),
                cl_ntoh64( node_guid ),
                block_num, position );
index 078c16d..832914a 100644 (file)
@@ -84,7 +84,6 @@ osm_mft_rcv_ctrl_destroy(
   cl_disp_unregister( p_ctrl->h_disp );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -113,7 +112,7 @@ osm_mft_rcv_ctrl_init(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_mft_rcv_ctrl_init: ERR 0901: "
-             "Dispatcher registration failed.\n" );
+             "Dispatcher registration failed\n" );
     status = IB_INSUFFICIENT_RESOURCES;
     goto Exit;
   }
index 4401c96..8dcf6cf 100644 (file)
@@ -141,13 +141,13 @@ __osm_mcast_mgr_purge_tree(
 
 /**********************************************************************
  **********************************************************************/
-uint32_t
+float
 osm_mcast_mgr_compute_avg_hops(
   osm_mcast_mgr_t*         const p_mgr,
   const osm_mgrp_t*        const p_mgrp,
   const osm_switch_t*         const p_sw )
 {
-  uint32_t avg_hops = 0;
+  float avg_hops = 0;
   uint32_t hops = 0;
   uint32_t num_ports = 0;
   uint16_t base_lid_ho;
@@ -180,7 +180,7 @@ osm_mcast_mgr_compute_avg_hops(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_mcast_mgr_compute_avg_hops: ERR 0A18: "
-               "No port object for port 0x%016" PRIx64 ".\n",
+               "No port object for port 0x%016" PRIx64 "\n",
                cl_ntoh64( ib_gid_get_guid( &p_mcm_port->port_gid ) ) );
       continue;
     }
@@ -197,7 +197,7 @@ osm_mcast_mgr_compute_avg_hops(
 
   if( num_ports != 0 )
   {
-    avg_hops = hops / num_ports;
+    avg_hops = (float)(hops / num_ports);
   }
 
   OSM_LOG_EXIT( p_mgr->p_log );
@@ -208,7 +208,7 @@ osm_mcast_mgr_compute_avg_hops(
  Calculate the maximal "min hops" from the given switch to any
  of the group HCAs
  **********************************************************************/
-uint32_t
+float
 osm_mcast_mgr_compute_max_hops(
   osm_mcast_mgr_t*         const p_mgr,
   const osm_mgrp_t*        const p_mgrp,
@@ -247,7 +247,7 @@ osm_mcast_mgr_compute_max_hops(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_mcast_mgr_compute_max_hops: ERR 0A18: "
-               "No port object for port 0x%016" PRIx64 ".\n",
+               "No port object for port 0x%016" PRIx64 "\n",
                cl_ntoh64( ib_gid_get_guid( &p_mcm_port->port_gid ) ) );
       continue;
     }
@@ -266,7 +266,7 @@ osm_mcast_mgr_compute_max_hops(
   }
 
   OSM_LOG_EXIT( p_mgr->p_log );
-  return( max_hops );
+  return(float)(max_hops);
 }
 
 /**********************************************************************
@@ -283,8 +283,8 @@ __osm_mcast_mgr_find_optimal_switch(
   cl_qmap_t*               p_sw_tbl;
   const osm_switch_t*         p_sw;
   const osm_switch_t*         p_best_sw = NULL;
-  uint32_t                 hops = 0;
-  uint32_t                 best_hops = 10000;   /* any big # will do */
+  float                 hops = 0;
+  float                 best_hops = 10000;   /* any big # will do */
   uint64_t              sw_guid_ho;
 #ifdef OSM_VENDOR_INTF_ANAFA  
        boolean_t             use_avg_hops = TRUE; /* anafa2 - bug hca on switch */ /* use max hops for root */
@@ -317,7 +317,7 @@ __osm_mcast_mgr_find_optimal_switch(
 
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_mcast_mgr_find_optimal_switch: "
-               "Switch 0x%016" PRIx64 ", hops = %f.\n",
+               "Switch 0x%016" PRIx64 ", hops = %f\n",
                sw_guid_ho, hops );
     }
 
@@ -337,14 +337,14 @@ __osm_mcast_mgr_find_optimal_switch(
 
       osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
                "__osm_mcast_mgr_find_optimal_switch: "
-               "Best switch is 0x%" PRIx64 ", hops = %f.\n",
+               "Best switch is 0x%" PRIx64 ", hops = %f\n",
                sw_guid_ho, best_hops );
     }
     else
     {
       osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
                "__osm_mcast_mgr_find_optimal_switch: "
-               "No multicast capable switches detected.\n" );
+               "No multicast capable switches detected\n" );
     }
   }
 
@@ -391,9 +391,10 @@ void
 osm_mcast_mgr_destroy(
   IN osm_mcast_mgr_t* const p_mgr )
 {
+  CL_ASSERT( p_mgr );
+
   OSM_LOG_ENTER( p_mgr->p_log, osm_mcast_mgr_destroy );
 
-  CL_ASSERT( p_mgr );
   OSM_LOG_EXIT( p_mgr->p_log );
 }
 
@@ -445,9 +446,10 @@ __osm_mcast_mgr_set_tbl(
   ib_net16_t               block[IB_MCAST_BLOCK_SIZE];
   osm_signal_t          signal = OSM_SIGNAL_DONE;
 
+  CL_ASSERT( p_mgr );
+
   OSM_LOG_ENTER( p_mgr->p_log, __osm_mcast_mgr_set_tbl );
 
-  CL_ASSERT( p_mgr );
   CL_ASSERT( p_sw );
 
   p_node = osm_switch_get_node_ptr( p_sw );
@@ -477,7 +479,7 @@ __osm_mcast_mgr_set_tbl(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_mcast_mgr_set_tbl: "
-               "Writing MFT block 0x%X.\n", block_id_ho );
+               "Writing MFT block 0x%X\n", block_id_ho );
     }
 
     block_id_ho = block_num + (position << 28);
@@ -495,7 +497,7 @@ __osm_mcast_mgr_set_tbl(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_mcast_mgr_set_tbl: ERR 0A02: "
-               "Sending linear fwd. tbl. block failed (%s).\n",
+               "Sending linear fwd. tbl. block failed (%s)\n",
                ib_get_err_str( status ) );
     }
 
@@ -567,9 +569,9 @@ __osm_mcast_mgr_subdivide(
 
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_mcast_mgr_subdivide: ERR 0A03: "
-               "Error routing MLID 0x%X through switch 0x%" PRIx64 ".\n"
+               "Error routing MLID 0x%X through switch 0x%" PRIx64 "\n"
                "\t\t\t\tNo multicast paths from this switch for port "
-               "with LID 0x%X.\n",
+               "with LID 0x%X\n",
                mlid_ho, node_guid_ho, lid_ho );
 
       __osm_mcast_work_obj_delete( p_wobj );
@@ -584,9 +586,9 @@ __osm_mcast_mgr_subdivide(
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_mcast_mgr_subdivide: ERR 0A04: "
                "Error routing MLID 0x%X through switch "
-               "0x%" PRIx64 ".\n"
+               "0x%" PRIx64 "\n"
                "\t\t\t\tNo multicast paths from this switch "
-               "to port with LID 0x%X.\n",
+               "to port with LID 0x%X\n",
                mlid_ho, node_guid_ho, lid_ho );
 
       __osm_mcast_work_obj_delete( p_wobj );
@@ -618,7 +620,7 @@ __osm_mcast_mgr_purge_list(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_mcast_mgr_purge_list: ERR 0A06: "
-             "Unable to route for port 0x%" PRIx64 ".\n",
+             "Unable to route for port 0x%" PRIx64 "\n",
              osm_port_get_guid( p_wobj->p_port ) );
     __osm_mcast_work_obj_delete( p_wobj );
   }
@@ -670,8 +672,8 @@ __osm_mcast_mgr_branch(
   {
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "__osm_mcast_mgr_branch: "
-             "Routing MLID 0x%X through switch 0x%" PRIx64 ".\n"
-             "\t\t\t\t%u nodes at depth %u.\n",
+             "Routing MLID 0x%X through switch 0x%" PRIx64 "\n"
+             "\t\t\t\t%u nodes at depth %u\n",
              mlid_ho,
              node_guid_ho,
              cl_qlist_count( p_list ), depth );
@@ -694,7 +696,7 @@ __osm_mcast_mgr_branch(
     */
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_mcast_mgr_branch: ERR 0A14: "
-             "Switch 0x%" PRIx64 " does not support multicast.\n",
+             "Switch 0x%" PRIx64 " does not support multicast\n",
              node_guid_ho );
 
     /*
@@ -713,7 +715,7 @@ __osm_mcast_mgr_branch(
     */
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_mcast_mgr_branch: ERR 0A15: "
-             "Insufficient memory to build multicast tree.\n" );
+             "Insufficient memory to build multicast tree\n" );
 
     /*
       Deallocate all the work objects on this branch of the tree.
@@ -738,7 +740,7 @@ __osm_mcast_mgr_branch(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_mcast_mgr_branch: ERR 0A16: "
-             "Unable to allocate list array.\n" );
+             "Unable to allocate list array\n" );
     __osm_mcast_mgr_purge_list( p_mgr, p_list );
     goto Exit;
   }
@@ -761,7 +763,7 @@ __osm_mcast_mgr_branch(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_mcast_mgr_branch: "
-               "Adding upstream port 0x%X.\n", upstream_port );
+               "Adding upstream port 0x%X\n", upstream_port );
     }
 
     CL_ASSERT( upstream_port );
@@ -801,7 +803,7 @@ __osm_mcast_mgr_branch(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "__osm_mcast_mgr_branch: "
-               "Routing %u destination(s) via switch port 0x%X.\n",
+               "Routing %u destination(s) via switch port 0x%X\n",
                count, i );
     }
 
@@ -862,7 +864,7 @@ __osm_mcast_mgr_branch(
         osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                  "__osm_mcast_mgr_branch: "
                  "Found leaf for port 0x%016" PRIx64 ",\n"
-                 "\t\t\t\ton switch port 0x%X.\n",
+                 "\t\t\t\ton switch port 0x%X\n",
                  cl_ntoh64( osm_port_get_guid( p_wobj->p_port ) ), i );
       }
 
@@ -916,7 +918,7 @@ __osm_mcast_mgr_build_spanning_tree(
     {
       osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
                "__osm_mcast_mgr_build_spanning_tree: "
-               "MLID 0x%X has no members--nothing to do.\n",
+               "MLID 0x%X has no members--nothing to do\n",
                cl_ntoh16( osm_mgrp_get_mlid( p_mgrp ) ) );
     }
     goto Exit;
@@ -943,7 +945,7 @@ __osm_mcast_mgr_build_spanning_tree(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "__osm_mcast_mgr_build_spanning_tree: ERR 0A08: "
-             "Unable to locate a suitable switch for group 0x%X.\n",
+             "Unable to locate a suitable switch for group 0x%X\n",
              cl_ntoh16( osm_mgrp_get_mlid( p_mgrp ) ));
     status = IB_ERROR;
     goto Exit;
@@ -967,7 +969,7 @@ __osm_mcast_mgr_build_spanning_tree(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_mcast_mgr_build_spanning_tree: ERR 0A09: "
-               "No port object for port 0x%016" PRIx64 ".\n",
+               "No port object for port 0x%016" PRIx64 "\n",
                cl_ntoh64( ib_gid_get_guid( &p_mcm_port->port_gid ) ) );
       continue;
     }
@@ -977,7 +979,7 @@ __osm_mcast_mgr_build_spanning_tree(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "__osm_mcast_mgr_build_spanning_tree: ERR 0A10: "
-               "Insufficient memory to route port 0x%016" PRIx64 ".\n",
+               "Insufficient memory to route port 0x%016" PRIx64 "\n",
                cl_ntoh64( osm_port_get_guid( p_port ) ) );
       continue;
     }
@@ -991,7 +993,7 @@ __osm_mcast_mgr_build_spanning_tree(
 
   osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
            "__osm_mcast_mgr_build_spanning_tree: "
-           "Configured MLID 0x%X for %u ports, max tree depth = %u.\n",
+           "Configured MLID 0x%X for %u ports, max tree depth = %u\n",
            cl_ntoh16( osm_mgrp_get_mlid( p_mgrp ) ),
            count, max_depth );
 
@@ -1027,7 +1029,7 @@ osm_mcast_mgr_set_table(
   {
     osm_log( p_mgr->p_log, OSM_LOG_VERBOSE,
              "osm_mcast_mgr_set_table: "
-             "Configuring MLID 0x%X on switch 0x%" PRIx64 ".\n",
+             "Configuring MLID 0x%X on switch 0x%" PRIx64 "\n",
              mlid_ho, osm_node_get_node_guid(
                osm_switch_get_node_ptr( p_sw ) ) );
   }
@@ -1067,7 +1069,6 @@ __osm_mcast_mgr_clear(
   cl_qmap_t*               p_tbl;
   osm_mcast_tbl_t*         p_mcast_tbl;
 
-
   OSM_LOG_ENTER( p_mgr->p_log, __osm_mcast_mgr_clear );
 
   /*
@@ -1125,7 +1126,7 @@ osm_mcast_mgr_process_single(
     osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
              "osm_mcast_mgr_process_single: "
              "Attempting to add port 0x%" PRIx64 " to MLID 0x%X, "
-             "\n\t\t\t\tjoin state = 0x%X.\n",
+             "\n\t\t\t\tjoin state = 0x%X\n",
              cl_ntoh64( port_guid ), mlid_ho, join_state );
   }
 
@@ -1137,7 +1138,7 @@ osm_mcast_mgr_process_single(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A01: "
-             "Unable to acquire port object for 0x%" PRIx64 ".\n",
+             "Unable to acquire port object for 0x%" PRIx64 "\n",
              cl_ntoh64( port_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1148,7 +1149,7 @@ osm_mcast_mgr_process_single(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A05: "
-             "Unable to acquire phsyical port object for 0x%" PRIx64 ".\n",
+             "Unable to acquire phsyical port object for 0x%" PRIx64 "\n",
              cl_ntoh64( port_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1159,7 +1160,7 @@ osm_mcast_mgr_process_single(
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A07: "
              "Unable to acquire valid physical port object "
-             "for 0x%" PRIx64 ".\n",
+             "for 0x%" PRIx64 "\n",
              cl_ntoh64( port_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1171,7 +1172,7 @@ osm_mcast_mgr_process_single(
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A11: "
              "Unable to acquire remote phsyical port object "
-             "for 0x%" PRIx64 ".\n",
+             "for 0x%" PRIx64 "\n",
              cl_ntoh64( port_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1182,7 +1183,7 @@ osm_mcast_mgr_process_single(
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A21: "
              "Unable to acquire valid remote physical port object "
-             "for 0x%" PRIx64 ".\n",
+             "for 0x%" PRIx64 "\n",
              cl_ntoh64( port_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1198,7 +1199,7 @@ osm_mcast_mgr_process_single(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A22: "
-             "Remote node not a switch node 0x%" PRIx64 ".\n",
+             "Remote node not a switch node 0x%" PRIx64 "\n",
              cl_ntoh64( sw_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1209,7 +1210,7 @@ osm_mcast_mgr_process_single(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A12: "
-             "No switch object 0x%" PRIx64 ".\n",
+             "No switch object 0x%" PRIx64 "\n",
              cl_ntoh64( sw_guid ) );
     status = IB_ERROR;
     goto Exit;
@@ -1244,14 +1245,14 @@ osm_mcast_mgr_process_single(
           osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                    "osm_mcast_mgr_process_single: "
                    "Success.  Nothing to do for send"
-                   "only member.\n" );
+                   "only member\n" );
         }
       }
       else
       {
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                  "osm_mcast_mgr_process_single: ERR 0A13: "
-                 "Unknown join state 0x%X.\n", join_state );
+                 "Unknown join state 0x%X\n", join_state );
         status = IB_ERROR;
         goto Exit;
       }
@@ -1263,7 +1264,7 @@ osm_mcast_mgr_process_single(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_single: "
-               "Unable to add port.\n" );
+               "Unable to add port\n" );
     }
   }
 
@@ -1297,7 +1298,7 @@ osm_mcast_mgr_process_tree(
   {
     osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
              "osm_mcast_mgr_process_tree: "
-             "Processing multicast group 0x%X.\n", cl_ntoh16( mlid ));
+             "Processing multicast group 0x%X\n", cl_ntoh16( mlid ));
   }
 
   /*
@@ -1309,7 +1310,7 @@ osm_mcast_mgr_process_tree(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_tree: "
-               "No switches in subnet.  Nothing to do.\n" );
+               "No switches in subnet. Nothing to do\n" );
     }
     goto Exit;
   }
@@ -1341,7 +1342,7 @@ osm_mcast_mgr_process_tree(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_mcast_mgr_process_tree: ERR 0A17: "
-               "Unable to create spanning tree (%s).\n",
+               "Unable to create spanning tree (%s)\n",
                ib_get_err_str( status ) );
       goto Exit;
     }
@@ -1404,7 +1405,7 @@ osm_mcast_mgr_dump_mcast_routes(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_dump_mcast_routes: ERR 0A23: "
-             "Fail to open mcfdb file (%s).\n",
+             "Fail to open mcfdb file (%s)\n",
              file_name );
     goto Exit;
   }
@@ -1414,7 +1415,7 @@ osm_mcast_mgr_dump_mcast_routes(
   p_tbl = osm_switch_get_mcast_tbl_ptr( p_sw );
 
   fprintf( p_mcfdbFile, "\nSwitch 0x%016" PRIx64 "\n"
-           "LID    : Out Port(s) \n",
+           "LID    : Out Port(s)\n",
            cl_ntoh64( osm_node_get_node_guid( p_node ) ) );  
   while ( block_num <= p_tbl->max_block_in_use )
   {
@@ -1484,7 +1485,7 @@ osm_mcast_mgr_process_mgrp(
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_mgrp: ERR 0A19: "
-             "Unable to create spanning tree (%s).\n",
+             "Unable to create spanning tree (%s)\n",
              ib_get_err_str( status ) );
 
     goto Exit;
@@ -1557,7 +1558,7 @@ osm_mcast_mgr_process(
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_mcast_mgr_process: ERR 0A20: "
-               "Unable to create spanning tree (%s).\n",
+               "Unable to create spanning tree (%s)\n",
                ib_get_err_str( status ) );
     }
 
@@ -1595,7 +1596,6 @@ osm_mcast_mgr_process(
 
 /**********************************************************************
  **********************************************************************/
-
 static
 osm_mgrp_t *
 __get_mgrp_by_mlid(
@@ -1656,14 +1656,14 @@ osm_mcast_mgr_process_mgrp_cb(
       signal = OSM_SIGNAL_DONE;
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_mgrp_cb: "
-               "Skip processing mgrp with lid:0x%X change id:%u \n",
+               "Skip processing mgrp with lid:0x%X change id:%u\n",
                cl_ntoh16(mlid), p_mgrp->last_change_id );
     }
     else
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_mgrp_cb: "
-               "Processing mgrp with lid:0x%X change id:%u \n",
+               "Processing mgrp with lid:0x%X change id:%u\n",
                cl_ntoh16(mlid), p_mgrp->last_change_id );
 
       signal =
@@ -1680,7 +1680,7 @@ osm_mcast_mgr_process_mgrp_cb(
     {
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_mgrp_cb: "
-               "Destroying mgrp with lid:0x%X \n",
+               "Destroying mgrp with lid:0x%X\n",
                cl_ntoh16(mlid) );
 
      /* Send a Report to any InformInfo registerd for
index cdfa46d..89e30e9 100644 (file)
@@ -47,6 +47,7 @@
 #  include <config.h>
 #endif /* HAVE_CONFIG_H */
 
+#include <complib/cl_debug.h>
 #include <opensm/osm_mtree.h>
 
 /**********************************************************************
index d07046f..beffd47 100644 (file)
@@ -32,7 +32,6 @@
  */
 
 
-
 /*
  * Abstract:
  *    Implementation of multicast functions.
@@ -261,7 +260,6 @@ osm_mgrp_is_port_present(
   return FALSE;
 }
 
-
 /**********************************************************************
  **********************************************************************/
 static void
@@ -345,7 +343,7 @@ osm_mgrp_send_delete_notice(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_mgrp_send_delete_notice: ERR 7601: "
-             "Error sending trap reports (%s).\n",
+             "Error sending trap reports (%s)\n",
              ib_get_err_str( status ) );
     goto Exit;
   }
@@ -392,7 +390,7 @@ osm_mgrp_send_create_notice(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_mgrp_send_create_notice: ERR 7602: "
-             "Error sending trap reports (%s).\n",
+             "Error sending trap reports (%s)\n",
              ib_get_err_str( status ) );
     goto Exit;
   }
index e502222..68d0bc9 100644 (file)
@@ -82,7 +82,7 @@ __osm_nd_rcv_process_nd(
 
     osm_log( p_rcv->p_log, OSM_LOG_VERBOSE,
              "__osm_nd_rcv_process_nd: "
-             "Node 0x%" PRIx64 "\n\t\t\t\tDescription = %s.\n",
+             "Node 0x%" PRIx64 "\n\t\t\t\tDescription = %s\n",
              cl_ntoh64( osm_node_get_node_guid( p_node )), desc );
   }
 
@@ -91,7 +91,6 @@ __osm_nd_rcv_process_nd(
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 void
@@ -107,13 +106,13 @@ void
 osm_nd_rcv_destroy(
   IN osm_nd_rcv_t* const p_rcv )
 {
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_nd_rcv_destroy );
 
-  CL_ASSERT( p_rcv );
   OSM_LOG_EXIT( p_rcv->p_log );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -124,6 +123,7 @@ osm_nd_rcv_init(
   IN cl_plock_t* const p_lock )
 {
   ib_api_status_t status = IB_SUCCESS;
+
   OSM_LOG_ENTER( p_log, osm_nd_rcv_init );
 
   osm_nd_rcv_construct( p_rcv );
@@ -149,9 +149,10 @@ osm_nd_rcv_process(
   osm_node_t *p_node;
   ib_net64_t node_guid;
 
+  CL_ASSERT( p_rcv );
+
   OSM_LOG_ENTER( p_rcv->p_log, osm_nd_rcv_process );
 
-  CL_ASSERT( p_rcv );
   CL_ASSERT( p_madw );
 
   p_guid_tbl = &p_rcv->p_subn->node_guid_tbl;
@@ -171,7 +172,7 @@ osm_nd_rcv_process(
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "osm_nd_rcv_process: ERR 0B01: "
              "NodeDescription received for nonexistent node "
-             "0x%" PRIx64 ".\n", cl_ntoh64(node_guid) );
+             "0x%" PRIx64 "\n", cl_ntoh64(node_guid) );
   }
   else
   {
index e52b0d8..03c807b 100644 (file)
@@ -88,7 +88,6 @@ osm_nd_rcv_ctrl_destroy(
   cl_disp_unregister( p_ctrl->h_disp );
 }
 
-
 /**********************************************************************
  **********************************************************************/
 ib_api_status_t
@@ -105,7 +104,6 @@ osm_nd_rcv_ctrl_init(
   osm_nd_rcv_ctrl_construct( p_ctrl );
   p_ctrl->p_log = p_log;
 
-
   p_ctrl->p_rcv = p_rcv;
   p_ctrl->p_disp = p_disp;
 
@@ -119,7 +117,7 @@ osm_nd_rcv_ctrl_init(
   {
     osm_log( p_log, OSM_LOG_ERROR,
              "osm_nd_rcv_ctrl_init: ERR 0C01: "
-             "Dispatcher registration failed.\n" );
+             "Dispatcher registration failed\n" );
     status = IB_INSUFFICIENT_RESOURCES;
     goto Exit;
   }
@@ -129,8 +127,3 @@ osm_nd_rcv_ctrl_init(
   return( status );
 }
 
-
-
-
-
-
index afe72a4..ec17dcb 100755 (executable)
@@ -101,7 +101,7 @@ __osm_ni_rcv_set_links(
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "__osm_ni_rcv_set_links: ERR 0D10: "
                "Unexpected removal of neighbor node "
-               "0x%" PRIx64 ".\n",
+               "0x%" PRIx64 "\n",
                cl_ntoh64( p_ni_context->node_guid ) );
     }
     else
@@ -122,7 +122,7 @@ __osm_ni_rcv_set_links(
         {
           osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
                    "__osm_ni_rcv_set_links: "
-                   "Link already exists.\n" );
+                   "Link already exists\n" );
         }
         else
         {
@@ -130,43 +130,79 @@ __osm_ni_rcv_set_links(
           {
             /*
               Uh oh...
+              This means that we found 2 nodes with the same guid,
+              or a 12x link with lane reversal that is not configured correctly.
             */
+            char line[BUF_SIZE];
+            char dr_new_path[BUF_SIZE];
+            char dr_old_path[BUF_SIZE];
+            uint32_t i;
+            osm_dr_path_t *p_path = NULL, *p_old_path = NULL;
+
+            p_physp = osm_node_get_physp_ptr( p_node, port_num );
+            sprintf( dr_new_path, "no_path_available" );
+            if (p_physp)
+            {
+              p_path = osm_physp_get_dr_path_ptr( p_physp );
+              if ( p_path )
+              {
+                sprintf( dr_new_path, "new path:" );
+                for (i = 0; i <= p_path->hop_count; i++ )
+                {
+                  sprintf( line, "[%X]", p_path->path[i] );
+                  strcat( dr_new_path, line );
+                }
+              }
+            }
+
             p_old_neighbor_node = osm_node_get_remote_node(
               p_node, port_num, &old_neighbor_port_num );
+            p_old_physp = osm_node_get_physp_ptr(
+              p_old_neighbor_node,
+              old_neighbor_port_num);
+            sprintf( dr_old_path, "no_path_available" );
+            if (p_old_physp)
+            {
+              p_old_path = osm_physp_get_dr_path_ptr( p_old_physp );
+              if ( p_old_path )
+              {
+                sprintf( dr_old_path, "old_path:" );
+                for (i = 0; i <= p_old_path->hop_count; i++ )
+                {
+                  sprintf( line, "[%X]", p_old_path->path[i] );
+                  strcat( dr_old_path, line );
+                }
+              }
+            }
 
             osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                      "__osm_ni_rcv_set_links: ERR 0D01: "
+                     "Found duplicated guids or 12x link "
+                     "with lane reversal badly configured.\n"
                      "Overriding existing link to:"
                      "node 0x%" PRIx64 ", port number 0x%X connected to:\n"
                      "\t\t\t\told node 0x%" PRIx64 ", "
-                     "port number 0x%X.\n"
+                     "port number 0x%X %s\n"
                      "\t\t\t\tnew node 0x%" PRIx64 ", "
-                     "port number 0x%X.\n",
+                     "port number 0x%X %s\n",
                      cl_ntoh64( osm_node_get_node_guid( p_node ) ),
                      port_num,
                      cl_ntoh64( osm_node_get_node_guid(
                                   p_old_neighbor_node ) ),
                      old_neighbor_port_num ,
+                     dr_old_path,
                      cl_ntoh64( p_ni_context->node_guid ),
-                     p_ni_context->port_num
+                     p_ni_context->port_num,
+                     dr_new_path
                      );
 
-            if (osm_log_is_active(p_rcv->p_log, OSM_LOG_ERROR))
-            {
-              p_physp = osm_node_get_physp_ptr( p_node, port_num );
-              if (p_physp)
-                osm_dump_dr_path(p_rcv->p_log,
-                                 osm_physp_get_dr_path_ptr( p_physp ),
-                                 OSM_LOG_ERROR);
-             
-              p_old_physp = osm_node_get_physp_ptr(
-                p_old_neighbor_node,
-                old_neighbor_port_num);
-              if (p_old_physp)
-                osm_dump_dr_path(p_rcv->p_log,
-                                 osm_physp_get_dr_path_ptr( p_old_physp ),
-                                 OSM_LOG_ERROR);
-            }
+            osm_log( p_rcv->p_log, OSM_LOG_SYS,
+                     "Errors on subnet. SM found duplicated guids or 12x " 
+                     "link with lane reversal badly configured. "
+                     "See osm log for more details\n");
+
+            if ( p_rcv->p_subn->opt.exit_on_fatal == TRUE )
+              exit( 1 );
           }
 
           /* 
@@ -182,7 +218,7 @@ __osm_ni_rcv_set_links(
             osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                      "__osm_ni_rcv_set_links: ERR 0D18: "
                      "Duplicate GUID found by link from a port to itself:"
-                     "node 0x%" PRIx64 ", port number 0x%X \n",
+                     "node 0x%" PRIx64 ", port number 0x%X\n",
                      cl_ntoh64( osm_node_get_node_guid( p_node ) ),
                      port_num );
             p_physp = osm_node_get_physp_ptr( p_node, port_num );
@@ -190,6 +226,14 @@ __osm_ni_rcv_set_links(
               osm_dump_dr_path(p_rcv->p_log,
                                osm_physp_get_dr_path_ptr(p_physp),
                                OSM_LOG_ERROR);
+
+            osm_log( p_rcv->p_log, OSM_LOG_SYS,
+                     "Errors on subnet. Duplicate GUID found "
+                     "by link from a port to itself. "
+                     "See osm log for more details\n");
+
+            if ( p_rcv->p_subn->opt.exit_on_fatal == TRUE )
+              exit( 1 );
           }
           else
           {
@@ -202,7 +246,7 @@ __osm_ni_rcv_set_links(
                        "\n\t\t\t\tnode 0x%" PRIx64 ", "
                        "port number 0x%X and"
                        "\n\t\t\t\tnode 0x%" PRIx64 ", "
-                       "port number 0x%X.\n",
+                       "port number 0x%X\n",
                        cl_ntoh64( osm_node_get_node_guid( p_node ) ),
                        port_num,
                        cl_ntoh64( p_ni_context->node_guid ),
@@ -223,7 +267,7 @@ __osm_ni_rcv_set_links(
   {
     osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
              "__osm_ni_rcv_set_links: "
-             "Nothing to link for our own node 0x%" PRIx64 ".\n",
+             "Nothing to link for our own node 0x%" PRIx64 "\n",
              cl_ntoh64( osm_node_get_node_guid( p_node ) ) );
   }
 
@@ -256,8 +300,6 @@ __osm_ni_rcv_process_new_node(
   p_ni = (ib_node_info_t*)ib_smp_get_payload_ptr( p_smp );
   port_num = ib_node_info_get_local_port_num( p_ni );
 
-  CL_ASSERT( p_node );
-
   /*
     Request PortInfo & NodeDescription attributes for the port
     that responded to the NodeInfo attribute.
@@ -291,7 +333,7 @@ __osm_ni_rcv_process_new_node(
   {
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "__osm_ni_rcv_process_new_node: ERR 0D02: "
-             "Failure initiating PortInfo request (%s).\n",
+             "Failure initiating PortInfo request (%s)\n",
              ib_get_err_str(status));
   }
 
@@ -323,7 +365,6 @@ __osm_ni_rcv_get_node_desc(
   p_ni = (ib_node_info_t*)ib_smp_get_payload_ptr( p_smp );
   port_num = ib_node_info_get_local_port_num( p_ni );
 
-
   /*
     Request PortInfo & NodeDescription attributes for the port
     that responded to the NodeInfo attribute.
@@ -352,7 +393,7 @@ __osm_ni_rcv_get_node_desc(
   {
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "__osm_ni_rcv_get_node_desc: ERR 0D03: "
-             "Failure initiating NodeDescription request (%s).\n",
+             "Failure initiating NodeDescription request (%s)\n",
              ib_get_err_str(status));
   }
 
@@ -426,7 +467,7 @@ __osm_ni_rcv_process_ca_port(
   {
     osm_log( p_rcv->p_log, OSM_LOG_VERBOSE,
              "__osm_ni_rcv_process_ca_port: "
-             "Creating new Port object with GUID = 0x%" PRIx64 ".\n",
+             "Creating new Port object with GUID = 0x%" PRIx64 "\n",
              cl_ntoh64( p_ni->port_guid ) );
 
     osm_node_init_physp( p_node, p_madw );
@@ -436,7 +477,7 @@ __osm_ni_rcv_process_ca_port(
     {
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "__osm_ni_rcv_process_ca_port: ERR 0D04: "
-               "Unable to create new port object.\n" );
+               "Unable to create new port object\n" );
       goto Exit;
     }
 
@@ -453,7 +494,7 @@ __osm_ni_rcv_process_ca_port(
       */
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "__osm_ni_rcv_process_ca_port: ERR 0D12: "
-               "Port 0x%" PRIx64 " already in the database!.\n",
+               "Port 0x%" PRIx64 " already in the database!\n",
                cl_ntoh64( p_ni->port_guid ) );
 
       osm_port_delete( &p_port );
@@ -474,7 +515,7 @@ __osm_ni_rcv_process_ca_port(
       {
         osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                  "__osm_ni_rcv_process_ca_port: ERR 0D08: "
-                 "Error %s adding to list.\n",
+                 "Error %s adding to list\n",
                  CL_STATUS_MSG( cl_status ) );
         osm_port_delete( &p_port );
         goto Exit;
@@ -525,7 +566,7 @@ __osm_ni_rcv_process_ca_port(
   {
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "__osm_ni_rcv_process_ca_port: ERR 0D13: "
-             "Failure initiating PortInfo request (%s).\n",
+             "Failure initiating PortInfo request (%s)\n",
              ib_get_err_str(status));
   }
 
@@ -606,7 +647,7 @@ __osm_ni_rcv_process_switch(
     /* continue despite error */
     osm_log( p_rcv->p_log, OSM_LOG_ERROR,
              "__osm_ni_rcv_process_switch: ERR 0D06: "
-             "Failure initiating SwitchInfo request (%s).\n",
+             "Failure initiating SwitchInfo request (%s)\n",
              ib_get_err_str( status ) );
   }
 
@@ -652,7 +693,7 @@ __osm_ni_rcv_process_existing_switch(
       osm_log( p_rcv->p_log, OSM_LOG_DEBUG,
                "__osm_ni_rcv_process_existing_switch: "
                "Retry to get SwitchInfo on node GUID:0x%"
-             &nb