[INCLUDE] update from Linux ib_types.h .
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 11:03:56 +0000 (11:03 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 7 Feb 2007 11:03:56 +0000 (11:03 +0000)
add new defines and fix some spelling errors

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@575 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

inc/iba/ib_types.h

index 7828f9d..abc0243 100644 (file)
@@ -65,7 +65,7 @@ extern "C"
 * DESCRIPTION\r
 *      The following constants are used throughout the IBA code base.\r
 *\r
-*      Definitions are from the InfiniBand Architecture Specification v1.1\r
+*      Definitions are from the InfiniBand Architecture Specification v1.2\r
 *\r
 *********/\r
 \r
@@ -219,7 +219,7 @@ extern "C"
 *\r
 * SOURCE\r
 */\r
-#define IB_DEFAULT_SUBNET_PREFIX                       (CL_HTON64(CL_CONST64(0xFE80000000000000)))\r
+#define IB_DEFAULT_SUBNET_PREFIX                       (CL_HTON64(0xFE80000000000000ULL))\r
 /**********/\r
 \r
 /****d* IBA Base: Constants/IB_NODE_NUM_PORTS_MAX\r
@@ -374,7 +374,7 @@ extern "C"
 *\r
 * SOURCE\r
 */\r
-#define IB_PKEY_BASE_MASK                                      (CL_NTOH16(0x7FFF))\r
+#define IB_PKEY_BASE_MASK                                      (CL_HTON16(0x7FFF))\r
 /*********/\r
 \r
 /****d* IBA Base: Constants/IB_PKEY_TYPE_MASK\r
@@ -389,6 +389,18 @@ extern "C"
 #define IB_PKEY_TYPE_MASK                                      (CL_NTOH16(0x8000))\r
 /*********/\r
 \r
+/****d* IBA Base: Constants/IB_DEFAULT_PARTIAL_PKEY\r
+* NAME\r
+*      IB_DEFAULT_PARTIAL_PKEY \r
+*\r
+* DESCRIPTION\r
+*      0x7FFF in network order\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_DEFAULT_PARTIAL_PKEY                                       (CL_HTON16(0x7FFF))\r
+/**********/\r
+\r
 /****d* IBA Base: Constants/IB_MCLASS_SUBN_LID\r
 * NAME\r
 *      IB_MCLASS_SUBN_LID\r
@@ -509,6 +521,30 @@ extern "C"
 #define IB_MCLASS_VENDOR_LOW_RANGE_MAX 0x0f\r
 /**********/\r
 \r
+/****d* IBA Base: Constants/IB_MCLASS_DEV_ADM\r
+* NAME\r
+*      IB_MCLASS_DEV_ADM\r
+*\r
+* DESCRIPTION\r
+*      Subnet Management Class, Device Administration\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MCLASS_DEV_ADM 0x10\r
+/**********/\r
+\r
+/****d* IBA Base: Constants/IB_MCLASS_BIS\r
+* NAME\r
+*      IB_MCLASS_BIS\r
+*\r
+* DESCRIPTION\r
+*      Subnet Management Class, BIS\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MCLASS_BIS 0x12\r
+/**********/\r
+\r
 /****d* IBA Base: Constants/IB_MCLASS_VENDOR_HIGH_RANGE_MIN\r
 * NAME\r
 *      IB_MCLASS_VENDOR_HIGH_RANGE_MIN\r
@@ -538,7 +574,7 @@ extern "C"
 *      ib_class_is_vendor_specific_low\r
 *\r
 * DESCRIPTION\r
-*      Indicitates if the Class Code if a vendor specific class from \r
+*      Indicates if the Class Code if a vendor specific class from \r
 *  the low range\r
 *\r
 * SYNOPSIS\r
@@ -570,7 +606,7 @@ ib_class_is_vendor_specific_low(
 *      ib_class_is_vendor_specific_high\r
 *\r
 * DESCRIPTION\r
-*      Indicitates if the Class Code if a vendor specific class from \r
+*      Indicates if the Class Code if a vendor specific class from \r
 *  the high range\r
 *\r
 * SYNOPSIS\r
@@ -603,7 +639,7 @@ ib_class_is_vendor_specific_high(
 *      ib_class_is_vendor_specific\r
 *\r
 * DESCRIPTION\r
-*      Indicitates if the Class Code if a vendor specific class\r
+*      Indicates if the Class Code if a vendor specific class\r
 *\r
 * SYNOPSIS\r
 */\r
@@ -629,6 +665,38 @@ ib_class_is_vendor_specific(
 *  ib_class_is_vendor_specific_low, ib_class_is_vendor_specific_high\r
 *********/\r
 \r
+/****f* IBA Base: Types/ib_class_is_rmpp\r
+* NAME\r
+*      ib_class_is_rmpp\r
+*\r
+* DESCRIPTION\r
+*      Indicates if the Class Code supports RMPP\r
+*\r
+* SYNOPSIS\r
+*/\r
+AL_INLINE boolean_t    AL_API\r
+ib_class_is_rmpp(\r
+        IN              const   uint8_t class_code )\r
+{\r
+       return( (class_code == IB_MCLASS_SUBN_ADM) ||\r
+               (class_code == IB_MCLASS_DEV_MGMT) ||\r
+               (class_code == IB_MCLASS_DEV_ADM) ||\r
+               (class_code == IB_MCLASS_BIS) ||\r
+               ib_class_is_vendor_specific_high( class_code ) ); \r
+}\r
+/*\r
+* PARAMETERS\r
+*      class_code\r
+*              [in] The Management Datagram Class Code\r
+*\r
+* RETURN VALUE\r
+*      TRUE if the class supports RMPP\r
+*      FALSE otherwise.\r
+*\r
+* NOTES\r
+*\r
+*********/\r
+\r
 /*\r
  *     MAD methods\r
  */\r
@@ -1104,6 +1172,18 @@ ib_class_is_vendor_specific(
 #define IB_MAD_ATTR_SMINFO_RECORD                      (CL_NTOH16(0x0018))\r
 /**********/\r
 \r
+/****d* IBA Base: Constants/IB_MAD_ATTR_GUIDINFO_RECORD\r
+* NAME\r
+*       IB_MAD_ATTR_GUIDINFO_RECORD\r
+*\r
+* DESCRIPTION\r
+*       GuidInfoRecord attribute (15.2.5)\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MAD_ATTR_GUIDINFO_RECORD                    (CL_NTOH16(0x0030))\r
+/**********/\r
+\r
 /****d* IBA Base: Constants/IB_MAD_ATTR_VENDOR_DIAG\r
 * NAME\r
 *      IB_MAD_ATTR_VENDOR_DIAG\r
@@ -1142,7 +1222,7 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_LFT_RECORD\r
 *\r
 * DESCRIPTION\r
-*      LinearForwardingRecord attribute (15.2.5.6)\r
+*      LinearForwardingTableRecord attribute (15.2.5.6)\r
 *\r
 * SOURCE\r
 */\r
@@ -1153,7 +1233,7 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_PKEYTBL_RECORD\r
 *\r
 * DESCRIPTION\r
-*      P-KEY table attribute (15.2.5)\r
+*      PKEY Table Record attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
@@ -1175,7 +1255,7 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_VLARB_RECORD\r
 *\r
 * DESCRIPTION\r
-*      VL Arbitration Table attribute (15.2.5)\r
+*      VL Arbitration Table Record attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
@@ -1186,7 +1266,7 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_SLVL_RECORD\r
 *\r
 * DESCRIPTION\r
-*      VSLtoL Map Table attribute (15.2.5)\r
+*      SLtoVL Mapping Table Record attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
@@ -1219,7 +1299,7 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_MULTIPATH_RECORD\r
 *\r
 * DESCRIPTION\r
-*      MultiPath attribute (15.2.5)\r
+*      MultiPathRecord attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
@@ -1230,12 +1310,24 @@ ib_class_is_vendor_specific(
 *      IB_MAD_ATTR_SVC_ASSOCIATION_RECORD\r
 *\r
 * DESCRIPTION\r
-*      Service Association attribute (15.2.5)\r
+*      Service Association Record attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
 #define IB_MAD_ATTR_SVC_ASSOCIATION_RECORD             (CL_NTOH16(0x003B))\r
 /**********/\r
+\r
+/****d* IBA Base: Constants/IB_MAD_ATTR_INFORM_INFO_RECORD\r
+* NAME\r
+*      IB_MAD_ATTR_INFORM_INFO_RECORD\r
+*\r
+* DESCRIPTION\r
+*      InformInfo Record attribute (15.2.5)\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MAD_ATTR_INFORM_INFO_RECORD                 (CL_NTOH16(0x00F3))\r
+\r
 /****d* IBA Base: Constants/IB_MAD_ATTR_IO_UNIT_INFO\r
 * NAME\r
 *      IB_MAD_ATTR_IO_UNIT_INFO\r
@@ -1324,12 +1416,13 @@ ib_class_is_vendor_specific(
 */\r
 #define IB_MAD_ATTR_DIAG_CODE                          (CL_NTOH16(0x0024))\r
 /**********/\r
-/*** IBA Base: Constants/IB_MAD_ATTR_SVC_ASSOCIATION_RECORD\r
+\r
+/****d* IBA Base: Constants/IB_MAD_ATTR_SVC_ASSOCIATION_RECORD\r
 * NAME\r
 *      IB_MAD_ATTR_SVC_ASSOCIATION_RECORD\r
 *\r
 * DESCRIPTION\r
-*      Service Association attribute (15.2.5)\r
+*      Service Association Record attribute (15.2.5)\r
 *\r
 * SOURCE\r
 */\r
@@ -1444,10 +1537,10 @@ ib_class_is_vendor_specific(
 *\r
 * DESCRIPTION\r
 *      Path selector.\r
-*              0: greater than rate specified\r
-*              1: less than rate specified\r
-*              2: exactly the rate specified\r
-*              3: largest rate available\r
+*              0: greater than specified\r
+*              1: less than specified\r
+*              2: exactly the specified\r
+*              3: largest available\r
 *\r
 * SOURCE\r
 */\r
@@ -1506,7 +1599,7 @@ ib_class_is_vendor_specific(
 *      IB_PATH_REC_SELECTOR_MASK\r
 *\r
 * DESCRIPTION\r
-*      Mask for the selector field for path record MTU, rate\r
+*      Mask for the selector field for path record MTU, rate,\r
 *      and packet lifetime.\r
 *\r
 * SOURCE\r
@@ -1518,7 +1611,7 @@ ib_class_is_vendor_specific(
 *      IB_PATH_REC_BASE_MASK\r
 *\r
 * DESCRIPTION\r
-*      Mask for the base value field for path record MTU, rate\r
+*      Mask for the base value field for path record MTU, rate,\r
 *      and packet lifetime.\r
 *\r
 * SOURCE\r
@@ -1526,12 +1619,25 @@ ib_class_is_vendor_specific(
 #define IB_PATH_REC_BASE_MASK                          0x3F\r
 /**********/\r
 \r
+/****d* IBA Base: Constants/IB_MULTIPATH_REC_BASE_MASK\r
+* NAME\r
+*       IB_MULTIPATH_REC_BASE_MASK\r
+*\r
+* DESCRIPTION\r
+*       Mask for the base value field for multipath record MTU, rate,\r
+*       and packet lifetime.\r
+*\r
+* SOURCE\r
+*/\r
+#define IB_MULTIPATH_REC_BASE_MASK                      0x3F\r
+/**********/\r
+\r
 /****h* IBA Base/Type Definitions\r
 * NAME\r
 *      Type Definitions\r
 *\r
 * DESCRIPTION\r
-*      Definitions are from the InfiniBand Architecture Specification v1.1\r
+*      Definitions are from the InfiniBand Architecture Specification v1.2\r
 *\r
 *********/\r
 /****d* IBA Base: Types/ib_net16_t\r
@@ -1764,7 +1870,7 @@ ib_pkey_get_base(
 *      ib_pkey_is_full_member\r
 *\r
 * DESCRIPTION\r
-*      Indicitates if the port is a full member of the parition.\r
+*      Indicates if the port is a full member of the parition.\r
 *\r
 * SYNOPSIS\r
 */\r
@@ -1789,6 +1895,38 @@ ib_pkey_is_full_member(
 * ib_pkey_get_base, ib_net16_t\r
 *********/\r
 \r
+/****f* IBA Base: Types/ib_pkey_is_invalid\r
+* NAME\r
+*      ib_pkey_is_invalid\r
+*\r
+* DESCRIPTION\r
+*      Returns TRUE if the given P_Key is an invalid P_Key\r
+*  C10-116: the CI shall regard a P_Key as invalid if its low-order\r
+*           15 bits are all zero...\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline boolean_t        \r
+ib_pkey_is_invalid(\r
+       IN      const   ib_net16_t              pkey )\r
+{\r
+  if (ib_pkey_get_base(pkey) == 0x0000)\r
+    return TRUE;\r
+  return FALSE;\r
+}\r
+/*\r
+* PARAMETERS\r
+*      pkey\r
+*              [in] P_Key value\r
+*\r
+* RETURN VALUE\r
+*      Returns the base P_Key value with the membership bit stripped.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
 /****d* IBA Base: Types/ib_gid_t\r
 * NAME\r
 *      ib_gid_t\r
@@ -1945,8 +2083,7 @@ ib_gid_is_site_local(
        IN              const   ib_gid_t* const                         p_gid )\r
 {\r
        return( ( ib_gid_get_subnet_prefix( p_gid ) &\r
-               CL_HTON64( CL_CONST64(0xFFFFFFFFFFFF0000) ) ) ==\r
-               CL_HTON64( CL_CONST64(0xFEC0000000000000) ) );\r
+               CL_HTON64( 0xFFFFFFFFFFFF0000ULL ) ) == CL_HTON64( 0xFEC0000000000000ULL ) );\r
 }\r
 /*\r
 * PARAMETERS\r
@@ -2132,71 +2269,80 @@ typedef __declspec(align(8)) struct _ib_path_rec
 #define IB_PR_COMPMASK_PFTLIFETIME                     (CL_HTON64(1<<21))\r
 \r
 /* Link Record Component Masks */\r
-#define IB_LR_COMPMASK_FROM_LID                                (CL_HTON64(1<<0))\r
-#define IB_LR_COMPMASK_FROM_PORT                       (CL_HTON64(1<<1))\r
-#define IB_LR_COMPMASK_TO_PORT                         (CL_HTON64(1<<2))\r
-#define IB_LR_COMPMASK_TO_LID                          (CL_HTON64(1<<3))\r
+#define IB_LR_COMPMASK_FROM_LID           (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_LR_COMPMASK_FROM_PORT          (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_LR_COMPMASK_TO_PORT            (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_LR_COMPMASK_TO_LID             (CL_HTON64(((uint64_t)1)<<3))\r
 \r
 /* VL Arbitration Record MASKs */\r
-#define IB_VLA_COMPMASK_LID                                    (CL_HTON64(1<<0))\r
-#define IB_VLA_COMPMASK_OUT_PORT                       (CL_HTON64(1<<1))\r
-#define IB_VLA_COMPMASK_BLOCK                          (CL_HTON64(1<<2))\r
+#define IB_VLA_COMPMASK_LID               (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_VLA_COMPMASK_OUT_PORT          (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_VLA_COMPMASK_BLOCK             (CL_HTON64(((uint64_t)1)<<2))\r
+\r
 /* SLtoVL Mapping Record Masks */\r
-#define IB_SLVL_COMPMASK_LID                           (CL_HTON64(1<<0))\r
-#define IB_SLVL_COMPMASK_IN_PORT                       (CL_HTON64(1<<1))\r
-#define IB_SLVL_COMPMASK_OUT_PORT                      (CL_HTON64(1<<2))\r
+#define IB_SLVL_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_SLVL_COMPMASK_IN_PORT          (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_SLVL_COMPMASK_OUT_PORT         (CL_HTON64(((uint64_t)1)<<2))\r
+\r
+/* P_Key Table Record Masks */\r
+#define IB_PKEY_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_PKEY_COMPMASK_BLOCK            (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_PKEY_COMPMASK_PORT             (CL_HTON64(((uint64_t)1)<<2))\r
+\r
 /* LFT Record MASKS */\r
-#define IB_LFTR_COMPMASK_LID                           (CL_HTON64(1<<0))\r
-#define IB_LFTR_COMPMASK_BLOCK                         (CL_HTON64(1<<1))\r
-/* ModeInfo Record MASKS */\r
-#define IB_NR_COMPMASK_LID                                     (CL_HTON64(1<<0))\r
-#define IB_NR_COMPMASK_RESERVED1                       (CL_HTON64(1<<1))\r
-#define IB_NR_COMPMASK_BASEVERSION                     (CL_HTON64(1<<2))\r
-#define IB_NR_COMPMASK_CLASSVERSION                    (CL_HTON64(1<<3))\r
-#define IB_NR_COMPMASK_NODETYPE                                (CL_HTON64(1<<4))\r
-#define IB_NR_COMPMASK_NUMPORTS                                (CL_HTON64(1<<5))\r
-#define IB_NR_COMPMASK_SYSIMAGEGUID                    (CL_HTON64(1<<6))\r
-#define IB_NR_COMPMASK_NODEGUID                                (CL_HTON64(1<<7))\r
-#define IB_NR_COMPMASK_PORTGUID                                (CL_HTON64(1<<8))\r
-#define IB_NR_COMPMASK_PARTCAP                         (CL_HTON64(1<<9))\r
-#define IB_NR_COMPMASK_DEVID                           (CL_HTON64(1<<10))\r
-#define IB_NR_COMPMASK_REV                                     (CL_HTON64(1<<11))\r
-#define IB_NR_COMPMASK_PORTNUM                         (CL_HTON64(1<<12))\r
-#define IB_NR_COMPMASK_VENDID                          (CL_HTON64(1<<13))\r
-#define IB_NR_COMPMASK_NODEDESC                                (CL_HTON64(1<<14))\r
-/* Service Record Component Mask Sec 15.2.5.14 Ver 1.1*/\r
-#define IB_SR_COMPMASK_SID                                     (CL_HTON64(1<<0))\r
-#define IB_SR_COMPMASK_SGID                                    (CL_HTON64(1<<1))\r
-#define IB_SR_COMPMASK_SPKEY                           (CL_HTON64(1<<2))\r
-#define IB_SR_COMPMASK_RES1                                    (CL_HTON64(1<<3))\r
-#define IB_SR_COMPMASK_SLEASE                          (CL_HTON64(1<<4))\r
-#define IB_SR_COMPMASK_SKEY                                    (CL_HTON64(1<<5))\r
-#define IB_SR_COMPMASK_SNAME                           (CL_HTON64(1<<6))\r
-#define IB_SR_COMPMASK_SDATA8_0                                (CL_HTON64(1<<7))\r
-#define IB_SR_COMPMASK_SDATA8_1                                (CL_HTON64(1<<8))\r
-#define IB_SR_COMPMASK_SDATA8_2                                (CL_HTON64(1<<9))\r
-#define IB_SR_COMPMASK_SDATA8_3                                (CL_HTON64(1<<10))\r
-#define IB_SR_COMPMASK_SDATA8_4                                (CL_HTON64(1<<11))\r
-#define IB_SR_COMPMASK_SDATA8_5                                (CL_HTON64(1<<12))\r
-#define IB_SR_COMPMASK_SDATA8_6                                (CL_HTON64(1<<13))\r
-#define IB_SR_COMPMASK_SDATA8_7                                (CL_HTON64(1<<14))\r
-#define IB_SR_COMPMASK_SDATA8_8                                (CL_HTON64(1<<15))\r
-#define IB_SR_COMPMASK_SDATA8_9                                (CL_HTON64(1<<16))\r
-#define IB_SR_COMPMASK_SDATA8_10                       (CL_HTON64(1<<17))\r
-#define IB_SR_COMPMASK_SDATA8_11                       (CL_HTON64(1<<18))\r
-#define IB_SR_COMPMASK_SDATA8_12                       (CL_HTON64(1<<19))\r
-#define IB_SR_COMPMASK_SDATA8_13                       (CL_HTON64(1<<20))\r
-#define IB_SR_COMPMASK_SDATA8_14                       (CL_HTON64(1<<21))\r
-#define IB_SR_COMPMASK_SDATA8_15                       (CL_HTON64(1<<22))\r
-#define IB_SR_COMPMASK_SDATA16_0                       (CL_HTON64(1<<23))\r
-#define IB_SR_COMPMASK_SDATA16_1                       (CL_HTON64(1<<24))\r
-#define IB_SR_COMPMASK_SDATA16_2                       (CL_HTON64(1<<25))\r
-#define IB_SR_COMPMASK_SDATA16_3                       (CL_HTON64(1<<26))\r
-#define IB_SR_COMPMASK_SDATA16_4                       (CL_HTON64(1<<27))\r
-#define IB_SR_COMPMASK_SDATA16_5                       (CL_HTON64(1<<28))\r
-#define IB_SR_COMPMASK_SDATA16_6                       (CL_HTON64(1<<29))\r
-#define IB_SR_COMPMASK_SDATA16_7                       (CL_HTON64(1<<30))\r
-#define IB_SR_COMPMASK_SDATA32_0                       (CL_HTON64(1<<31))\r
+#define IB_LFTR_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_LFTR_COMPMASK_BLOCK            (CL_HTON64(((uint64_t)1)<<1))\r
+\r
+/* NodeInfo Record Masks */\r
+#define IB_NR_COMPMASK_LID                (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_NR_COMPMASK_RESERVED1          (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_NR_COMPMASK_BASEVERSION        (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_NR_COMPMASK_CLASSVERSION       (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_NR_COMPMASK_NODETYPE           (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_NR_COMPMASK_NUMPORTS           (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_NR_COMPMASK_SYSIMAGEGUID       (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_NR_COMPMASK_NODEGUID           (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_NR_COMPMASK_PORTGUID           (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_NR_COMPMASK_PARTCAP            (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_NR_COMPMASK_DEVID              (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_NR_COMPMASK_REV                (CL_HTON64(((uint64_t)1)<<11))\r
+#define IB_NR_COMPMASK_PORTNUM            (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_NR_COMPMASK_VENDID             (CL_HTON64(((uint64_t)1)<<13))\r
+#define IB_NR_COMPMASK_NODEDESC           (CL_HTON64(((uint64_t)1)<<14))\r
+\r
+/* Service Record Component Masks Sec 15.2.5.14 Ver 1.1*/\r
+#define IB_SR_COMPMASK_SID                (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_SR_COMPMASK_SGID               (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_SR_COMPMASK_SPKEY              (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_SR_COMPMASK_RES1               (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_SR_COMPMASK_SLEASE             (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_SR_COMPMASK_SKEY               (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_SR_COMPMASK_SNAME              (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_SR_COMPMASK_SDATA8_0           (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_SR_COMPMASK_SDATA8_1           (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_SR_COMPMASK_SDATA8_2           (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_SR_COMPMASK_SDATA8_3           (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_SR_COMPMASK_SDATA8_4           (CL_HTON64(((uint64_t)1)<<11))\r
+#define IB_SR_COMPMASK_SDATA8_5           (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_SR_COMPMASK_SDATA8_6           (CL_HTON64(((uint64_t)1)<<13))\r
+#define IB_SR_COMPMASK_SDATA8_7           (CL_HTON64(((uint64_t)1)<<14))\r
+#define IB_SR_COMPMASK_SDATA8_8           (CL_HTON64(((uint64_t)1)<<15))\r
+#define IB_SR_COMPMASK_SDATA8_9           (CL_HTON64(((uint64_t)1)<<16))\r
+#define IB_SR_COMPMASK_SDATA8_10       (CL_HTON64(((uint64_t)1)<<17))\r
+#define IB_SR_COMPMASK_SDATA8_11       (CL_HTON64(((uint64_t)1)<<18))\r
+#define IB_SR_COMPMASK_SDATA8_12       (CL_HTON64(((uint64_t)1)<<19))\r
+#define IB_SR_COMPMASK_SDATA8_13       (CL_HTON64(((uint64_t)1)<<20))\r
+#define IB_SR_COMPMASK_SDATA8_14       (CL_HTON64(((uint64_t)1)<<21))\r
+#define IB_SR_COMPMASK_SDATA8_15       (CL_HTON64(((uint64_t)1)<<22))\r
+#define IB_SR_COMPMASK_SDATA16_0       (CL_HTON64(((uint64_t)1)<<23))\r
+#define IB_SR_COMPMASK_SDATA16_1       (CL_HTON64(((uint64_t)1)<<24))\r
+#define IB_SR_COMPMASK_SDATA16_2       (CL_HTON64(((uint64_t)1)<<25))\r
+#define IB_SR_COMPMASK_SDATA16_3       (CL_HTON64(((uint64_t)1)<<26))\r
+#define IB_SR_COMPMASK_SDATA16_4       (CL_HTON64(((uint64_t)1)<<27))\r
+#define IB_SR_COMPMASK_SDATA16_5       (CL_HTON64(((uint64_t)1)<<28))\r
+#define IB_SR_COMPMASK_SDATA16_6       (CL_HTON64(((uint64_t)1)<<29))\r
+#define IB_SR_COMPMASK_SDATA16_7       (CL_HTON64(((uint64_t)1)<<30))\r
+#define IB_SR_COMPMASK_SDATA32_0       (CL_HTON64(((uint64_t)1)<<31))\r
 #define IB_SR_COMPMASK_SDATA32_1                       (CL_HTON64(((uint64_t)1)<<32))\r
 #define IB_SR_COMPMASK_SDATA32_2                       (CL_HTON64(((uint64_t)1)<<33))\r
 #define IB_SR_COMPMASK_SDATA32_3                       (CL_HTON64(((uint64_t)1)<<34))\r
@@ -2252,25 +2398,92 @@ typedef __declspec(align(8)) struct _ib_path_rec
 #define IB_PIR_COMPMASK_LOCALPHYERR                    (CL_HTON64(((uint64_t)1)<<46))\r
 #define IB_PIR_COMPMASK_OVERRUNERR                     (CL_HTON64(((uint64_t)1)<<47))\r
 /* Multicast Member Record Component Masks */\r
-#define IB_MCR_COMPMASK_GID                                    (CL_HTON64(1<<0))\r
-#define IB_MCR_COMPMASK_MGID                           (CL_HTON64(1<<0))\r
-#define IB_MCR_COMPMASK_PORT_GID                       (CL_HTON64(1<<1))\r
-#define IB_MCR_COMPMASK_QKEY                           (CL_HTON64(1<<2))\r
-#define IB_MCR_COMPMASK_MLID                           (CL_HTON64(1<<3))\r
-#define IB_MCR_COMPMASK_MTU_SEL                                (CL_HTON64(1<<4))\r
-#define IB_MCR_COMPMASK_MTU                                    (CL_HTON64(1<<5))\r
-#define IB_MCR_COMPMASK_TCLASS                         (CL_HTON64(1<<6))\r
-#define IB_MCR_COMPMASK_PKEY                           (CL_HTON64(1<<7))\r
-#define IB_MCR_COMPMASK_RATE_SEL                       (CL_HTON64(1<<8))\r
-#define IB_MCR_COMPMASK_RATE                           (CL_HTON64(1<<9))\r
-#define IB_MCR_COMPMASK_LIFE_SEL                       (CL_HTON64(1<<10))\r
-#define IB_MCR_COMPMASK_LIFE                           (CL_HTON64(1<<11))\r
-#define IB_MCR_COMPMASK_SL                                     (CL_HTON64(1<<12))\r
-#define IB_MCR_COMPMASK_FLOW                           (CL_HTON64(1<<13))\r
-#define IB_MCR_COMPMASK_HOP                                    (CL_HTON64(1<<14))\r
-#define IB_MCR_COMPMASK_SCOPE                          (CL_HTON64(1<<15))\r
-#define IB_MCR_COMPMASK_JOIN_STATE                     (CL_HTON64(1<<16))\r
-#define IB_MCR_COMPMASK_PROXY                          (CL_HTON64(1<<17))\r
+#define IB_MCR_COMPMASK_GID         (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_MCR_COMPMASK_MGID        (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_MCR_COMPMASK_PORT_GID    (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_MCR_COMPMASK_QKEY        (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_MCR_COMPMASK_MLID        (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_MCR_COMPMASK_MTU_SEL     (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_MCR_COMPMASK_MTU         (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_MCR_COMPMASK_TCLASS      (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_MCR_COMPMASK_PKEY        (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_MCR_COMPMASK_RATE_SEL    (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_MCR_COMPMASK_RATE        (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_MCR_COMPMASK_LIFE_SEL    (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_MCR_COMPMASK_LIFE        (CL_HTON64(((uint64_t)1)<<11))\r
+#define IB_MCR_COMPMASK_SL          (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_MCR_COMPMASK_FLOW        (CL_HTON64(((uint64_t)1)<<13))\r
+#define IB_MCR_COMPMASK_HOP         (CL_HTON64(((uint64_t)1)<<14))\r
+#define IB_MCR_COMPMASK_SCOPE       (CL_HTON64(((uint64_t)1)<<15))\r
+#define IB_MCR_COMPMASK_JOIN_STATE  (CL_HTON64(((uint64_t)1)<<16))\r
+#define IB_MCR_COMPMASK_PROXY       (CL_HTON64(((uint64_t)1)<<17))\r
+\r
+/* GUID Info Record Component Masks */\r
+#define IB_GIR_COMPMASK_LID            (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_GIR_COMPMASK_BLOCKNUM       (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_GIR_COMPMASK_RESV1          (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_GIR_COMPMASK_RESV2          (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_GIR_COMPMASK_GID0           (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_GIR_COMPMASK_GID1           (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_GIR_COMPMASK_GID2           (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_GIR_COMPMASK_GID3           (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_GIR_COMPMASK_GID4           (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_GIR_COMPMASK_GID5           (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_GIR_COMPMASK_GID6           (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_GIR_COMPMASK_GID7           (CL_HTON64(((uint64_t)1)<<11))\r
+\r
+/* MultiPath Record Component Masks */\r
+#define IB_MPR_COMPMASK_RAWTRAFFIC     (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_MPR_COMPMASK_RESV0          (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_MPR_COMPMASK_FLOWLABEL      (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_MPR_COMPMASK_HOPLIMIT       (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_MPR_COMPMASK_TCLASS         (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_MPR_COMPMASK_REVERSIBLE     (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_MPR_COMPMASK_NUMBPATH       (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_MPR_COMPMASK_PKEY           (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_MPR_COMPMASK_RESV1          (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_MPR_COMPMASK_SL             (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_MPR_COMPMASK_MTUSELEC       (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_MPR_COMPMASK_MTU            (CL_HTON64(((uint64_t)1)<<11))\r
+#define IB_MPR_COMPMASK_RATESELEC      (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_MPR_COMPMASK_RATE           (CL_HTON64(((uint64_t)1)<<13))\r
+#define IB_MPR_COMPMASK_PKTLIFETIMESELEC (CL_HTON64(((uint64_t)1)<<14))\r
+#define IB_MPR_COMPMASK_PKTLIFETIME    (CL_HTON64(((uint64_t)1)<<15))\r
+#define IB_MPR_COMPMASK_RESV2          (CL_HTON64(((uint64_t)1)<<16))\r
+#define IB_MPR_COMPMASK_INDEPSELEC     (CL_HTON64(((uint64_t)1)<<17))\r
+#define IB_MPR_COMPMASK_RESV3          (CL_HTON64(((uint64_t)1)<<18))\r
+#define IB_MPR_COMPMASK_SGIDCOUNT      (CL_HTON64(((uint64_t)1)<<19))\r
+#define IB_MPR_COMPMASK_DGIDCOUNT      (CL_HTON64(((uint64_t)1)<<20))\r
+#define IB_MPR_COMPMASK_RESV4          (CL_HTON64(((uint64_t)1)<<21))\r
+\r
+/* SMInfo Record Component Masks */\r
+#define IB_SMIR_COMPMASK_LID           (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_SMIR_COMPMASK_RESV0         (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_SMIR_COMPMASK_GUID          (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_SMIR_COMPMASK_SMKEY         (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_SMIR_COMPMASK_ACTCOUNT      (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_SMIR_COMPMASK_PRIORITY      (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_SMIR_COMPMASK_SMSTATE       (CL_HTON64(((uint64_t)1)<<6))\r
+\r
+/* InformInfo Record Component Masks */\r
+#define IB_IIR_COMPMASK_SUBSCRIBERGID  (CL_HTON64(((uint64_t)1)<<0))\r
+#define IB_IIR_COMPMASK_ENUM           (CL_HTON64(((uint64_t)1)<<1))\r
+#define IB_IIR_COMPMASK_RESV0          (CL_HTON64(((uint64_t)1)<<2))\r
+#define IB_IIR_COMPMASK_GID            (CL_HTON64(((uint64_t)1)<<3))\r
+#define IB_IIR_COMPMASK_LIDRANGEBEGIN  (CL_HTON64(((uint64_t)1)<<4))\r
+#define IB_IIR_COMPMASK_LIDRANGEEND    (CL_HTON64(((uint64_t)1)<<5))\r
+#define IB_IIR_COMPMASK_RESV1          (CL_HTON64(((uint64_t)1)<<6))\r
+#define IB_IIR_COMPMASK_ISGENERIC      (CL_HTON64(((uint64_t)1)<<7))\r
+#define IB_IIR_COMPMASK_SUBSCRIBE      (CL_HTON64(((uint64_t)1)<<8))\r
+#define IB_IIR_COMPMASK_TYPE           (CL_HTON64(((uint64_t)1)<<9))\r
+#define IB_IIR_COMPMASK_TRAPNUMB       (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_IIR_COMPMASK_DEVICEID       (CL_HTON64(((uint64_t)1)<<10))\r
+#define IB_IIR_COMPMASK_QPN            (CL_HTON64(((uint64_t)1)<<11))\r
+#define IB_IIR_COMPMASK_RESV2          (CL_HTON64(((uint64_t)1)<<12))\r
+#define IB_IIR_COMPMASK_RESPTIME       (CL_HTON64(((uint64_t)1)<<13))\r
+#define IB_IIR_COMPMASK_RESV3          (CL_HTON64(((uint64_t)1)<<14))\r
+#define IB_IIR_COMPMASK_PRODTYPE       (CL_HTON64(((uint64_t)1)<<15))\r
+#define IB_IIR_COMPMASK_VENDID         (CL_HTON64(((uint64_t)1)<<15))\r
 \r
 /****f* IBA Base: Types/ib_path_rec_init_local\r
 * NAME\r
@@ -2381,6 +2594,35 @@ ib_path_rec_init_local(
 *      ib_gid_t\r
 *********/\r
 \r
+/****f* IBA Base: Types/ib_path_rec_num_path\r
+* NAME\r
+*      ib_path_rec_num_path\r
+*\r
+* DESCRIPTION\r
+*      Get max number of paths to return.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint8_t  \r
+ib_path_rec_num_path(\r
+       IN      const   ib_path_rec_t* const    p_rec )\r
+{\r
+       return( p_rec->num_path &0x7F );\r
+}\r
+/*\r
+* PARAMETERS\r
+*      p_rec\r
+*              [in] Pointer to the path record object.\r
+*\r
+* RETURN VALUES\r
+*      Maximum number of paths to return for each unique SGID_DGID combination.\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*      ib_path_rec_t\r
+*********/\r
+\r
 /****f* IBA Base: Types/ib_path_rec_sl\r
 * NAME\r
 *      ib_path_rec_sl\r
@@ -2402,13 +2644,7 @@ ib_path_rec_sl(
 *              [in] Pointer to the path record object.\r
 *\r
 * RETURN VALUES\r
-*      Encoded path MTU.\r
-*              1: 256\r
-*              2: 512\r
-*              3: 1024\r
-*              4: 2048\r
-*              5: 4096\r
-*              others: reserved\r
+*      SL.\r
 *\r
 * NOTES\r
 *\r
@@ -2509,6 +2745,12 @@ ib_path_rec_rate(
 *              2: 2.5 Gb/sec.\r
 *              3: 10 Gb/sec.\r
 *              4: 30 Gb/sec.\r
+*              5: 5 Gb/sec.\r
+*              6: 20 Gb/sec.\r
+*              7: 40 Gb/sec.\r
+*              8: 60 Gb/sec.\r
+*              9: 80 Gb/sec.\r
+*              10: 120 Gb/sec.\r
 *              others: reserved\r
 *\r
 * NOTES\r
@@ -2571,7 +2813,7 @@ ib_path_rec_pkt_life(
 *              [in] Pointer to the path record object.\r
 *\r
 * RETURN VALUES\r
-*      Encoded path pkt_life = 4.096 ┬Ásec * 2 PacketLifeTime.\r
+*      Encoded path pkt_life = 4.096 ┬Ásec * 2 ** PacketLifeTime.\r
 *\r
 * NOTES\r
 *\r
@@ -3256,7 +3498,8 @@ ib_rmpp_get_resp_time(
 *\r
 * SOURCE\r
 */\r
-#define IB_SMP_DIRECTION                       (CL_HTON16(0x8000))\r
+#define IB_SMP_DIRECTION_HO            0x8000\r
+#define IB_SMP_DIRECTION               (CL_HTON16(IB_SMP_DIRECTION_HO))\r
 /**********/\r
 \r
 /****d* IBA Base: Constants/IB_SMP_STATUS_MASK\r
@@ -3268,7 +3511,8 @@ ib_rmpp_get_resp_time(
 *\r
 * SOURCE\r
 */\r
-#define IB_SMP_STATUS_MASK                     (CL_HTON16(0x7FFF))\r
+#define IB_SMP_STATUS_MASK_HO          0x7FFF\r
+#define IB_SMP_STATUS_MASK             (CL_HTON16(IB_SMP_STATUS_MASK_HO))\r
 /**********/\r
 \r
 /****s* IBA Base: Types/ib_smp_t\r
@@ -3807,12 +4051,12 @@ typedef struct _ib_port_info
        uint8_t                         link_width_enabled;\r
        uint8_t                         link_width_supported;\r
        uint8_t                         link_width_active;\r
-       uint8_t                         state_info1; // LinkSpeedSupported and PortState\r
-       uint8_t                         state_info2; // PortPhysState and LinkDownDefaultState\r
+       uint8_t                         state_info1; /* LinkSpeedSupported and PortState */\r
+       uint8_t                         state_info2; /* PortPhysState and LinkDownDefaultState */\r
        uint8_t                         mkey_lmc;\r
-       uint8_t                         link_speed;      // LinkSpeedEnabled and LinkSpeedActive\r
+       uint8_t                         link_speed;      /* LinkSpeedEnabled and LinkSpeedActive */\r
        uint8_t                         mtu_smsl;\r
-       uint8_t                         vl_cap;          // VlCap and InitType\r
+       uint8_t                         vl_cap;          /* VLCap and InitType */\r
        uint8_t                         vl_high_limit;\r
        uint8_t                         vl_arb_high_cap;\r
        uint8_t                         vl_arb_low_cap;\r
@@ -3823,7 +4067,8 @@ typedef struct _ib_port_info
        ib_net16_t                      p_key_violations;\r
        ib_net16_t                      q_key_violations;\r
        uint8_t                         guid_cap;\r
-       uint8_t                         subnet_timeout;\r
+       uint8_t                         subnet_timeout; /* cli_rereg(1b), resrv(\r
+2b), timeout(5b) */\r
        uint8_t                         resp_time_value;\r
        uint8_t                         error_threshold;\r
 \r
@@ -3833,12 +4078,16 @@ typedef struct _ib_port_info
 \r
 #define IB_PORT_STATE_MASK                                                     0x0F\r
 #define IB_PORT_LMC_MASK                                                       0x07\r
+#define IB_PORT_LMC_MAX                                0x07\r
 #define IB_PORT_MPB_MASK                                                       0xC0\r
 #define IB_PORT_MPB_SHIFT                                                      6\r
 #define IB_PORT_LINK_SPEED_SHIFT                                       4\r
 #define IB_PORT_LINK_SPEED_SUPPORTED_MASK                      0xF0\r
 #define IB_PORT_LINK_SPEED_ACTIVE_MASK                         0xF0\r
 #define IB_PORT_LINK_SPEED_ENABLED_MASK                                0x0F\r
+#define IB_PORT_PHYS_STATE_MASK                        0xF0\r
+#define IB_PORT_PHYS_STATE_SHIFT               4\r
+#define IB_PORT_LNKDWNDFTSTATE_MASK            0x0F\r
 \r
 #define IB_PORT_CAP_RESV0                      (CL_NTOH32(0x00000001))\r
 #define IB_PORT_CAP_IS_SM                      (CL_NTOH32(0x00000002))\r
@@ -3958,6 +4207,35 @@ ib_port_info_get_vl_cap(
 *\r
 * SEE ALSO\r
 *********/\r
+\r
+/****f* IBA Base: Types/ib_port_info_get_init_type\r
+* NAME\r
+*      ib_port_info_get_init_type\r
+*\r
+* DESCRIPTION\r
+*      Gets the init type of a port.\r
+*\r
+* SYNOPSIS\r
+*/\r
+static inline uint8_t  \r
+ib_port_info_get_init_type(\r
+       IN const ib_port_info_t* const p_pi)\r
+{\r
+       return (uint8_t) (p_pi->vl_cap & 0x0F);\r
+}\r
+/*\r
+* PARAMETERS\r
+*      p_pi\r
+*              [in] Pointer to a PortInfo attribute.\r
+*\r
+* RETURN VALUES\r
+*      InitType field\r
+*\r
+* NOTES\r
+*\r
+* SEE ALSO\r
+*********/\r
+\r
 /****f* IBA Base: Types/ib_port_info_get_op_vls\r
 * NAME\r
 *      ib_port_info_get_op_vls\r
@@ -4029,7 +4307,7 @@ AL_INLINE void AL_API
 ib_port_info_set_state_no_change(\r
        IN                              ib_port_info_t* const           p_pi )\r
 {\r
-       ib_port_info_set_port_state( p_pi, 0 );\r
+       ib_port_info_set_port_state( p_pi, IB_LINK_NO_CHANGE );\r
        p_pi->state_info2 = 0;\r
 }\r
 /*\r