[Openib-windows] [openib-general] ib_types.h and Win/Linux consolidation

Fabian Tillier ftillier at silverstorm.com
Mon Jul 10 06:21:35 PDT 2006


Hi Eitan,

A lot of the changes are whitespace, comments, and repeated things
like using the AL_API and AL_INLINE macros versus static inline.

Could you filter these out and send out what the actual changes that
matter are?  I quickly lost interest here.

Also, the AL_API and AL_INLINE stuff cannot go away in Windows, so if
this is an issue for Linux OpenSM, then we should stop now.

- Fab

On 7/10/06, Eitan Zahavi <eitan at mellanox.co.il> wrote:
> > Can you please resend as inline text, or at the very least a plain text attachment?
>
> Enjoy:
>
> 2c2,3
> <  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.
> ---
> >  * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
> >  * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
> 5,6c6,10
> <  * This software is available to you under the OpenIB.org BSD license
> <  * below:
> ---
> >  * This software is available to you under a choice of one of two
> >  * licenses.  You may choose to be licensed under the terms of the GNU
> >  * General Public License (GPL) Version 2, available from the file
> >  * COPYING in the main directory of this source tree, or the
> >  * OpenIB.org BSD license below:
> 30c34
> <  * $Id: ib_types.h 381 2006-06-08 17:10:14Z ftillier $
> ---
> >  * $Id: ib_types.h 8291 2006-06-29 18:53:06Z halr $
> 36a41
> > #include <string.h>
> 40,54d44
> < #ifdef CL_KERNEL
> <       #define AL_EXPORT
> <       #define AL_API
> <       #define AL_INLINE       static inline
> < #else
> <       #if defined( EXPORT_AL_SYMBOLS )
> <               #define AL_EXPORT       __declspec(dllexport)
> <       #else
> <               #define AL_EXPORT       __declspec(dllimport)
> <       #endif
> <       #define AL_API          __stdcall
> <       #define AL_INLINE       AL_EXPORT inline
> < #endif        /* CL_KERNEL */
> <
> <
> 56,57c46,50
> < extern "C"
> < {
> ---
> > #  define BEGIN_C_DECLS extern "C" {
> > #  define END_C_DECLS   }
> > #else /* !__cplusplus */
> > #  define BEGIN_C_DECLS
> > #  define END_C_DECLS
> 59a53
> > BEGIN_C_DECLS
> 222c216
> < #define IB_DEFAULT_SUBNET_PREFIX                      (CL_HTON64(CL_CONST64(0xFE80000000000000)))
> ---
> > #define IB_DEFAULT_SUBNET_PREFIX                      (CL_HTON64(0xFE80000000000000ULL))
> 365c359
> < #define IB_PKEY_ENTRIES_MAX (IB_PKEY_MAX_BLOCKS * IB_PKEY_BLOCK_SIZE)
> ---
> > #define IB_PKEY_ENTRIES_MAX (IB_PKEY_MAX_BLOCKS * IB_NUM_PKEY_ELEMENTS_IN_BLOCK)
> 377c371
> < #define IB_PKEY_BASE_MASK                                     (CL_NTOH16(0x7FFF))
> ---
> > #define IB_PKEY_BASE_MASK                                     (CL_HTON16(0x7FFF))
> 391a386,397
> > /****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))
> > /**********/
> >
> 511a518,541
> > /****d* IBA Base: Constants/IB_MCLASS_DEV_ADM
> > * NAME
> > *     IB_MCLASS_DEV_ADM
> > *
> > * DESCRIPTION
> > *     Subnet Management Class, Device Administration
> > *
> > * SOURCE
> > */
> > #define IB_MCLASS_DEV_ADM 0x10
> > /**********/
> >
> > /****d* IBA Base: Constants/IB_MCLASS_BIS
> > * NAME
> > *     IB_MCLASS_BIS
> > *
> > * DESCRIPTION
> > *     Subnet Management Class, BIS
> > *
> > * SOURCE
> > */
> > #define IB_MCLASS_BIS 0x12
> > /**********/
> >
> 541c571
> < *     Indicitates if the Class Code if a vendor specific class from
> ---
> > *     Indicates if the Class Code if a vendor specific class from
> 573c603
> < *     Indicitates if the Class Code if a vendor specific class from
> ---
> > *     Indicates if the Class Code if a vendor specific class from
> 606c636
> < *     Indicitates if the Class Code if a vendor specific class
> ---
> > *     Indicates if the Class Code if a vendor specific class
> 631a662,693
> > /****f* IBA Base: Types/ib_class_is_rmpp
> > * NAME
> > *     ib_class_is_rmpp
> > *
> > * DESCRIPTION
> > *     Indicates if the Class Code supports RMPP
> > *
> > * SYNOPSIS
> > */
> > static inline boolean_t
> > ib_class_is_rmpp(
> >         IN              const   uint8_t class_code )
> > {
> >       return( (class_code == IB_MCLASS_SUBN_ADM) ||
> >               (class_code == IB_MCLASS_DEV_MGMT) ||
> >               (class_code == IB_MCLASS_DEV_ADM) ||
> >               (class_code == IB_MCLASS_BIS) ||
> >               ib_class_is_vendor_specific_high( class_code ) );
> > }
> > /*
> > * PARAMETERS
> > *     class_code
> > *             [in] The Management Datagram Class Code
> > *
> > * RETURN VALUE
> > *     TRUE if the class supports RMPP
> > *     FALSE otherwise.
> > *
> > * NOTES
> > *
> > *********/
> >
> 902d963
> < /*********/
> 1100c1161
> < *     SmInfoRecord attribute (15.2.5)
> ---
> > *     SMInfoRecord attribute (15.2.5)
> 1106a1168,1179
> > /****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))
> > /**********/
> >
> 1117a1191
> >
> 1128a1203
> >
> 1139a1215
> >
> 1145c1221
> < *     LinearForwardingRecord attribute (15.2.5.6)
> ---
> > *     LinearForwardingTableRecord attribute (15.2.5.6)
> 1150a1227
> >
> 1156c1233
> < *     P-KEY table attribute (15.2.5)
> ---
> > *     PKEY Table Record attribute (15.2.5)
> 1161a1239
> >
> 1172a1251
> >
> 1178c1257
> < *     VL Arbitration Table attribute (15.2.5)
> ---
> > *     VL Arbitration Table Record attribute (15.2.5)
> 1183a1263
> >
> 1189c1269
> < *     VSLtoL Map Table attribute (15.2.5)
> ---
> > *     SLtoVL Mapping Table Record attribute (15.2.5)
> 1194a1275
> >
> 1205a1287
> >
> 1216a1299
> >
> 1222c1305
> < *     MultiPath attribute (15.2.5)
> ---
> > *     MultiPathRecord attribute (15.2.5)
> 1227a1311
> >
> 1233c1317
> < *     Service Association attribute (15.2.5)
> ---
> > *     Service Association Record attribute (15.2.5)
> 1238a1323
> >
> 1250c1335,1336
> < /****d* IBA Base: Constants/IB_MAD_ATTR_IOC_PROFILE
> ---
> >
> > /****d* IBA Base: Constants/IB_MAD_ATTR_IO_CONTROLLER_PROFILE
> 1252c1338
> < *     IB_MAD_ATTR_IOC_PROFILE
> ---
> > *     IB_MAD_ATTR_IO_CONTROLLER_PROFILE
> 1259c1345
> < #define IB_MAD_ATTR_IOC_PROFILE                               (CL_NTOH16(0x0011))
> ---
> > #define IB_MAD_ATTR_IO_CONTROLLER_PROFILE     (CL_NTOH16(0x0011))
> 1260a1347
> >
> 1271a1359
> >
> 1282a1371
> >
> 1293a1383
> >
> 1304a1395
> >
> 1315a1407
> >
> 1327c1419,1420
> < /*** IBA Base: Constants/IB_MAD_ATTR_SVC_ASSOCIATION_RECORD
> ---
> >
> > /****d* IBA Base: Constants/IB_MAD_ATTR_SVC_ASSOCIATION_RECORD
> 1332c1425
> < *     Service Association attribute (15.2.5)
> ---
> > *     Service Association Record attribute (15.2.5)
> 1337a1431
> >
> 1348a1443
> >
> 1359a1455
> >
> 1382a1479
> >
> 1393a1491
> >
> 1404a1503
> >
> 1419c1518
> < /****d* IBA Base: Constants/IB_MTU_TYPE
> ---
> > /****d* IBA Base: Constants/IB_MTU_LEN_TYPE
> 1421c1520
> < *     IB_MTU_TYPE
> ---
> > *     IB_MTU_LEN_TYPE
> 1434,1438c1533,1541
> < #define IB_MTU_256                                                    1
> < #define IB_MTU_512                                                    2
> < #define IB_MTU_1024                                                   3
> < #define IB_MTU_2048                                                   4
> < #define IB_MTU_4096                                                   5
> ---
> > #define IB_MTU_LEN_256                                                        1
> > #define IB_MTU_LEN_512                                                        2
> > #define IB_MTU_LEN_1024                                                       3
> > #define IB_MTU_LEN_2048                                                       4
> > #define IB_MTU_LEN_4096                                                       5
> >
> > #define IB_MIN_MTU    IB_MTU_LEN_256
> > #define IB_MAX_MTU    IB_MTU_LEN_4096
> >
> 1509c1612
> < *     Mask for the selector field for path record MTU, rate
> ---
> > *     Mask for the selector field for path record MTU, rate,
> 1514a1618,1628
> > /****d* IBA Base: Constants/IB_MULTIPATH_REC_SELECTOR_MASK
> > * NAME
> > *       IB_MULTIPATH_REC_SELECTOR_MASK
> > *
> > * DESCRIPTION
> > *       Mask for the selector field for multipath record MTU, rate,
> > *       and packet lifetime.
> > *
> > * SOURCE
> > */
> > #define IB_MULTIPATH_REC_SELECTOR_MASK                       0xC0
> 1521c1635
> < *     Mask for the base value field for path record MTU, rate
> ---
> > *     Mask for the base value field for path record MTU, rate,
> 1527a1642,1653
> > /****d* IBA Base: Constants/IB_MULTIPATH_REC_BASE_MASK
> > * NAME
> > *       IB_MULTIPATH_REC_BASE_MASK
> > *
> > * DESCRIPTION
> > *       Mask for the base value field for multipath record MTU, rate,
> > *       and packet lifetime.
> > *
> > * SOURCE
> > */
> > #define IB_MULTIPATH_REC_BASE_MASK                      0x3F
> > /**********/
> 1534c1660
> < *     Definitions are from the InfiniBand Architecture Specification v1.1
> ---
> > *     Definitions are from the InfiniBand Architecture Specification v1.2
> 1616c1742
> < AL_INLINE const char* AL_API
> ---
> > static inline const char*
> 1618c1744
> <       IN                              uint8_t                                         node_type )
> ---
> >       IN uint32_t node_type )
> 1620c1746
> <       if( node_type >= IB_NODE_TYPE_ROUTER )
> ---
> >       if( node_type >= IB_NOTICE_NODE_TYPE_ROUTER )
> 1658c1784
> < AL_INLINE const char* AL_API
> ---
> > static inline const char*
> 1668c1794
> < *     port_state
> ---
> > *     node_type
> 1689c1815
> < AL_INLINE const uint8_t AL_API
> ---
> > static inline uint8_t
> 1744c1870
> < AL_INLINE ib_net16_t AL_API
> ---
> > static inline ib_net16_t
> 1767c1893
> < *     Indicitates if the port is a full member of the parition.
> ---
> > *     Indicates if the port is a full member of the parition.
> 1771c1897
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 1791a1918,1950
> > /****f* IBA Base: Types/ib_pkey_is_invalid
> > * NAME
> > *     ib_pkey_is_invalid
> > *
> > * DESCRIPTION
> > *     Returns TRUE if the given P_Key is an invalid P_Key
> > *  C10-116: the CI shall regard a P_Key as invalid if its low-order
> > *           15 bits are all zero...
> > *
> > * SYNOPSIS
> > */
> > static inline boolean_t
> > ib_pkey_is_invalid(
> >       IN              const   ib_net16_t                                      pkey )
> > {
> >   if (ib_pkey_get_base(pkey) == 0x0000)
> >     return TRUE;
> >
> >   return FALSE;
> > }
> > /*
> > * PARAMETERS
> > *     pkey
> > *             [in] P_Key value
> > *
> > * RETURN VALUE
> > *     Returns the base P_Key value with the membership bit stripped.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> >
> 1835c1994
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 1851c2010
> < AL_INLINE void AL_API
> ---
> > static inline void
> 1884c2043
> < AL_INLINE ib_net64_t AL_API
> ---
> > static inline ib_net64_t
> 1948,1949c2107
> <               CL_HTON64( CL_CONST64(0xFFFFFFFFFFFF0000) ) ) ==
> <               CL_HTON64( CL_CONST64(0xFEC0000000000000) ) );
> ---
> >               CL_HTON64( 0xFFFFFFFFFFFF0000ULL ) ) == CL_HTON64( 0xFEC0000000000000ULL ) );
> 1974c2132
> < AL_INLINE ib_net64_t AL_API
> ---
> > static inline ib_net64_t
> 1994,2021d2151
> < /****s* IBA Base: Types/ib_field32_t
> < * NAME
> < *     ib_field32_t
> < *
> < * DESCRIPTION
> < *     Represents a 32-bit field, and allows access as a 32-bit network byte
> < *     ordered or a 4-byte array.
> < *
> < * SYNOPSIS
> < */
> < #include <complib/cl_packon.h>
> < typedef union _ib_field32_t
> < {
> <       net32_t         val;
> <       uint8_t         bytes[4];
> <
> < }     PACK_SUFFIX ib_field32_t;
> < #include <complib/cl_packoff.h>
> < /*
> < * FIELDS
> < *     val
> < *             Full field value.
> < *
> < *     bytes
> < *             Byte array representing the field.  The byte array provides identical
> < *             access independently from CPU byte-ordering.
> < *********/
> <
> 2033c2163
> < typedef __declspec(align(8)) struct _ib_path_rec
> ---
> > typedef struct _ib_path_rec
> 2035c2165
> <       uint64_t                                resv0;
> ---
> >       uint8_t                                 resv0[8];
> 2040c2170
> <       ib_field32_t                    hop_flow_raw;
> ---
> >       ib_net32_t                              hop_flow_raw;
> 2049,2050c2179
> <       uint16_t                                resv1;
> <       uint32_t                                resv2;
> ---
> >       uint8_t                                 resv2[6];
> 2078c2207,2208
> < *             In queries, maximum number of paths to return.
> ---
> > *     Reversible path - 1 bit to say if path is reversible.
> > *             num_path [6:0] In queries, maximum number of paths to return.
> 2103,2105d2232
> < *     resv1
> < *             Reserved bytes.
> < *
> 2111,2132c2238,2258
> < /* Port Record Component Masks */
> < #define IB_PR_COMPMASK_LID                                    (CL_HTON64(1<<0))
> < #define IB_PR_COMPMASK_DGID                                   (CL_HTON64(1<<2))
> < #define IB_PR_COMPMASK_SGID                                   (CL_HTON64(1<<3))
> < #define IB_PR_COMPMASK_DLID                                   (CL_HTON64(1<<4))
> < #define IB_PR_COMPMASK_SLID                                   (CL_HTON64(1<<5))
> < #define IB_PR_COMPMASK_RAWTRAFIC                      (CL_HTON64(1<<6))
> < #define IB_PR_COMPMASK_RESV0                          (CL_HTON64(1<<7))
> < #define IB_PR_COMPMASK_FLOWLABEL                      (CL_HTON64(1<<8))
> < #define IB_PR_COMPMASK_HOPLIMIT                               (CL_HTON64(1<<9))
> < #define IB_PR_COMPMASK_TCLASS                         (CL_HTON64(1<<10))
> < #define IB_PR_COMPMASK_REVERSIBLE                     (CL_HTON64(1<<11))
> < #define IB_PR_COMPMASK_NUM_PATH                               (CL_HTON64(1<<12))
> < #define IB_PR_COMPMASK_PKEY                                   (CL_HTON64(1<<13))
> < #define IB_PR_COMPMASK_RESV1                          (CL_HTON64(1<<14))
> < #define IB_PR_COMPMASK_SL                                     (CL_HTON64(1<<15))
> < #define IB_PR_COMPMASK_MTU_SEL                                (CL_HTON64(1<<16))
> < #define IB_PR_COMPMASK_MTU                                    (CL_HTON64(1<<17))
> < #define IB_PR_COMPMASK_RATE_SEL                               (CL_HTON64(1<<18))
> < #define IB_PR_COMPMASK_RATE                                   (CL_HTON64(1<<19))
> < #define IB_PR_COMPMASK_PKTLIFETIME_SEL                (CL_HTON64(1<<20))
> < #define IB_PR_COMPMASK_PFTLIFETIME                    (CL_HTON64(1<<21))
> ---
> > /* Path Record Component Masks */
> > #define  IB_PR_COMPMASK_DGID              (CL_HTON64(((uint64_t)1)<<2))
> > #define  IB_PR_COMPMASK_SGID              (CL_HTON64(((uint64_t)1)<<3))
> > #define  IB_PR_COMPMASK_DLID              (CL_HTON64(((uint64_t)1)<<4))
> > #define  IB_PR_COMPMASK_SLID              (CL_HTON64(((uint64_t)1)<<5))
> > #define  IB_PR_COMPMASK_RAWTRAFFIC        (CL_HTON64(((uint64_t)1)<<6))
> > #define  IB_PR_COMPMASK_RESV0             (CL_HTON64(((uint64_t)1)<<7))
> > #define  IB_PR_COMPMASK_FLOWLABEL         (CL_HTON64(((uint64_t)1)<<8))
> > #define  IB_PR_COMPMASK_HOPLIMIT          (CL_HTON64(((uint64_t)1)<<9))
> > #define  IB_PR_COMPMASK_TCLASS            (CL_HTON64(((uint64_t)1)<<10))
> > #define  IB_PR_COMPMASK_REVERSIBLE        (CL_HTON64(((uint64_t)1)<<11))
> > #define  IB_PR_COMPMASK_NUMBPATH          (CL_HTON64(((uint64_t)1)<<12))
> > #define  IB_PR_COMPMASK_PKEY              (CL_HTON64(((uint64_t)1)<<13))
> > #define  IB_PR_COMPMASK_RESV1             (CL_HTON64(((uint64_t)1)<<14))
> > #define  IB_PR_COMPMASK_SL                (CL_HTON64(((uint64_t)1)<<15))
> > #define  IB_PR_COMPMASK_MTUSELEC          (CL_HTON64(((uint64_t)1)<<16))
> > #define  IB_PR_COMPMASK_MTU               (CL_HTON64(((uint64_t)1)<<17))
> > #define  IB_PR_COMPMASK_RATESELEC         (CL_HTON64(((uint64_t)1)<<18))
> > #define  IB_PR_COMPMASK_RATE              (CL_HTON64(((uint64_t)1)<<19))
> > #define  IB_PR_COMPMASK_PKTLIFETIMESELEC  (CL_HTON64(((uint64_t)1)<<20))
> > #define  IB_PR_COMPMASK_PKTLIFETIME       (CL_HTON64(((uint64_t)1)<<21))
> 2135,2138c2261,2264
> < #define IB_LR_COMPMASK_FROM_LID                               (CL_HTON64(1<<0))
> < #define IB_LR_COMPMASK_FROM_PORT                      (CL_HTON64(1<<1))
> < #define IB_LR_COMPMASK_TO_PORT                                (CL_HTON64(1<<2))
> < #define IB_LR_COMPMASK_TO_LID                         (CL_HTON64(1<<3))
> ---
> > #define IB_LR_COMPMASK_FROM_LID           (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_LR_COMPMASK_FROM_PORT          (CL_HTON64(((uint64_t)1)<<1))
> > #define IB_LR_COMPMASK_TO_PORT            (CL_HTON64(((uint64_t)1)<<2))
> > #define IB_LR_COMPMASK_TO_LID             (CL_HTON64(((uint64_t)1)<<3))
> 2141,2143c2267,2270
> < #define IB_VLA_COMPMASK_LID                                   (CL_HTON64(1<<0))
> < #define IB_VLA_COMPMASK_OUT_PORT                      (CL_HTON64(1<<1))
> < #define IB_VLA_COMPMASK_BLOCK                         (CL_HTON64(1<<2))
> ---
> > #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))
> >
> 2145,2166c2272,2301
> < #define IB_SLVL_COMPMASK_LID                          (CL_HTON64(1<<0))
> < #define IB_SLVL_COMPMASK_IN_PORT                      (CL_HTON64(1<<1))
> < #define IB_SLVL_COMPMASK_OUT_PORT                     (CL_HTON64(1<<2))
> < /* LFT Record MASKS */
> < #define IB_LFTR_COMPMASK_LID                          (CL_HTON64(1<<0))
> < #define IB_LFTR_COMPMASK_BLOCK                                (CL_HTON64(1<<1))
> < /* ModeInfo Record MASKS */
> < #define IB_NR_COMPMASK_LID                                    (CL_HTON64(1<<0))
> < #define IB_NR_COMPMASK_RESERVED1                      (CL_HTON64(1<<1))
> < #define IB_NR_COMPMASK_BASEVERSION                    (CL_HTON64(1<<2))
> < #define IB_NR_COMPMASK_CLASSVERSION                   (CL_HTON64(1<<3))
> < #define IB_NR_COMPMASK_NODETYPE                               (CL_HTON64(1<<4))
> < #define IB_NR_COMPMASK_NUMPORTS                               (CL_HTON64(1<<5))
> < #define IB_NR_COMPMASK_SYSIMAGEGUID                   (CL_HTON64(1<<6))
> < #define IB_NR_COMPMASK_NODEGUID                               (CL_HTON64(1<<7))
> < #define IB_NR_COMPMASK_PORTGUID                               (CL_HTON64(1<<8))
> < #define IB_NR_COMPMASK_PARTCAP                                (CL_HTON64(1<<9))
> < #define IB_NR_COMPMASK_DEVID                          (CL_HTON64(1<<10))
> < #define IB_NR_COMPMASK_REV                                    (CL_HTON64(1<<11))
> < #define IB_NR_COMPMASK_PORTNUM                                (CL_HTON64(1<<12))
> < #define IB_NR_COMPMASK_VENDID                         (CL_HTON64(1<<13))
> < #define IB_NR_COMPMASK_NODEDESC                               (CL_HTON64(1<<14))
> ---
> > #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 */
> > #define IB_LFTR_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_LFTR_COMPMASK_BLOCK            (CL_HTON64(((uint64_t)1)<<1))
> >
> > /* 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))
> > #define IB_NR_COMPMASK_CLASSVERSION       (CL_HTON64(((uint64_t)1)<<3))
> > #define  IB_NR_COMPMASK_NODETYPE          (CL_HTON64(((uint64_t)1)<<4))
> > #define  IB_NR_COMPMASK_NUMPORTS          (CL_HTON64(((uint64_t)1)<<5))
> > #define  IB_NR_COMPMASK_SYSIMAGEGUID      (CL_HTON64(((uint64_t)1)<<6))
> > #define  IB_NR_COMPMASK_NODEGUID          (CL_HTON64(((uint64_t)1)<<7))
> > #define  IB_NR_COMPMASK_PORTGUID          (CL_HTON64(((uint64_t)1)<<8))
> > #define  IB_NR_COMPMASK_PARTCAP           (CL_HTON64(((uint64_t)1)<<9))
> > #define  IB_NR_COMPMASK_DEVID             (CL_HTON64(((uint64_t)1)<<10))
> > #define  IB_NR_COMPMASK_REV               (CL_HTON64(((uint64_t)1)<<11))
> > #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))
> >
> 2168,2199c2303,2334
> < #define IB_SR_COMPMASK_SID                                    (CL_HTON64(1<<0))
> < #define IB_SR_COMPMASK_SGID                                   (CL_HTON64(1<<1))
> < #define IB_SR_COMPMASK_SPKEY                          (CL_HTON64(1<<2))
> < #define IB_SR_COMPMASK_RES1                                   (CL_HTON64(1<<3))
> < #define IB_SR_COMPMASK_SLEASE                         (CL_HTON64(1<<4))
> < #define IB_SR_COMPMASK_SKEY                                   (CL_HTON64(1<<5))
> < #define IB_SR_COMPMASK_SNAME                          (CL_HTON64(1<<6))
> < #define IB_SR_COMPMASK_SDATA8_0                               (CL_HTON64(1<<7))
> < #define IB_SR_COMPMASK_SDATA8_1                               (CL_HTON64(1<<8))
> < #define IB_SR_COMPMASK_SDATA8_2                               (CL_HTON64(1<<9))
> < #define IB_SR_COMPMASK_SDATA8_3                               (CL_HTON64(1<<10))
> < #define IB_SR_COMPMASK_SDATA8_4                               (CL_HTON64(1<<11))
> < #define IB_SR_COMPMASK_SDATA8_5                               (CL_HTON64(1<<12))
> < #define IB_SR_COMPMASK_SDATA8_6                               (CL_HTON64(1<<13))
> < #define IB_SR_COMPMASK_SDATA8_7                               (CL_HTON64(1<<14))
> < #define IB_SR_COMPMASK_SDATA8_8                               (CL_HTON64(1<<15))
> < #define IB_SR_COMPMASK_SDATA8_9                               (CL_HTON64(1<<16))
> < #define IB_SR_COMPMASK_SDATA8_10                      (CL_HTON64(1<<17))
> < #define IB_SR_COMPMASK_SDATA8_11                      (CL_HTON64(1<<18))
> < #define IB_SR_COMPMASK_SDATA8_12                      (CL_HTON64(1<<19))
> < #define IB_SR_COMPMASK_SDATA8_13                      (CL_HTON64(1<<20))
> < #define IB_SR_COMPMASK_SDATA8_14                      (CL_HTON64(1<<21))
> < #define IB_SR_COMPMASK_SDATA8_15                      (CL_HTON64(1<<22))
> < #define IB_SR_COMPMASK_SDATA16_0                      (CL_HTON64(1<<23))
> < #define IB_SR_COMPMASK_SDATA16_1                      (CL_HTON64(1<<24))
> < #define IB_SR_COMPMASK_SDATA16_2                      (CL_HTON64(1<<25))
> < #define IB_SR_COMPMASK_SDATA16_3                      (CL_HTON64(1<<26))
> < #define IB_SR_COMPMASK_SDATA16_4                      (CL_HTON64(1<<27))
> < #define IB_SR_COMPMASK_SDATA16_5                      (CL_HTON64(1<<28))
> < #define IB_SR_COMPMASK_SDATA16_6                      (CL_HTON64(1<<29))
> < #define IB_SR_COMPMASK_SDATA16_7                      (CL_HTON64(1<<30))
> < #define IB_SR_COMPMASK_SDATA32_0                      (CL_HTON64(1<<31))
> ---
> > #define IB_SR_COMPMASK_SID                (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_SR_COMPMASK_SGID               (CL_HTON64(((uint64_t)1)<<1))
> > #define IB_SR_COMPMASK_SPKEY              (CL_HTON64(((uint64_t)1)<<2))
> > #define IB_SR_COMPMASK_RES1               (CL_HTON64(((uint64_t)1)<<3))
> > #define IB_SR_COMPMASK_SLEASE             (CL_HTON64(((uint64_t)1)<<4))
> > #define IB_SR_COMPMASK_SKEY               (CL_HTON64(((uint64_t)1)<<5))
> > #define IB_SR_COMPMASK_SNAME              (CL_HTON64(((uint64_t)1)<<6))
> > #define IB_SR_COMPMASK_SDATA8_0           (CL_HTON64(((uint64_t)1)<<7))
> > #define IB_SR_COMPMASK_SDATA8_1           (CL_HTON64(((uint64_t)1)<<8))
> > #define IB_SR_COMPMASK_SDATA8_2           (CL_HTON64(((uint64_t)1)<<9))
> > #define IB_SR_COMPMASK_SDATA8_3           (CL_HTON64(((uint64_t)1)<<10))
> > #define IB_SR_COMPMASK_SDATA8_4           (CL_HTON64(((uint64_t)1)<<11))
> > #define IB_SR_COMPMASK_SDATA8_5           (CL_HTON64(((uint64_t)1)<<12))
> > #define IB_SR_COMPMASK_SDATA8_6           (CL_HTON64(((uint64_t)1)<<13))
> > #define IB_SR_COMPMASK_SDATA8_7           (CL_HTON64(((uint64_t)1)<<14))
> > #define IB_SR_COMPMASK_SDATA8_8           (CL_HTON64(((uint64_t)1)<<15))
> > #define IB_SR_COMPMASK_SDATA8_9           (CL_HTON64(((uint64_t)1)<<16))
> > #define IB_SR_COMPMASK_SDATA8_10       (CL_HTON64(((uint64_t)1)<<17))
> > #define IB_SR_COMPMASK_SDATA8_11       (CL_HTON64(((uint64_t)1)<<18))
> > #define IB_SR_COMPMASK_SDATA8_12       (CL_HTON64(((uint64_t)1)<<19))
> > #define IB_SR_COMPMASK_SDATA8_13       (CL_HTON64(((uint64_t)1)<<20))
> > #define IB_SR_COMPMASK_SDATA8_14       (CL_HTON64(((uint64_t)1)<<21))
> > #define IB_SR_COMPMASK_SDATA8_15       (CL_HTON64(((uint64_t)1)<<22))
> > #define IB_SR_COMPMASK_SDATA16_0       (CL_HTON64(((uint64_t)1)<<23))
> > #define IB_SR_COMPMASK_SDATA16_1       (CL_HTON64(((uint64_t)1)<<24))
> > #define IB_SR_COMPMASK_SDATA16_2       (CL_HTON64(((uint64_t)1)<<25))
> > #define IB_SR_COMPMASK_SDATA16_3       (CL_HTON64(((uint64_t)1)<<26))
> > #define IB_SR_COMPMASK_SDATA16_4       (CL_HTON64(((uint64_t)1)<<27))
> > #define IB_SR_COMPMASK_SDATA16_5       (CL_HTON64(((uint64_t)1)<<28))
> > #define IB_SR_COMPMASK_SDATA16_6       (CL_HTON64(((uint64_t)1)<<29))
> > #define IB_SR_COMPMASK_SDATA16_7       (CL_HTON64(((uint64_t)1)<<30))
> > #define IB_SR_COMPMASK_SDATA32_0       (CL_HTON64(((uint64_t)1)<<31))
> 2204a2340
> >
> 2206,2253c2342,2391
> < #define IB_PIR_COMPMASK_LID                                   (CL_HTON64(1<<0))
> < #define IB_PIR_COMPMASK_PORTNUM                               (CL_HTON64(1<<1))
> < #define IB_PIR_COMPMASK_RESV1                         (CL_HTON64(1<<2))
> < #define IB_PIR_COMPMASK_MKEY                          (CL_HTON64(1<<3))
> < #define IB_PIR_COMPMASK_GIDPRE                                (CL_HTON64(1<<4))
> < #define IB_PIR_COMPMASK_BASELID                               (CL_HTON64(1<<5))
> < #define IB_PIR_COMPMASK_SMLID                         (CL_HTON64(1<<6))
> < #define IB_PIR_COMPMASK_CAPMASK                               (CL_HTON64(1<<7))
> < #define IB_PIR_COMPMASK_DIAGCODE                      (CL_HTON64(1<<8))
> < #define IB_PIR_COMPMASK_MKEYLEASEPRD          (CL_HTON64(1<<9))
> < #define IB_PIR_COMPMASK_LOCALPORTNUM          (CL_HTON64(1<<10))
> < #define IB_PIR_COMPMASK_LNKWIDTHSUPPORT               (CL_HTON64(1<<11))
> < #define IB_PIR_COMPMASK_LNKWIDTHACTIVE                (CL_HTON64(1<<12))
> < #define IB_PIR_COMPMASK_LINKWIDTHENABLED      (CL_HTON64(1<<13))
> < #define IB_PIR_COMPMASK_LNKSPEEDSUPPORT               (CL_HTON64(1<<14))
> < #define IB_PIR_COMPMASK_PORTSTATE                     (CL_HTON64(1<<15))
> < #define IB_PIR_COMPMASK_PORTPHYSTATE          (CL_HTON64(1<<16))
> < #define IB_PIR_COMPMASK_LINKDWNDFLTSTATE      (CL_HTON64(1<<17))
> < #define IB_PIR_COMPMASK_MKEYPROTBITS          (CL_HTON64(1<<18))
> < #define IB_PIR_COMPMASK_LMC                                   (CL_HTON64(1<<19))
> < #define IB_PIR_COMPMASK_LINKSPEEDACTIVE               (CL_HTON64(1<<20))
> < #define IB_PIR_COMPMASK_LINKSPEEDENABLE               (CL_HTON64(1<<21))
> < #define IB_PIR_COMPMASK_NEIGHBORMTU                   (CL_HTON64(1<<22))
> < #define IB_PIR_COMPMASK_MASTERSMSL                    (CL_HTON64(1<<23))
> < #define IB_PIR_COMPMASK_VLCAP                         (CL_HTON64(1<<24))
> < #define IB_PIR_COMPMASK_INITTYPE                      (CL_HTON64(1<<25))
> < #define IB_PIR_COMPMASK_VLHIGHLIMIT                   (CL_HTON64(1<<26))
> < #define IB_PIR_COMPMASK_VLARBHIGHCAP          (CL_HTON64(1<<27))
> < #define IB_PIR_COMPMASK_VLARBLOWCAP                   (CL_HTON64(1<<28))
> < #define IB_PIR_COMPMASK_INITTYPEREPLY         (CL_HTON64(1<<29))
> < #define IB_PIR_COMPMASK_MTUCAP                                (CL_HTON64(1<<30))
> < #define IB_PIR_COMPMASK_VLSTALLCNT                    (CL_HTON64(1<<31))
> < #define IB_PIR_COMPMASK_HOQLIFE                               (CL_HTON64(((uint64_t)1)<<32))
> < #define IB_PIR_COMPMASK_OPVLS                         (CL_HTON64(((uint64_t)1)<<33))
> < #define IB_PIR_COMPMASK_PARENFIN                      (CL_HTON64(((uint64_t)1)<<34))
> < #define IB_PIR_COMPMASK_PARENFOUT                     (CL_HTON64(((uint64_t)1)<<35))
> < #define IB_PIR_COMPMASK_FILTERRAWIN                   (CL_HTON64(((uint64_t)1)<<36))
> < #define IB_PIR_COMPMASK_FILTERRAWOUT          (CL_HTON64(((uint64_t)1)<<37))
> < #define IB_PIR_COMPMASK_MKEYVIO                               (CL_HTON64(((uint64_t)1)<<38))
> < #define IB_PIR_COMPMASK_PKEYVIO                               (CL_HTON64(((uint64_t)1)<<39))
> < #define IB_PIR_COMPMASK_QKEYVIO                               (CL_HTON64(((uint64_t)1)<<40))
> < #define IB_PIR_COMPMASK_GUIDCAP                               (CL_HTON64(((uint64_t)1)<<41))
> < #define IB_PIR_COMPMASK_RESV2                         (CL_HTON64(((uint64_t)1)<<42))
> < #define IB_PIR_COMPMASK_SUBNTO                                (CL_HTON64(((uint64_t)1)<<43))
> < #define IB_PIR_COMPMASK_RESV3                         (CL_HTON64(((uint64_t)1)<<44))
> < #define IB_PIR_COMPMASK_RESPTIME                      (CL_HTON64(((uint64_t)1)<<45))
> < #define IB_PIR_COMPMASK_LOCALPHYERR                   (CL_HTON64(((uint64_t)1)<<46))
> < #define IB_PIR_COMPMASK_OVERRUNERR                    (CL_HTON64(((uint64_t)1)<<47))
> ---
> > #define IB_PIR_COMPMASK_LID              (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_PIR_COMPMASK_PORTNUM          (CL_HTON64(((uint64_t)1)<<1))
> > #define IB_PIR_COMPMASK_RESV1            (CL_HTON64(((uint64_t)1)<<2))
> > #define IB_PIR_COMPMASK_MKEY             (CL_HTON64(((uint64_t)1)<<3))
> > #define IB_PIR_COMPMASK_GIDPRE           (CL_HTON64(((uint64_t)1)<<4))
> > #define IB_PIR_COMPMASK_BASELID          (CL_HTON64(((uint64_t)1)<<5))
> > #define IB_PIR_COMPMASK_SMLID            (CL_HTON64(((uint64_t)1)<<6))
> > #define IB_PIR_COMPMASK_CAPMASK          (CL_HTON64(((uint64_t)1)<<7))
> > #define IB_PIR_COMPMASK_DIAGCODE         (CL_HTON64(((uint64_t)1)<<8))
> > #define IB_PIR_COMPMASK_MKEYLEASEPRD     (CL_HTON64(((uint64_t)1)<<9))
> > #define IB_PIR_COMPMASK_LOCALPORTNUM     (CL_HTON64(((uint64_t)1)<<10))
> > #define IB_PIR_COMPMASK_LINKWIDTHENABLED (CL_HTON64(((uint64_t)1)<<11))
> > #define IB_PIR_COMPMASK_LNKWIDTHSUPPORT  (CL_HTON64(((uint64_t)1)<<12))
> > #define IB_PIR_COMPMASK_LNKWIDTHACTIVE   (CL_HTON64(((uint64_t)1)<<13))
> > #define IB_PIR_COMPMASK_LNKSPEEDSUPPORT  (CL_HTON64(((uint64_t)1)<<14))
> > #define IB_PIR_COMPMASK_PORTSTATE        (CL_HTON64(((uint64_t)1)<<15))
> > #define IB_PIR_COMPMASK_PORTPHYSTATE     (CL_HTON64(((uint64_t)1)<<16))
> > #define IB_PIR_COMPMASK_LINKDWNDFLTSTATE (CL_HTON64(((uint64_t)1)<<17))
> > #define IB_PIR_COMPMASK_MKEYPROTBITS     (CL_HTON64(((uint64_t)1)<<18))
> > #define IB_PIR_COMPMASK_RESV2            (CL_HTON64(((uint64_t)1)<<19))
> > #define IB_PIR_COMPMASK_LMC              (CL_HTON64(((uint64_t)1)<<20))
> > #define IB_PIR_COMPMASK_LINKSPEEDACTIVE  (CL_HTON64(((uint64_t)1)<<21))
> > #define IB_PIR_COMPMASK_LINKSPEEDENABLE  (CL_HTON64(((uint64_t)1)<<22))
> > #define IB_PIR_COMPMASK_NEIGHBORMTU      (CL_HTON64(((uint64_t)1)<<23))
> > #define IB_PIR_COMPMASK_MASTERSMSL       (CL_HTON64(((uint64_t)1)<<24))
> > #define IB_PIR_COMPMASK_VLCAP            (CL_HTON64(((uint64_t)1)<<25))
> > #define IB_PIR_COMPMASK_INITTYPE         (CL_HTON64(((uint64_t)1)<<26))
> > #define IB_PIR_COMPMASK_VLHIGHLIMIT      (CL_HTON64(((uint64_t)1)<<27))
> > #define IB_PIR_COMPMASK_VLARBHIGHCAP     (CL_HTON64(((uint64_t)1)<<28))
> > #define IB_PIR_COMPMASK_VLARBLOWCAP      (CL_HTON64(((uint64_t)1)<<29))
> > #define IB_PIR_COMPMASK_INITTYPEREPLY    (CL_HTON64(((uint64_t)1)<<30))
> > #define IB_PIR_COMPMASK_MTUCAP           (CL_HTON64(((uint64_t)1)<<31))
> > #define IB_PIR_COMPMASK_VLSTALLCNT       (CL_HTON64(((uint64_t)1)<<32))
> > #define IB_PIR_COMPMASK_HOQLIFE          (CL_HTON64(((uint64_t)1)<<33))
> > #define IB_PIR_COMPMASK_OPVLS            (CL_HTON64(((uint64_t)1)<<34))
> > #define IB_PIR_COMPMASK_PARENFIN         (CL_HTON64(((uint64_t)1)<<35))
> > #define IB_PIR_COMPMASK_PARENFOUT        (CL_HTON64(((uint64_t)1)<<36))
> > #define IB_PIR_COMPMASK_FILTERRAWIN      (CL_HTON64(((uint64_t)1)<<37))
> > #define IB_PIR_COMPMASK_FILTERRAWOUT     (CL_HTON64(((uint64_t)1)<<38))
> > #define IB_PIR_COMPMASK_MKEYVIO          (CL_HTON64(((uint64_t)1)<<39))
> > #define IB_PIR_COMPMASK_PKEYVIO          (CL_HTON64(((uint64_t)1)<<40))
> > #define IB_PIR_COMPMASK_QKEYVIO          (CL_HTON64(((uint64_t)1)<<41))
> > #define IB_PIR_COMPMASK_GUIDCAP          (CL_HTON64(((uint64_t)1)<<42))
> > #define IB_PIR_COMPMASK_RESV3            (CL_HTON64(((uint64_t)1)<<43))
> > #define IB_PIR_COMPMASK_SUBNTO           (CL_HTON64(((uint64_t)1)<<44))
> > #define IB_PIR_COMPMASK_RESV4            (CL_HTON64(((uint64_t)1)<<45))
> > #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))
> >
> 2255,2273c2393,2449
> < #define IB_MCR_COMPMASK_GID                                   (CL_HTON64(1<<0))
> < #define IB_MCR_COMPMASK_MGID                          (CL_HTON64(1<<0))
> < #define IB_MCR_COMPMASK_PORT_GID                      (CL_HTON64(1<<1))
> < #define IB_MCR_COMPMASK_QKEY                          (CL_HTON64(1<<2))
> < #define IB_MCR_COMPMASK_MLID                          (CL_HTON64(1<<3))
> < #define IB_MCR_COMPMASK_MTU_SEL                               (CL_HTON64(1<<4))
> < #define IB_MCR_COMPMASK_MTU                                   (CL_HTON64(1<<5))
> < #define IB_MCR_COMPMASK_TCLASS                                (CL_HTON64(1<<6))
> < #define IB_MCR_COMPMASK_PKEY                          (CL_HTON64(1<<7))
> < #define IB_MCR_COMPMASK_RATE_SEL                      (CL_HTON64(1<<8))
> < #define IB_MCR_COMPMASK_RATE                          (CL_HTON64(1<<9))
> < #define IB_MCR_COMPMASK_LIFE_SEL                      (CL_HTON64(1<<10))
> < #define IB_MCR_COMPMASK_LIFE                          (CL_HTON64(1<<11))
> < #define IB_MCR_COMPMASK_SL                                    (CL_HTON64(1<<12))
> < #define IB_MCR_COMPMASK_FLOW                          (CL_HTON64(1<<13))
> < #define IB_MCR_COMPMASK_HOP                                   (CL_HTON64(1<<14))
> < #define IB_MCR_COMPMASK_SCOPE                         (CL_HTON64(1<<15))
> < #define IB_MCR_COMPMASK_JOIN_STATE                    (CL_HTON64(1<<16))
> < #define IB_MCR_COMPMASK_PROXY                         (CL_HTON64(1<<17))
> ---
> > #define IB_MCR_COMPMASK_GID         (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_MCR_COMPMASK_MGID        (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_MCR_COMPMASK_PORT_GID    (CL_HTON64(((uint64_t)1)<<1))
> > #define IB_MCR_COMPMASK_QKEY        (CL_HTON64(((uint64_t)1)<<2))
> > #define IB_MCR_COMPMASK_MLID        (CL_HTON64(((uint64_t)1)<<3))
> > #define IB_MCR_COMPMASK_MTU_SEL     (CL_HTON64(((uint64_t)1)<<4))
> > #define IB_MCR_COMPMASK_MTU         (CL_HTON64(((uint64_t)1)<<5))
> > #define IB_MCR_COMPMASK_TCLASS      (CL_HTON64(((uint64_t)1)<<6))
> > #define IB_MCR_COMPMASK_PKEY        (CL_HTON64(((uint64_t)1)<<7))
> > #define IB_MCR_COMPMASK_RATE_SEL    (CL_HTON64(((uint64_t)1)<<8))
> > #define IB_MCR_COMPMASK_RATE        (CL_HTON64(((uint64_t)1)<<9))
> > #define IB_MCR_COMPMASK_LIFE_SEL    (CL_HTON64(((uint64_t)1)<<10))
> > #define IB_MCR_COMPMASK_LIFE        (CL_HTON64(((uint64_t)1)<<11))
> > #define IB_MCR_COMPMASK_SL          (CL_HTON64(((uint64_t)1)<<12))
> > #define IB_MCR_COMPMASK_FLOW        (CL_HTON64(((uint64_t)1)<<13))
> > #define IB_MCR_COMPMASK_HOP         (CL_HTON64(((uint64_t)1)<<14))
> > #define IB_MCR_COMPMASK_SCOPE       (CL_HTON64(((uint64_t)1)<<15))
> > #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))
> >
> > /* MultiPath Record Component Masks */
> > #define IB_MPR_COMPMASK_RAWTRAFFIC    (CL_HTON64(((uint64_t)1)<<0))
> > #define IB_MPR_COMPMASK_RESV0         (CL_HTON64(((uint64_t)1)<<1))
> > #define IB_MPR_COMPMASK_FLOWLABEL     (CL_HTON64(((uint64_t)1)<<2))
> > #define IB_MPR_COMPMASK_HOPLIMIT      (CL_HTON64(((uint64_t)1)<<3))
> > #define IB_MPR_COMPMASK_TCLASS                (CL_HTON64(((uint64_t)1)<<4))
> > #define IB_MPR_COMPMASK_REVERSIBLE    (CL_HTON64(((uint64_t)1)<<5))
> > #define IB_MPR_COMPMASK_NUMBPATH      (CL_HTON64(((uint64_t)1)<<6))
> > #define IB_MPR_COMPMASK_PKEY          (CL_HTON64(((uint64_t)1)<<7))
> > #define IB_MPR_COMPMASK_RESV1         (CL_HTON64(((uint64_t)1)<<8))
> > #define IB_MPR_COMPMASK_SL            (CL_HTON64(((uint64_t)1)<<9))
> > #define IB_MPR_COMPMASK_MTUSELEC      (CL_HTON64(((uint64_t)1)<<10))
> > #define IB_MPR_COMPMASK_MTU           (CL_HTON64(((uint64_t)1)<<11))
> > #define IB_MPR_COMPMASK_RATESELEC     (CL_HTON64(((uint64_t)1)<<12))
> > #define IB_MPR_COMPMASK_RATE          (CL_HTON64(((uint64_t)1)<<13))
> > #define IB_MPR_COMPMASK_PKTLIFETIMESELEC (CL_HTON64(((uint64_t)1)<<14))
> > #define IB_MPR_COMPMASK_PKTLIFETIME   (CL_HTON64(((uint64_t)1)<<15))
> > #define IB_MPR_COMPMASK_RESV2         (CL_HTON64(((uint64_t)1)<<16))
> > #define IB_MPR_COMPMASK_INDEPSELEC    (CL_HTON64(((uint64_t)1)<<17))
> > #define IB_MPR_COMPMASK_RESV3         (CL_HTON64(((uint64_t)1)<<18))
> > #define IB_MPR_COMPMASK_SGIDCOUNT     (CL_HTON64(((uint64_t)1)<<19))
> > #define IB_MPR_COMPMASK_DGIDCOUNT     (CL_HTON64(((uint64_t)1)<<20))
> > #define IB_MPR_COMPMASK_RESV4         (CL_HTON64(((uint64_t)1)<<21))
> 2284c2460
> < AL_INLINE void AL_API
> ---
> > static inline void
> 2287,2300c2463,2476
> <       IN              const   ib_gid_t*               const           p_dgid,
> <       IN              const   ib_gid_t*               const           p_sgid,
> <       IN              const   ib_net16_t                                      dlid,
> <       IN              const   ib_net16_t                                      slid,
> <       IN              const   uint8_t                                         num_path,
> <       IN              const   ib_net16_t                                      pkey,
> <       IN              const   uint8_t                                         sl,
> <       IN              const   uint8_t                                         mtu_selector,
> <       IN              const   uint8_t                                         mtu,
> <       IN              const   uint8_t                                         rate_selector,
> <       IN              const   uint8_t                                         rate,
> <       IN              const   uint8_t                                         pkt_life_selector,
> <       IN              const   uint8_t                                         pkt_life,
> <       IN              const   uint8_t                                         preference )
> ---
> >       IN                              ib_gid_t* const         p_dgid,
> >       IN                              ib_gid_t* const         p_sgid,
> >       IN                              ib_net16_t                      dlid,
> >       IN                              ib_net16_t                      slid,
> >       IN                              uint8_t                         num_path,
> >       IN                              ib_net16_t                      pkey,
> >       IN                              uint8_t                         sl,
> >       IN                              uint8_t                         mtu_selector,
> >       IN                              uint8_t                         mtu,
> >       IN                              uint8_t                         rate_selector,
> >       IN                              uint8_t                         rate,
> >       IN                              uint8_t                         pkt_life_selector,
> >       IN                              uint8_t                         pkt_life,
> >       IN                              uint8_t                         preference )
> 2319c2495
> <       p_rec->hop_flow_raw.val = 0;
> ---
> >       p_rec->hop_flow_raw = 0;
> 2322,2324c2498,2500
> <       p_rec->resv0 = 0;
> <       p_rec->resv1 = 0;
> <       p_rec->resv2 = 0;
> ---
> >       *((uint64_t*)p_rec->resv0) = 0;
> >       *((uint32_t*)p_rec->resv2) = 0;
> >       *((uint16_t*)p_rec->resv2 + 2) = 0;
> 2344c2520,2521
> < *             [in] In queries, maximum number of paths to return.
> ---
> > *     [in] Reversible path - 1 bit to say if path is reversible.
> > *             num_path [6:0] In queries, maximum number of paths to return.
> 2383a2561,2589
> > /****f* IBA Base: Types/ib_path_rec_num_path
> > * NAME
> > *     ib_path_rec_num_path
> > *
> > * DESCRIPTION
> > *     Get max number of paths to return.
> > *
> > * SYNOPSIS
> > */
> > static inline uint8_t
> > ib_path_rec_num_path(
> >       IN              const   ib_path_rec_t* const            p_rec )
> > {
> >       return( p_rec->num_path &0x7F );
> > }
> > /*
> > * PARAMETERS
> > *     p_rec
> > *             [in] Pointer to the path record object.
> > *
> > * RETURN VALUES
> > *     Maximum number of paths to return for each unique SGID_DGID combination.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *     ib_path_rec_t
> > *********/
> >
> 2393c2599
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2405,2411c2611
> < *     Encoded path MTU.
> < *             1: 256
> < *             2: 512
> < *             3: 1024
> < *             4: 2048
> < *             5: 4096
> < *             others: reserved
> ---
> > *     SL.
> 2428c2628
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2463c2663
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2496c2696
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2511a2712,2717
> > *             5: 5 Gb/sec.
> > *             6: 20 Gb/sec.
> > *             7: 40 Gb/sec.
> > *             8: 60 Gb/sec.
> > *             9: 80 Gb/sec.
> > *             10: 120 Gb/sec.
> 2529c2735
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2562c2768
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2574c2780
> < *     Encoded path pkt_life = 4.096 �sec * 2 PacketLifeTime.
> ---
> > *     Encoded path pkt_life = 4.096 �sec * 2 ** PacketLifeTime.
> 2591c2797
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2624c2830
> < AL_INLINE net32_t AL_API
> ---
> > static inline uint32_t
> 2628c2834
> <       return( cl_hton32( (cl_ntoh32(p_rec->hop_flow_raw.val) >> 8) & 0x000FFFFF ) );
> ---
> >       return( ((cl_ntoh32(p_rec->hop_flow_raw) >> 8) & 0x000FFFFF) );
> 2653c2859
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2657c2863
> <       return( p_rec->hop_flow_raw.bytes[3] );
> ---
> >       return( (uint8_t)(p_rec->hop_flow_raw & 0x000000FF ) );
> 2673,2714d2878
> < /****f* IBA Base: Types/ib_path_rec_set_hop_flow_raw
> < * NAME
> < *     ib_path_rec_set_hop_flow_raw
> < *
> < * DESCRIPTION
> < *     Sets the hop limit, flow label, and raw traffic bits of a path record.
> < *
> < * SYNOPSIS
> < */
> < AL_INLINE void AL_API
> < ib_path_rec_set_hop_flow_raw(
> <               OUT                     ib_path_rec_t* const            p_rec,
> <       IN              const   uint8_t                                         hop_limit,
> <       IN              const   net32_t                                         flow_lbl,
> <       IN              const   boolean_t                                       raw )
> < {
> <       p_rec->hop_flow_raw.val = (cl_ntoh32( flow_lbl ) & 0x000FFFFF) << 8;
> <       if( raw )
> <               p_rec->hop_flow_raw.val |= 0x80000000;
> <       p_rec->hop_flow_raw.val = cl_hton32( p_rec->hop_flow_raw.val );
> <       p_rec->hop_flow_raw.bytes[3] = hop_limit;
> < }
> < /*
> < * PARAMETERS
> < *     p_rec
> < *             Pointer to the path record whose hop limit, flow label, and rab
> < *             traffic fields to set.
> < *
> < *     hop_limit
> < *             Hop limit to set in the path record.
> < *
> < *     flow_lbl
> < *             Flow label, in network byte order, to set in the path record.
> < *
> < *     raw
> < *             Boolean flag to indicate whether the path record is for raw traffic.
> < *
> < * SEE ALSO
> < *     ib_path_rec_t
> < *********/
> <
> <
> 2776c2940,2941
> <       ib_net32_t                              resp_time_val;
> ---
> >       uint8_t                                 reserved[3];
> >       uint8_t                                 resp_time_val;
> 2894c3059
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2922c3087
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 2963d3127
> <
> 3041c3205
> < AL_INLINE void AL_API
> ---
> > static inline void
> 3104c3268
> < AL_INLINE void AL_API
> ---
> > static inline void
> 3149c3313
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 3206c3370
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 3231c3395
> < AL_INLINE void AL_API
> ---
> > static inline void
> 3241c3405
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 3259c3423,3424
> < #define IB_SMP_DIRECTION                      (CL_HTON16(0x8000))
> ---
> > #define IB_SMP_DIRECTION_HO                   0x8000
> > #define IB_SMP_DIRECTION                      (CL_HTON16(IB_SMP_DIRECTION_HO))
> 3271c3436,3437
> < #define IB_SMP_STATUS_MASK                    (CL_HTON16(0x7FFF))
> ---
> > #define IB_SMP_STATUS_MASK_HO         0x7FFF
> > #define IB_SMP_STATUS_MASK                    (CL_HTON16(IB_SMP_STATUS_MASK_HO))
> 3376c3542
> < AL_INLINE ib_net16_t AL_API
> ---
> > static inline ib_net16_t
> 3405c3571
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 3433c3599
> < AL_INLINE boolean_t AL_API
> ---
> > static inline boolean_t
> 3466c3632
> < AL_INLINE void AL_API
> ---
> > static inline void
> 3496c3662
> <       cl_memclr( p_smp->resv1,
> ---
> >       memset( p_smp->resv1, 0,
> 3503c3669
> <       cl_memcpy( &p_smp->initial_path, path_out,
> ---
> >       memcpy( &p_smp->initial_path, path_out,
> 3552c3718
> < AL_INLINE void* AL_API
> ---
> > static inline void*
> 3645,3647c3811
> <
> <
> < AL_INLINE uint32_t AL_API
> ---
> > static inline uint32_t
> 3654c3818
> < AL_INLINE ib_net16_t AL_API
> ---
> > static inline ib_net16_t
> 3658,3660d3821
> <       if( attr_size & 0x07 )
> <               return( cl_hton16( (uint16_t)(attr_size >> 3) + 1 ) );
> <       else
> 3664d3824
> <
> 3674c3834
> < AL_INLINE void* AL_API
> ---
> > static inline void*
> 3711c3871
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 3741c3901
> < AL_INLINE ib_net32_t AL_API
> ---
> > static inline ib_net32_t
> 3810,3811c3970,3971
> <       uint8_t                         state_info1; // LinkSpeedSupported and PortState
> <       uint8_t                         state_info2; // PortPhysState and LinkDownDefaultState
> ---
> >       uint8_t                         state_info1; /* LinkSpeedSupported and PortState */
> >       uint8_t                         state_info2; /* PortPhysState and LinkDownDefaultState */
> 3813c3973
> <       uint8_t                         link_speed;      // LinkSpeedEnabled and LinkSpeedActive
> ---
> >       uint8_t                         link_speed;      /* LinkSpeedEnabled and LinkSpeedActive */
> 3815c3975
> <       uint8_t                         vl_cap;          // VlCap and InitType
> ---
> >       uint8_t                         vl_cap;          /* VLCap and InitType */
> 3826c3986,3987
> <       uint8_t                         subnet_timeout;
> ---
> >       uint8_t                         subnet_timeout; /* cli_rereg(1b), resrv(
> > 2b), timeout(5b) */
> 3835a3997
> > #define IB_PORT_LMC_MAX                               0x07
> 3841a4004,4006
> > #define IB_PORT_PHYS_STATE_MASK                       0xF0
> > #define IB_PORT_PHYS_STATE_SHIFT              4
> > #define IB_PORT_LNKDWNDFTSTATE_MASK           0x0F
> 3854c4019
> < #define IB_PORT_CAP_HAS_SYS_GUID      (CL_NTOH32(0x00000800))
> ---
> > #define IB_PORT_CAP_HAS_SYS_IMG_GUID  (CL_NTOH32(0x00000800))
> 3861c4026
> < #define IB_PORT_CAP_HAS_REINIT                (CL_NTOH32(0x00040000))
> ---
> > #define IB_PORT_CAP_REINIT        (CL_NTOH32(0x00040000))
> 3867,3868c4032,4033
> < #define IB_PORT_CAP_HAS_LINK_TRIP     (CL_NTOH32(0x01000000))
> < #define IB_PORT_CAP_HAS_CLI_REREG     (CL_NTOH32(0x02000000))
> ---
> > #define IB_PORT_CAP_HAS_LINK_RT_LATENCY (CL_NTOH32(0x01000000))
> > #define IB_PORT_CAP_HAS_CLIENT_REREG (CL_NTOH32(0x02000000))
> 3885c4050
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 3912c4077
> < AL_INLINE void AL_API
> ---
> > static inline void
> 3943c4108
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 3960a4126,4152
> > /****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
> > */
> > static inline uint8_t
> > 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
> > *********/
> 3970c4162
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 3997c4189
> < AL_INLINE void AL_API
> ---
> > static inline void
> 4028c4220
> < AL_INLINE void AL_API
> ---
> > static inline void
> 4057c4249
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 4088c4280
> < AL_INLINE void AL_API
> ---
> > static inline void
> 4114c4306
> < /****f* IBA Base: Types/ib_port_info_get_link_speed_active
> ---
> > /****f* IBA Base: Types/ib_port_info_get_port_phys_state
> 4116c4308
> < *     ib_port_info_get_link_speed_active
> ---
> > *     ib_port_info_get_port_phys_state
> 4119c4311
> < *     Returns the Link Speed Active value assigned to this port.
> ---
> > *     Returns the encoded value for the port physical state.
> 4123,4124c4315,4316
> < AL_INLINE uint8_t AL_API
> < ib_port_info_get_link_speed_active(
> ---
> > static inline uint8_t
> > ib_port_info_get_port_phys_state(
> 4127,4128c4319,4321
> <       return( (uint8_t)((p_pi->link_speed & IB_PORT_LINK_SPEED_ACTIVE_MASK) >>
> <               IB_PORT_LINK_SPEED_SHIFT) );
> ---
> >       return( (uint8_t)((p_pi->state_info2 &
> >                       IB_PORT_PHYS_STATE_MASK) >>
> >                      IB_PORT_PHYS_STATE_SHIFT) );
> 4136c4329
> < *     Returns the link speed active value assigned to this port.
> ---
> > *     Returns the encoded value for the port physical state.
> 4142a4336,4467
> > /****f* IBA Base: Types/ib_port_info_set_port_phys_state.
> > * NAME
> > *     ib_port_info_set_port_phys_state
> > *
> > * DESCRIPTION
> > *     Given an integer of the port physical state,
> > *     Set the appropriate bits in state_info2
> > *
> > * SYNOPSIS
> > */
> > static inline void
> > ib_port_info_set_port_phys_state(
> >       IN                              uint8_t const                           phys_state,
> >       IN                              ib_port_info_t*                         p_pi )
> > {
> >       p_pi->state_info2 =
> >               ( ~IB_PORT_PHYS_STATE_MASK & p_pi->state_info2 ) |
> >               ( IB_PORT_PHYS_STATE_MASK &
> >         (phys_state << IB_PORT_PHYS_STATE_SHIFT) );
> > }
> > /*
> > * PARAMETERS
> > *     phys_state
> > *             [in] port physical state.
> > *
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *     This function does not return a value.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> >
> > /****f* IBA Base: Types/ib_port_info_get_link_down_def_state
> > * NAME
> > *     ib_port_info_get_link_down_def_state
> > *
> > * DESCRIPTION
> > *     Returns the link down default state.
> > *
> > * SYNOPSIS
> > */
> > static inline uint8_t
> > ib_port_info_get_link_down_def_state(
> >       IN              const   ib_port_info_t* const           p_pi )
> > {
> >       return( (uint8_t)(p_pi->state_info2 & IB_PORT_LNKDWNDFTSTATE_MASK) );
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *     link down default state of the port.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> >
> > /****f* IBA Base: Types/ib_port_info_set_link_down_def_state
> > * NAME
> > *     ib_port_info_set_link_down_def_state
> > *
> > * DESCRIPTION
> > *     Sets the link down default state of the port.
> > *
> > * SYNOPSIS
> > */
> > static inline void
> > ib_port_info_set_link_down_def_state(
> >       IN                              ib_port_info_t* const           p_pi,
> >       IN              const   uint8_t                                         link_dwn_state )
> > {
> >       p_pi->state_info2 = (uint8_t)((p_pi->state_info2 & 0xF0) | link_dwn_state );
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > *     link_dwn_state
> > *             [in] Link down default state of the port.
> > *
> > * RETURN VALUES
> > *     None.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> >
> > /****f* IBA Base: Types/ib_port_info_get_link_speed_active
> > * NAME
> > *     ib_port_info_get_link_speed_active
> > *
> > * DESCRIPTION
> > *     Returns the Link Speed Active value assigned to this port.
> > *
> > * SYNOPSIS
> > */
> > static inline uint8_t
> > ib_port_info_get_link_speed_active(
> >       IN              const   ib_port_info_t* const           p_pi )
> > {
> >   return( (uint8_t)((p_pi->link_speed &
> >                      IB_PORT_LINK_SPEED_ACTIVE_MASK) >>
> >                     IB_PORT_LINK_SPEED_SHIFT) );
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *     Returns the link speed active value assigned to this port.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> >
> > #define IB_LINK_WIDTH_ACTIVE_1X                       1
> > #define IB_LINK_WIDTH_ACTIVE_4X                       2
> > #define IB_LINK_WIDTH_ACTIVE_12X              8
> > #define IB_LINK_SPEED_ACTIVE_2_5       1
> > #define IB_LINK_SPEED_ACTIVE_5         2
> > #define IB_LINK_SPEED_ACTIVE_10        4
> 4144,4151c4469
> < #define IB_LINK_WIDTH_ACTIVE_1X                       1
> < #define IB_LINK_WIDTH_ACTIVE_4X                       2
> < #define IB_LINK_WIDTH_ACTIVE_12X              8
> <
> < #define IB_LINK_SPEED_ACTIVE_2_5              1
> < #define IB_LINK_SPEED_ACTIVE_5                        2
> < #define IB_LINK_SPEED_ACTIVE_10                       4
> <
> ---
> > /* following v1 ver1.2 p901 */
> 4161a4480,4481
> > #define IB_MIN_RATE    IB_PATH_RECORD_RATE_2_5_GBS
> > #define IB_MAX_RATE    IB_PATH_RECORD_RATE_120_GBS
> 4172c4492,4493
> < AL_INLINE uint8_t AL_API
> ---
> >
> > static inline uint8_t
> 4176,4177c4497,4502
> <       switch( p_pi->link_width_active * p_pi->link_width_active *
> <               ib_port_info_get_link_speed_active( 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)
> 4179,4180c4504,4510
> <       case 1:
> <               return IB_PATH_RECORD_RATE_2_5_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_1X:
> >       rate = IB_PATH_RECORD_RATE_2_5_GBS;
> >       break;
> >
> >     case IB_LINK_WIDTH_ACTIVE_4X:
> >       rate = IB_PATH_RECORD_RATE_10_GBS;
> >       break;
> 4182,4183c4512,4514
> <       case 2:
> <               return IB_PATH_RECORD_RATE_5_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_12X:
> >       rate = IB_PATH_RECORD_RATE_30_GBS;
> >       break;
> 4185,4186c4516,4526
> <       case 4:
> <               return IB_PATH_RECORD_RATE_10_GBS;
> ---
> >     default:
> >       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:
> >       rate = IB_PATH_RECORD_RATE_5_GBS;
> >       break;
> 4188,4189c4528,4530
> <       case 8:
> <               return IB_PATH_RECORD_RATE_20_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_4X:
> >       rate = IB_PATH_RECORD_RATE_20_GBS;
> >       break;
> 4191,4192c4532,4534
> <       case 16:
> <               return IB_PATH_RECORD_RATE_40_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_12X:
> >       rate = IB_PATH_RECORD_RATE_60_GBS;
> >       break;
> 4194,4195c4536,4546
> <       case 64:
> <               return IB_PATH_RECORD_RATE_30_GBS;
> ---
> >     default:
> >       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:
> >       rate = IB_PATH_RECORD_RATE_10_GBS;
> >       break;
> 4197,4198c4548,4550
> <       case 128:
> <               return IB_PATH_RECORD_RATE_60_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_4X:
> >       rate = IB_PATH_RECORD_RATE_40_GBS;
> >       break;
> 4200,4201c4552,4554
> <       case 256:
> <               return IB_PATH_RECORD_RATE_120_GBS;
> ---
> >     case IB_LINK_WIDTH_ACTIVE_12X:
> >       rate =IB_PATH_RECORD_RATE_120_GBS;
> >       break;
> 4204c4557,4563
> <               return IB_PATH_RECORD_RATE_2_5_GBS;
> ---
> >       rate = IB_PATH_RECORD_RATE_10_GBS;
> >       break;
> >     }
> >     break;
> >   default:
> >     rate = IB_PATH_RECORD_RATE_2_5_GBS;
> >     break;
> 4205a4565,4566
> >
> >   return rate;
> 4229c4590
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 4238c4599
> <               //link_width_supported = 1: 1x
> ---
> >               /* link_width_supported = 1: 1x */
> 4242c4603
> <               //link_width_supported = 3: 1x or 4x
> ---
> >               /* link_width_supported = 3: 1x or 4x */
> 4254c4615
> <               //link_width_supported = 11: 1x or 4x or 12x
> ---
> >               /* link_width_supported = 11: 1x or 4x or 12x */
> 4291d4651
> <
> 4301c4661
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 4328c4688
> < AL_INLINE uint8_t AL_API
> ---
> > static inline uint8_t
> 4355c4715
> < AL_INLINE void AL_API
> ---
> > static inline void
> 4379a4740,4798
> > /****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
> > */
> > static inline uint8_t
> > 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
> > */
> > static inline void
> > 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
> > *********/
> >
> 4389c4808
> < AL_INLINE void AL_API
> ---
> > static inline void
> 4395c4814,4816
> <       p_pi->subnet_timeout = (uint8_t)(timeout & 0x1F);
> ---
> >       p_pi->subnet_timeout =
> >      (uint8_t)(
> >        (p_pi->subnet_timeout & 0x80) | (timeout & 0x1F));
> 4413c4834
> < /****f* IBA Base: Types/ib_port_info_get_lmc
> ---
> > /****f* IBA Base: Types/ib_port_info_set_client_rereg
> 4415c4836
> < *     ib_port_info_get_lmc
> ---
> > *     ib_port_info_set_client_rereg
> 4418c4839
> < *     Returns the LMC value assigned to this port.
> ---
> > *     Sets the encoded client reregistration bit value in the PortInfo attribute.
> 4422,4424c4843,4846
> < AL_INLINE uint8_t AL_API
> < ib_port_info_get_lmc(
> <       IN              const   ib_port_info_t* const           p_pi )
> ---
> > static inline void
> > ib_port_info_set_client_rereg(
> >       IN              ib_port_info_t* const   p_pi,
> >       IN              const   uint8_t         client_rereg )
> 4426c4848,4851
> <       return( (uint8_t)(p_pi->mkey_lmc & IB_PORT_LMC_MASK) );
> ---
> >       CL_ASSERT( client_rereg <= 0x1 );
> >       p_pi->subnet_timeout =
> >      (uint8_t)(
> >        (p_pi->subnet_timeout & 0x1F) | ((client_rereg << 7) & 0x80));
> 4432a4858,4860
> > *     client_rereg
> > *             [in] Client reregistration value to set (either 1 or 0).
> > *
> 4434c4862
> < *     Returns the LMC value assigned to this port.
> ---
> > *     None.
> 4440c4868,4869
> < /****f* IBA Base: Types/ib_port_info_set_lmc
> ---
> >
> > /****f* IBA Base: Types/ib_port_info_get_timeout
> 4442c4871
> < *     ib_port_info_set_lmc
> ---
> > *     ib_port_info_get_timeout
> 4445c4874
> < *     Sets the LMC value in the PortInfo attribute.
> ---
> > *     Gets the encoded subnet timeout value in the PortInfo attribute.
> 4449,4452c4878,4880
> < AL_INLINE void AL_API
> < ib_port_info_set_lmc(
> <       IN                              ib_port_info_t* const           p_pi,
> <       IN              const   uint8_t                                         lmc )
> ---
> > static inline uint8_t
> > ib_port_info_get_timeout(
> >   IN                          ib_port_info_t const*   p_pi )
> 4454,4455c4882
> <       CL_ASSERT( lmc <= 0x7 );
> <       p_pi->mkey_lmc = (uint8_t)((p_pi->mkey_lmc & 0xF8) | lmc);
> ---
> >   return(p_pi->subnet_timeout & 0x1F );
> 4462,4464d4888
> < *     lmc
> < *             [in] LMC value to set, must be less than 7.
> < *
> 4466c4890
> < *     None.
> ---
> > *     The encoded timeout value
> 4472c4896,4897
> < /****f* IBA Base: Types/ib_port_info_get_mpb
> ---
> >
> > /****f* IBA Base: Types/ib_port_info_get_client_rereg
> 4474c4899
> < *     ib_port_info_get_mpb
> ---
> > *     ib_port_info_get_client_rereg
> 4477c4902
> < *     Returns the M_Key protect bits assigned to this port.
> ---
> > *     Gets the encoded client reregistration bit value in the PortInfo attribute.
> 4481,4483c4906,4908
> < AL_INLINE uint8_t AL_API
> < ib_port_info_get_mpb(
> <       IN              const   ib_port_info_t* const           p_pi )
> ---
> > static inline uint8_t
> > ib_port_info_get_client_rereg(
> >   IN                          ib_port_info_t const* p_pi )
> 4485,4486c4910
> <       return( (uint8_t)((p_pi->mkey_lmc & IB_PORT_MPB_MASK) >>
> <                       IB_PORT_MPB_SHIFT) );
> ---
> >   return ( (p_pi->subnet_timeout & 0x80 ) >> 7);
> 4490c4914
> < *     p_ni
> ---
> > *     p_pi
> 4494c4918
> < *     Returns the M_Key protect bits assigned to this port.
> ---
> > *     Client reregistration value (either 1 or 0).
> 4501c4925
> < /****f* IBA Base: Types/ib_port_info_set_mpb
> ---
> > /****f* IBA Base: Types/ib_port_info_set_hoq_lifetime
> 4503c4927
> < *     ib_port_info_set_mpb
> ---
> > *     ib_port_info_set_hoq_lifetime
> 4506c4930,4931
> < *     Set the M_Key protect bits of this port.
> ---
> > *     Sets the Head of Queue Lifetime for which a packet can live in the head
> > *  of VL queue
> 4510,4513c4935,4938
> < AL_INLINE void AL_API
> < ib_port_info_set_mpb(
> <       IN                              ib_port_info_t*                         p_pi,
> <       IN                              uint8_t                                         mpb )
> ---
> > static inline void
> > ib_port_info_set_hoq_lifetime(
> >   IN          ib_port_info_t* const           p_pi,
> >   IN          const   uint8_t                                 hoq_life )
> 4515,4517c4940,4941
> <       p_pi->mkey_lmc =
> <               ((p_pi->mkey_lmc & ~IB_PORT_MPB_MASK) |
> <               (mpb << IB_PORT_MPB_SHIFT));
> ---
> >   p_pi->vl_stall_life = (uint8_t)((hoq_life & 0x1f) |
> >                                                                                        (p_pi->vl_stall_life & 0xe0));
> 4521,4523c4945
> < *     mpb
> < *             [in] M_Key protect bits
> < *     p_ni
> ---
> > *     p_pi
> 4525a4948,4950
> > *     hoq_life
> > *             [in] Encoded lifetime value to set
> > *
> 4526a4952
> > *     None.
> 4532a4959,4974
> > /****f* IBA Base: Types/ib_port_info_get_hoq_lifetime
> > * NAME
> > *     ib_port_info_get_hoq_lifetime
> > *
> > * DESCRIPTION
> > *     Gets the Head of Queue Lifetime for which a packet can live in the head
> > *  of VL queue
> > *
> > * SYNOPSIS
> > */
> > static inline uint8_t
> > ib_port_info_get_hoq_lifetime(
> >   IN          const ib_port_info_t* const             p_pi )
> > {
> >   return( (uint8_t)(p_pi->vl_stall_life & 0x1f) );
> > }
> 4534c4976,4987
> < typedef uint8_t               ib_svc_name_t[64];
> ---
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *     Encoded lifetime value
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> 4536,4537c4989,5002
> < #include <complib/cl_packon.h>
> < typedef struct _ib_service_record
> ---
> > /****f* IBA Base: Types/ib_port_info_set_vl_stall_count
> > * NAME
> > *     ib_port_info_set_vl_stall_count
> > *
> > * DESCRIPTION
> > *     Sets the VL Stall Count which define the number of contiguous
> > *  HLL (hoq) drops that will put the VL into stalled mode.
> > *
> > * SYNOPSIS
> > */
> > static inline void
> > ib_port_info_set_vl_stall_count(
> >   IN          ib_port_info_t* const           p_pi,
> >   IN          const   uint8_t                                 vl_stall_count )
> 4539,4591c5004,5010
> <       ib_net64_t              service_id;
> <       ib_gid_t                service_gid;
> <       ib_net16_t              service_pkey;
> <       ib_net16_t              resv;
> <       ib_net32_t              service_lease;
> <       uint8_t                 service_key[16];
> <       ib_svc_name_t   service_name;
> <       uint8_t                 service_data8[16];
> <       ib_net16_t              service_data16[8];
> <       ib_net32_t              service_data32[4];
> <       ib_net64_t              service_data64[2];
> <
> < }     PACK_SUFFIX ib_service_record_t;
> < #include <complib/cl_packoff.h>
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_portinfo_record
> < {
> <       ib_net16_t              lid;
> <       uint8_t                 port_num;
> <       uint8_t                 resv;
> <       ib_port_info_t  port_info;
> <       uint8_t                 pad[6];
> <
> < }     PACK_SUFFIX ib_portinfo_record_t;
> < #include <complib/cl_packoff.h>
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_link_record
> < {
> <       ib_net16_t              from_lid;
> <       uint8_t                 from_port_num;
> <       uint8_t                 to_port_num;
> <       ib_net16_t              to_lid;
> <       uint8_t                 pad[2];
> <
> < }     PACK_SUFFIX ib_link_record_t;
> < #include <complib/cl_packoff.h>
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_sminfo_record
> < {
> <       ib_net16_t              lid;
> <       uint16_t                resv0;
> <       ib_sm_info_t    sm_info;
> <       uint8_t                 pad[7];
> <
> < }     PACK_SUFFIX ib_sminfo_record_t;
> < #include <complib/cl_packoff.h>
> <
> < /****s* IBA Base: Types/ib_lft_record_t
> < * NAME
> < *     ib_lft_record_t
> ---
> >   p_pi->vl_stall_life = (uint8_t)((p_pi->vl_stall_life & 0x1f) |
> >                                                                                        ((vl_stall_count << 5) & 0xe0));
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4593,4594c5012,5013
> < * DESCRIPTION
> < *     IBA defined LinearForwardingTable. (14.2.5.6)
> ---
> > *     vl_stall_count
> > *             [in] value to set
> 4596,4612c5015,5016
> < * SYNOPSIS
> < */
> < #include <complib/cl_packon.h>
> < typedef struct _ib_lft_record
> < {
> <       ib_net16_t              lid;
> <       ib_net16_t              block_num;
> <       uint32_t                resv0;
> <       uint8_t                 lft[64];
> <
> < }     PACK_SUFFIX ib_lft_record_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < /****s* IBA Base: Types/ib_switch_info_t
> < * NAME
> < *     ib_switch_info_t
> ---
> > * RETURN VALUES
> > *     None.
> 4614,4615c5018
> < * DESCRIPTION
> < *     IBA defined SwitchInfo. (14.2.5.4)
> ---
> > * NOTES
> 4617,4649c5020,5021
> < * SYNOPSIS
> < */
> < #include <complib/cl_packon.h>
> < typedef struct _ib_switch_info
> < {
> <       ib_net16_t                      lin_cap;
> <       ib_net16_t                      rand_cap;
> <       ib_net16_t                      mcast_cap;
> <       ib_net16_t                      lin_top;
> <       uint8_t                         def_port;
> <       uint8_t                         def_mcast_pri_port;
> <       uint8_t                         def_mcast_not_port;
> <       uint8_t                         life_state;
> <       ib_net16_t                      lids_per_port;
> <       ib_net16_t                      enforce_cap;
> <       uint8_t                         flags;
> <
> < }     PACK_SUFFIX ib_switch_info_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_switch_info_record
> < {
> <       ib_net16_t                      lid;
> <       uint16_t                        resv0;
> <       ib_switch_info_t        switch_info;
> <       uint8_t                         pad[3];
> <
> < }     PACK_SUFFIX ib_switch_info_record_t;
> < #include <complib/cl_packoff.h>
> <
> < #define IB_SWITCH_PSC 0x04
> ---
> > * SEE ALSO
> > *********/
> 4651c5023
> < /****f* IBA Base: Types/ib_switch_info_get_state_change
> ---
> > /****f* IBA Base: Types/ib_port_info_get_vl_stall_count
> 4653c5025
> < *     ib_switch_info_get_state_change
> ---
> > *     ib_port_info_get_vl_stall_count
> 4656c5028,5029
> < *     Returns the value of the state change flag.
> ---
> > *     Gets the VL Stall Count which define the number of contiguous
> > *  HLL (hoq) drops that will put the VL into stalled mode
> 4660,4662c5033,5035
> < AL_INLINE boolean_t AL_API
> < ib_switch_info_get_state_change(
> <       IN              const   ib_switch_info_t* const         p_si )
> ---
> > static inline uint8_t
> > ib_port_info_get_vl_stall_count(
> >   IN          const ib_port_info_t* const             p_pi )
> 4664c5037
> <       return( (p_si->life_state & IB_SWITCH_PSC) == IB_SWITCH_PSC );
> ---
> >   return( (uint8_t)(p_pi->vl_stall_life & 0xe0) >> 5);
> 4665a5039
> >
> 4668,4669c5042,5043
> < *     p_si
> < *             [in] Pointer to a SwitchInfo attribute.
> ---
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4672c5046
> < *     Returns the value of the state change flag.
> ---
> > *     vl stall count
> 4679c5053
> < /****f* IBA Base: Types/ib_switch_info_clear_state_change
> ---
> > /****f* IBA Base: Types/ib_port_info_get_lmc
> 4681c5055
> < *     ib_switch_info_clear_state_change
> ---
> > *     ib_port_info_get_lmc
> 4684c5058
> < *     Clears the switch's state change bit.
> ---
> > *     Returns the LMC value assigned to this port.
> 4688,4690c5062,5064
> < AL_INLINE void AL_API
> < ib_switch_info_clear_state_change(
> <       IN                              ib_switch_info_t* const         p_si )
> ---
> > static inline uint8_t
> > ib_port_info_get_lmc(
> >       IN              const   ib_port_info_t* const           p_pi )
> 4692c5066
> <       p_si->life_state = (uint8_t)(p_si->life_state & 0xFB);
> ---
> >       return( (uint8_t)(p_pi->mkey_lmc & IB_PORT_LMC_MASK) );
> 4696c5070
> < *     p_ni
> ---
> > *     p_pi
> 4707c5081
> < /****s* IBA Base: Types/ib_guid_info_t
> ---
> > /****f* IBA Base: Types/ib_port_info_set_lmc
> 4709c5083
> < *     ib_guid_info_t
> ---
> > *     ib_port_info_set_lmc
> 4712c5086
> < *     IBA defined GuidInfo. (14.2.5.5)
> ---
> > *     Sets the LMC value in the PortInfo attribute.
> 4716,4719c5090,5093
> < #define       GUID_TABLE_MAX_ENTRIES          8
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_guid_info
> ---
> > static inline void
> > ib_port_info_set_lmc(
> >       IN                              ib_port_info_t* const           p_pi,
> >       IN              const   uint8_t                                         lmc )
> 4721,4729c5095,5101
> <       ib_net64_t                      guid[GUID_TABLE_MAX_ENTRIES];
> <
> < }     PACK_SUFFIX ib_guid_info_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < /****s* IBA Base: Types/ib_pkey_table_info_t
> < * NAME
> < *     ib_pkey_table_info_t
> ---
> >       CL_ASSERT( lmc <= IB_PORT_LMC_MAX );
> >       p_pi->mkey_lmc = (uint8_t)((p_pi->mkey_lmc & 0xF8) | lmc);
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4731,4732c5103,5104
> < * DESCRIPTION
> < *     IBA defined PKey table. (14.2.5.7)
> ---
> > *     lmc
> > *             [in] LMC value to set, must be less than 7.
> 4734,4745c5106,5112
> < * SYNOPSIS
> < */
> < #define PKEY_TABLE_MAX_ENTRIES                32
> <
> < #include <complib/cl_packon.h>
> < typedef struct _ib_pkey_table_info
> < {
> <       ib_net16_t                      pkey[PKEY_TABLE_MAX_ENTRIES];
> <
> < }     PACK_SUFFIX ib_pkey_table_info_t;
> < #include <complib/cl_packoff.h>
> < /************/
> ---
> > * RETURN VALUES
> > *     None.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> 4747,4748c5114
> < #define IB_MAX_NUM_VLS 16
> < /****s* IBA Base: Types/ib_slvl_table_t
> ---
> > /****f* IBA Base: Types/ib_port_info_get_link_speed_enabled
> 4750c5116
> < *     ib_slvl_table_t
> ---
> > *     ib_port_info_get_link_speed_enabled
> 4753c5119
> < *     IBA defined SL2VL Mapping Table Attribute. (14.2.5.8)
> ---
> > *     Returns the link speed enabled value assigned to this port.
> 4757,4758c5123,5125
> < #include <complib/cl_packon.h>
> < typedef struct _ib_slvl_table
> ---
> > static inline uint8_t
> > ib_port_info_get_link_speed_enabled(
> >       IN              const   ib_port_info_t* const           p_pi )
> 4760,4766c5127,5141
> <       uint8_t         vl_table[IB_MAX_NUM_VLS/2];
> <
> < }     PACK_SUFFIX ib_slvl_table_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < /****f* IBA Base: Types/ib_slvl_table_get_vl
> ---
> >       return( (uint8_t)(p_pi->link_speed & IB_PORT_LINK_SPEED_ENABLED_MASK) );
> > }
> > /*
> > * PARAMETERS
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *     Port state.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> > /****f* IBA Base: Types/ib_port_info_set_link_speed_enabled
> 4768c5143
> < *     ib_slvl_table_get_vl
> ---
> > *     ib_port_info_set_link_speed_enabled
> 4771c5146
> < *     Retrieves the VL for a given SL from an SL to VL mapping table.
> ---
> > *     Sets the link speed enabled value in the PortInfo attribute.
> 4775,4778c5150,5153
> < AL_INLINE uint8_t AL_API
> < ib_slvl_table_get_vl(
> <       IN              const   ib_slvl_table_t* const          p_slvl_tbl,
> <       IN              const   uint8_t                                         sl )
> ---
> > static inline void
> > ib_port_info_set_link_speed_enabled(
> >       IN                              ib_port_info_t* const           p_pi,
> >       IN              const   uint8_t                                         link_speed_enabled )
> 4780,4789c5155
> <       uint8_t vl;
> <
> <       /* There are two VL's per byte. */
> <       vl = p_slvl_tbl->vl_table[sl/2];
> <       /* If odd, shift down 4 bits. */
> <       if( sl % 2 )
> <               vl >>= 4;
> <
> <       /* Mask off upper bits and return. */
> <       return vl & 0x0F;
> ---
> >       p_pi->link_speed = (uint8_t)((p_pi->link_speed & 0xF0) | link_speed_enabled );
> 4793,4794c5159,5160
> < *     p_slvl_tbl
> < *             [in] Pointer to the SL to VL mapping table from which to return the VL.
> ---
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4796,4797c5162,5163
> < *     sl
> < *             [in] SL in the table for which to return the VL.
> ---
> > *     link_speed_enabled
> > *             [in] link speed enabled value to set.
> 4800c5166,5168
> < *     Returns the VL value for the specified SL in the provided table.
> ---
> > *     None.
> > *
> > * NOTES
> 4803d5170
> < *     ib_slvl_table_t, ib_slvl_table_set_vl
> 4806c5173
> < /****f* IBA Base: Types/ib_slvl_table_set_vl
> ---
> > /****f* IBA Base: Types/ib_port_info_get_mpb
> 4808c5175
> < *     ib_slvl_table_set_vl
> ---
> > *     ib_port_info_get_mpb
> 4811c5178
> < *     Sets the VL for a given SL in an SL to VL mapping table.
> ---
> > *     Returns the M_Key protect bits assigned to this port.
> 4815,4832c5182,5184
> < AL_INLINE void AL_API
> < ib_slvl_table_set_vl(
> <       IN      OUT                     ib_slvl_table_t* const          p_slvl_tbl,
> <       IN              const   uint8_t                                         sl,
> <       IN              const   uint8_t                                         vl )
> < {
> <       uint8_t entry;
> <
> <       /* Get the current value for the byte in which the VL is stored. */
> <       entry = p_slvl_tbl->vl_table[sl/2];
> <
> <       /* Clear the appropriate bits and set the new VL value. */
> <       if( sl % 2 )
> <       {
> <               entry &= 0x0F;
> <               entry |= ((vl & 0x0F) << 4);
> <       }
> <       else
> ---
> > static inline uint8_t
> > ib_port_info_get_mpb(
> >       IN              const   ib_port_info_t* const           p_pi )
> 4834,4838c5186,5187
> <               entry &= 0xF0;
> <               entry |= (vl & 0x0F);
> <       }
> <       /* Store the updated entry back into the table. */
> <       p_slvl_tbl->vl_table[sl/2] = entry;
> ---
> >       return( (uint8_t)((p_pi->mkey_lmc & IB_PORT_MPB_MASK) >>
> >                       IB_PORT_MPB_SHIFT) );
> 4842,4849c5191,5192
> < *     slvl_tbl
> < *             [in/out] Pointer to the SL to VL mapping table in which to store the VL.
> < *
> < *     sl
> < *             [in] SL in the table for which to store the VL.
> < *
> < *     vl
> < *             [in] VL to store at the specifed SL.
> ---
> > *     p_ni
> > *             [in] Pointer to a PortInfo attribute.
> 4852c5195,5197
> < *     This function does not return a value.
> ---
> > *     Returns the M_Key protect bits assigned to this port.
> > *
> > * NOTES
> 4855d5199
> < *     ib_slvl_table_t, ib_slvl_table_get_vl
> 4858c5202
> < /****s* IBA Base: Types/ib_slvl_table_record_t
> ---
> > /****f* IBA Base: Types/ib_port_info_set_mpb
> 4860c5204
> < *     ib_slvl_table_record_t
> ---
> > *     ib_port_info_set_mpb
> 4863c5207
> < *     IBA defined Sl to VL Mapping Table Record for SA Query. (15.2.5.4)
> ---
> > *     Set the M_Key protect bits of this port.
> 4867,4868c5211,5214
> < #include <complib/cl_packon.h>
> < typedef struct _ib_slvl_table_record
> ---
> > static inline void
> > ib_port_info_set_mpb(
> >       IN                              ib_port_info_t*                         p_pi,
> >       IN                              uint8_t                                         mpb )
> 4870,4880c5216,5233
> <       ib_net16_t              lid; // for CA: lid of port, for switch lid of port 0
> <       uint8_t                 in_port_num;    // reserved for CA's
> <       uint8_t                 out_port_num;   // reserved for CA's
> <       uint32_t                resv;
> <       ib_slvl_table_t slvl_tbl;
> <
> < }     PACK_SUFFIX ib_slvl_table_record_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < /****s* IBA Base: Types/ib_vl_arb_element_t
> ---
> >       p_pi->mkey_lmc =
> >               (~IB_PORT_MPB_MASK & p_pi->mkey_lmc) |
> >               ( IB_PORT_MPB_MASK & (mpb << IB_PORT_MPB_SHIFT) );
> > }
> > /*
> > * PARAMETERS
> > *     mpb
> > *             [in] M_Key protect bits
> > *     p_ni
> > *             [in] Pointer to a PortInfo attribute.
> > *
> > * RETURN VALUES
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> > /****f* IBA Base: Types/ib_port_info_get_local_phy_err_thd
> 4882c5235
> < *     ib_vl_arb_element_t
> ---
> > *     ib_port_info_get_local_phy_err_thd
> 4885c5238
> < *     IBA defined VL Arbitration Table Element. (14.2.5.9)
> ---
> > *     Returns the Phy Link Threshold
> 4889,4890c5242,5244
> < #include <complib/cl_packon.h>
> < typedef struct _ib_vl_arb_element
> ---
> > static inline uint8_t
> > ib_port_info_get_local_phy_err_thd(
> >       IN              const   ib_port_info_t* const           p_pi )
> 4892,4899c5246,5260
> <       uint8_t res_vl;
> <       uint8_t weight;
> <
> < }     PACK_SUFFIX ib_vl_arb_element_t;
> < #include <complib/cl_packoff.h>
> < /************/
> <
> < /****f* IBA Base: Types/ib_vl_arb_element_get_vl
> ---
> >   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
> 4901c5262
> < *     ib_vl_arb_element_get_vl
> ---
> > *     ib_port_info_get_local_overrun_err_thd
> 4904c5265
> < *     Retrieves the VL from a VL arbitration table element.
> ---
> > *     Returns the Credits Overrun Errors Threshold
> 4908,4910c5269,5271
> < AL_INLINE uint8_t AL_API
> < ib_vl_arb_element_get_vl(
> <       IN              const   ib_vl_arb_element_t                     vl_arb_element )
> ---
> > static inline uint8_t
> > ib_port_info_get_overrun_err_thd(
> >       IN              const   ib_port_info_t* const           p_pi )
> 4912c5273
> <       return (vl_arb_element.res_vl >> 4);
> ---
> >   return (uint8_t)(p_pi->error_threshold & 0x0F);
> 4916,4917c5277,5278
> < *     vl_arb_element
> < *             [in] VL arbitration table element from which to return the VL.
> ---
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4920c5281,5283
> < *     Returns the VL value for the specified VL arbitration table element.
> ---
> > *     Returns the Credits Overrun errors threshold assigned to this port.
> > *
> > * NOTES
> 4923d5285
> < *     vl_arb_element, ib_vl_arb_element_set_vl
> 4926c5288
> < /****f* IBA Base: Types/ib_vl_arb_element_set_vl
> ---
> > /****f* IBA Base: Types/ib_port_info_set_phy_and_overrun_err_thd
> 4928c5290
> < *     ib_vl_arb_element_set_vl
> ---
> > *     ib_port_info_set_phy_and_overrun_err_thd
> 4931c5293
> < *     Retrieves the VL from a VL arbitration table element.
> ---
> > *     Sets the Phy Link and Credits Overrun Errors Threshold
> 4935,4938c5297,5301
> < AL_INLINE void AL_API
> < ib_vl_arb_element_set_vl(
> <       IN      OUT                     ib_vl_arb_element_t* const      p_vl_arb_element,
> <       IN              const   uint8_t                                         vl )
> ---
> > static inline void
> > ib_port_info_set_phy_and_overrun_err_thd(
> >   IN          ib_port_info_t* const           p_pi,
> >   IN          uint8_t                         phy_threshold,
> >   IN          uint8_t                         overrun_threshold )
> 4940c5303,5304
> <       p_vl_arb_element->res_vl = vl << 4;
> ---
> >   p_pi->error_threshold =
> >        (uint8_t)( ((phy_threshold & 0x0F) << 4) | (overrun_threshold & 0x0F) );
> 4944,4945c5308,5309
> < *     vl_arb_element
> < *             [in/out] VL arbitration table element in which to store the VL.
> ---
> > *     p_pi
> > *             [in] Pointer to a PortInfo attribute.
> 4947,4948c5311,5315
> < *     vl
> < *             [in] VL to store in the specified element.
> ---
> > *     phy_threshold
> > *             [in] Physical Link Errors Threshold above which Trap 129 is generated
> > *
> > *  overrun_threshold
> > *     [in] Credits overrun Errors Threshold above which Trap 129 is generated
> 4951c5318,5320
> < *     This function does not return a value.
> ---
> > *     None.
> > *
> > * NOTES
> 4954d5322
> < *     vl_arb_element, ib_vl_arb_element_get_vl
> 4957,4958c5325,5380
> < #define IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK 32
> < /****s* IBA Base: Types/ib_vl_arb_table_t
> ---
> > typedef uint8_t               ib_svc_name_t[64];
> >
> > #include <complib/cl_packon.h>
> > typedef struct _ib_service_record
> > {
> >       ib_net64_t              service_id;
> >       ib_gid_t                service_gid;
> >       ib_net16_t              service_pkey;
> >       ib_net16_t              resv;
> >       ib_net32_t              service_lease;
> >       uint8_t                 service_key[16];
> >       ib_svc_name_t   service_name;
> >       uint8_t                 service_data8[16];
> >       ib_net16_t              service_data16[8];
> >       ib_net32_t              service_data32[4];
> >       ib_net64_t              service_data64[2];
> >
> > }     PACK_SUFFIX ib_service_record_t;
> > #include <complib/cl_packoff.h>
> >
> > #include <complib/cl_packon.h>
> > typedef struct _ib_portinfo_record
> > {
> >       ib_net16_t              lid;
> >       uint8_t                 port_num;
> >       uint8_t                 resv;
> >       ib_port_info_t  port_info;
> >       uint8_t                 pad[6];
> >
> > }     PACK_SUFFIX ib_portinfo_record_t;
> > #include <complib/cl_packoff.h>
> >
> > #include <complib/cl_packon.h>
> > typedef struct _ib_link_record
> > {
> >       ib_net16_t              from_lid;
> >       uint8_t                 from_port_num;
> >       uint8_t                 to_port_num;
> >       ib_net16_t              to_lid;
> >       uint8_t                 pad[2];
> >
> > }     PACK_SUFFIX ib_link_record_t;
> > #include <complib/cl_packoff.h>
> >
> > #include <complib/cl_packon.h>
> > typedef struct _ib_sminfo_record
> > {
> >       ib_net16_t              lid;
> >       uint16_t                resv0;
> >       ib_sm_info_t    sm_info;
> >       uint8_t                 pad[7];
> >
> > }     PACK_SUFFIX ib_sminfo_record_t;
> > #include <complib/cl_packoff.h>
> >
> > /****s* IBA Base: Types/ib_lft_record_t
> 4960c5382
> < *     ib_vl_arb_table_t
> ---
> > *     ib_lft_record_t
> 4963c5385
> < *     IBA defined VL Arbitration Table. (14.2.5.9)
> ---
> > *     IBA defined LinearForwardingTable. (14.2.5.6)
> 4968c5390
> < typedef struct _ib_vl_arb_table
> ---
> > typedef struct _ib_lft_record
> 4970,4972c5392,5396
> <       ib_vl_arb_element_t vl_entry[IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK];
> <
> < }     PACK_SUFFIX ib_vl_arb_table_t;
> ---
> >       ib_net16_t              lid;
> >       ib_net16_t              block_num;
> >       uint32_t                   resv0;
> >       uint8_t       lft[64];
> > }     PACK_SUFFIX ib_lft_record_t;
> 4976c5400
> < /****s* IBA Base: Types/ib_vl_arb_table_record_t
> ---
> > /****s* IBA Base: Types/ib_switch_info_t
> 4978c5402
> < *     ib_vl_arb_table_record_t
> ---
> > *     ib_switch_info_t
> 4981c5405
> < *     IBA defined VL Arbitration Table Record for SA Query. (15.2.5.9)
> ---
> > *     IBA defined SwitchInfo. (14.2.5.4)
> 4986c5410
> < typedef struct _ib_vl_arb_table_record
> ---
> > typedef struct _ib_switch_info
> 4988,4992c5412,5422
> <       ib_net16_t                      lid; // for CA: lid of port, for switch lid of port 0
> <       uint8_t                         port_num;
> <       uint8_t                         block_num;
> <       uint32_t                        reserved;
> <       ib_vl_arb_table_t       vl_arb_tbl;
> ---
> >       ib_net16_t                      lin_cap;
> >       ib_net16_t                      rand_cap;
> >       ib_net16_t                      mcast_cap;
> >       ib_net16_t                      lin_top;
> >       uint8_t                         def_port;
> >       uint8_t                         def_mcast_pri_port;
> >       uint8_t                         def_mcast_not_port;
> >       uint8_t                         life_state;
> >       ib_net16_t                      lids_per_port;
> >       ib_net16_t                      enforce_cap;
> >       uint8_t                         flags;
> 4994c5424
> < }     PACK_SUFFIX ib_vl_arb_table_record_t;
> ---
> > }     PACK_SUFFIX ib_switch_info_t;
> 4998c5428,5441
> < /****s* IBA Base: Types/ib_grh_t
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_switch_info_record
> > {
> >       ib_net16_t                      lid;
> >       uint16_t                        resv0;
> >       ib_switch_info_t        switch_info;
> >       uint8_t                         pad[3];
> >
> > }     PACK_SUFFIX ib_switch_info_record_t;
> > #include <complib/cl_packoff.h>
> >
> > #define IB_SWITCH_PSC 0x04
> >
> > /****f* IBA Base: Types/ib_switch_info_get_state_change
> 5000c5443
> < *     ib_grh_t
> ---
> > *     ib_switch_info_get_state_change
> 5003c5446
> < *     Global route header information received with unreliable datagram messages
> ---
> > *     Returns the value of the state change flag.
> 5007,5008c5450,5452
> < #include <complib/cl_packon.h>
> < typedef struct _ib_grh
> ---
> > static inline boolean_t
> > ib_switch_info_get_state_change(
> >       IN              const   ib_switch_info_t* const         p_si )
> 5010,5019c5454,5467
> <       ib_net32_t                              ver_class_flow;
> <       ib_net16_t                              resv1;
> <       uint8_t                                 resv2;
> <       uint8_t                                 hop_limit;
> <       ib_gid_t                                src_gid;
> <       ib_gid_t                                dest_gid;
> <
> < }     PACK_SUFFIX ib_grh_t;
> < #include <complib/cl_packoff.h>
> < /************/
> ---
> >       return( (p_si->life_state & IB_SWITCH_PSC) == IB_SWITCH_PSC );
> > }
> > /*
> > * PARAMETERS
> > *     p_si
> > *             [in] Pointer to a SwitchInfo attribute.
> > *
> > * RETURN VALUES
> > *     Returns the value of the state change flag.
> > *
> > * NOTES
> > *
> > * SEE ALSO
> > *********/
> 5021c5469
> < /****f* IBA Base: Types/ib_grh_get_ver_class_flow
> ---
> > /****f* IBA Base: Types/ib_switch_info_clear_state_change
> 5023c5471
> < *     ib_grh_get_ver_class_flow
> ---
> > *     ib_switch_info_clear_state_change
> 5026c5474
> < *     Get encoded version, traffic class and flow label in grh
> ---
> > *     Clears the switch's state change bit.
> 5030,5035c5478,5480
> < AL_INLINE void AL_API
> < ib_grh_get_ver_class_flow(
> <       IN              const   ib_net32_t                                      ver_class_flow,
> <               OUT                     uint8_t* const                          p_ver OPTIONAL,
> <               OUT                     uint8_t* const                          p_tclass OPTIONAL,
> <               OUT                     net32_t* const                          p_flow_lbl OPTIONAL )
> ---
> > static inline void
> > ib_switch_info_clear_state_change(
> >       IN                              ib_switch_info_t* const         p_si )
> 5037,5048c5482
> <       ib_net32_t tmp_ver_class_flow;
> <
> <       tmp_ver_class_flow = cl_ntoh32( ver_class_flow );
> <
> <       if (p_ver)
> <               *p_ver = (uint8_t)(tmp_ver_class_flow >> 28);
> <
> <       if (p_tclass)
> <               *p_tclass = (uint8_t)(tmp_ver_class_flow >> 20);
> <
> <       if (p_flow_lbl)
> <               *p_flow_lbl = (ver_class_flow & CL_HTON32( 0x000FFFFF ));
> ---
> >       p_si->life_state = (uint8_t)(p_si->life_state & 0xFB);
> 5052,5053c5486,5487
> < *     ver_class_flow
> < *             [in] the version, traffic class and flow label info.
> ---
> > *     p_ni
> > *             [in] Pointer to a PortInfo attribute.
> 5056,5063c5490
> < *     p_ver
> < *             [out] pointer to the version info.
> < *
> < *     p_tclass
> < *             [out] pointer to the traffic class info.
> < *
> < *     p_flow_lbl
> < *             [out] pointer to the flow label info
> ---
> > *     Returns the LMC value assigned to this port.
> 5068d5494
> < *     ib_grh_t
> 5071c5497,5498
> < /****f* IBA Base: Types/ib_grh_set_ver_class_flow
> ---
> >
> > /****f* IBA Base: Types/ib_switch_info_is_enhanced_port0
> 5073c5500
> < *     ib_grh_set_ver_class_flow
> ---
> > *     ib_switch_info_is_enhanced_port0
> 5076c5503,5505
> < *     Set encoded version, traffic class and flow label in grh
> ---
> > *     Returns TRUE if the enhancedPort0 bit is on (meaning the switch
> > *  port zero supports enhanced functions).
> > *  Returns FALSE otherwise.
> 5080,5084c5509,5511
> < AL_INLINE ib_net32_t AL_API
> < ib_grh_set_ver_class_flow(
> <       IN              const   uint8_t                                         ver,
> <       IN              const   uint8_t                                         tclass,
> <       IN              const   net32_t                                         flow_lbl )
> ---
> > static inline boolean_t
> > ib_switch_info_is_enhanced_port0(
> >       IN              const   ib_switch_info_t* const         p_si )
> 5086,5090c5513
> <       ib_net32_t              ver_class_flow;
> <
> <       ver_class_flow = cl_hton32( (ver << 28) | (tclass << 20) );
> <       ver_class_flow |= (flow_lbl & CL_HTON32( 0x000FFFFF ));
> <       return (ver_class_flow);
> ---
> >       return( (p_si->flags & 0x08) == 0x08 );
> 5094,5101c5517,5518
> < *     ver
> < *             [in] the version info.
> < *
> < *     tclass
> < *             [in] the traffic class info.
> < *
> < *     flow_lbl
> < *             [in] the flow label info
> ---
> > *     p_si
> > *             [in] Pointer to a SwitchInfo attribute.
> 5104,5105c5521
> < *     ver_class_flow
> < *             [out] the version, traffic class and flow label info.
> ---
> > *     Returns TRUE if the switch supports enhanced port 0. FALSE otherwise.
> 5110d5525
> < *     ib_grh_t
> 5113c5528
> < /****s* IBA Base: Types/ib_member_rec_t
> ---
> > /****s* IBA Base: Types/ib_guid_info_t
> 5115c5530
> < *     ib_member_rec_t
> ---
> > *     ib_guid_info_t
> 5118,5119c5533
> < *     Multicast member record, used to create, join, and leave multicast
> < *     groups.
> ---
> > *     IBA defined GuidInfo. (14.2.5.5)
> 5122a5537,5538
> > #define       GUID_TABLE_MAX_ENTRIES          8
> >
> 5124c5540
> < typedef struct _ib_member_rec
> ---
> > typedef struct _ib_guid_info
> 5126,5130c5542,5564
> <       ib_gid_t                                mgid;
> <       ib_gid_t                                port_gid;
> <       ib_net32_t                              qkey;
> <       ib_net16_t                              mlid;
> <       uint8_t                                 mtu;
> ---
> >       ib_net64_t                      guid[GUID_TABLE_MAX_ENTRIES];
> >
> > }     PACK_SUFFIX ib_guid_info_t;
> > #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_MULTIPATH_MAX_GIDS 11      /* Support max that can fit into first MAD (for now) */
> >
> > #include <complib/cl_packon.h>
> > typedef struct _ib_multipath_rec_t
> > {
> >       ib_net32_t              hop_flow_raw;
> 5131a5566
> >       uint8_t                 num_path;
> 5132a5568,5570
> >       uint8_t                 resv0;
> >       uint8_t                 sl;
> >       uint8_t                 mtu;
> 5135,5141c5573,5579
> <       ib_net32_t                              sl_flow_hop;
> <       uint8_t                                 scope_state;
> <       uint8_t                                 proxy_join;
> <       uint8_t                                 reserved[2];
> <       uint8_t                                 pad[4];
> <
> < }     PACK_SUFFIX ib_member_rec_t;
> ---
> >       uint8_t                 resv1;
> >       uint8_t                 independence;   /* formerly resv2 */
> >       uint8_t                 sgid_count;
> >       uint8_t                 dgid_count;
> >       uint8_t                 resv3[7];
> >       ib_gid_t                gids[IB_MULTIPATH_MAX_GIDS];
> > }     PACK_SUFFIX ib_multipath_rec_t;
> 5145,5146c5583,5584
> < *     mgid
> < *             Multicast GID address for this multicast group.
> ---
> > *       hop_flow_raw
> > *               Global routing parameters: hop count, flow label and raw bit.
> 5148,5149c5586,5587
> < *     port_gid
> < *             Valid GID of the endpoint joining this multicast group.
> ---
> > *       tclass
> > *               Another global routing parameter.
> 5151,5152c5589,5592
> < *     requestor_gid
> < *             GID of the endpoint making this request on hehave of port_gid.
> ---
> > *       num_path
> > *     Reversible path - 1 bit to say if path is reversible.
> > *               num_path [6:0] In queries, maximum number of paths to return.
> > *               In responses, undefined.
> 5154,5155c5594,5595
> < *     qkey
> < *             Q_Key to be used by this multicast group.
> ---
> > *       pkey
> > *               Partition key (P_Key) to use on this path.
> 5157,5158c5597,5598
> < *     mlid
> < *             Multicast LID for this multicast group.
> ---
> > *       sl
> > *               Service level to use on this path.
> 5162,5168d5601
> < *
> < *     tclass
> < *             Another global routing parameter.
> < *
> < *     pkey
> < *             Partition key (P_Key) to use for this member.
> < *
> 5175,5233c5608,5610
> < *     sl_flow_hop
> < *             Global routing parameters: service level, hop count, and flow label.
> < *
> < *     scope_state
> < *             MGID scope and JoinState of multicast request.
> < *
> < *     proxy_join
> < *             Enables others in the Partition to proxy add/remove from the group
> < *
> < * SEE ALSO
> < *********/
> <
> < /****f* IBA Base: Types/ib_member_get_sl_flow_hop
> < * NAME
> < *     ib_member_get_sl_flow_hop
> < *
> < * DESCRIPTION
> < *     Get encoded sl flow label and hop limit
> < *
> < * SYNOPSIS
> < */
> < AL_INLINE void AL_API
> < ib_member_get_sl_flow_hop(
> <       IN              const   ib_net32_t                                      sl_flow_hop,
> <               OUT                     uint8_t* const                          p_sl OPTIONAL,
> <               OUT                     net32_t* const                          p_flow_lbl OPTIONAL,
> <               OUT                     uint8_t* const                          p_hop OPTIONAL )
> < {
> <       ib_net32_t tmp_sl_flow_hop;
> <
> <       if (p_sl)
> <               *p_sl = (uint8_t)(sl_flow_hop & 0x0f);
> <
> <       tmp_sl_flow_hop = sl_flow_hop >> 4;
> <
> <       if (p_flow_lbl)
> <               *p_flow_lbl = (uint32_t)(tmp_sl_flow_hop & 0xffffff);
> <
> <       tmp_sl_flow_hop = tmp_sl_flow_hop >> 20;
> <
> <       if (p_hop)
> <               *p_hop = (uint8_t)(tmp_sl_flow_hop & 0xff);
> < }
> < /*
> < * PARAMETERS
> < *     sl_flow_hop
> < *             [in] the sl flow label and hop limit of MC Group
> < *
> < * RETURN VALUES
> < *     p_sl
> < *             [out] pointer to the service level
> < *
> < *     p_flow_lbl
> < *             [out] pointer to the flow label info
> < *
> < *     p_hop
> < *             [out] pointer to the hop count limit.
> < *
> < * NOTES
> ---
> > *       preference
> > *               Indicates the relative merit of this path versus other path
> > *               records returned from the SA.  Lower numbers are better.
> 5236d5612
> < *     ib_member_rec_t
> 5239c5615
> < /****f* IBA Base: Types/ib_member_set_sl_flow_hop
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_num_path
> 5241c5617
> < *     ib_member_set_sl_flow_hop
> ---
> > *       ib_multipath_rec_num_path
> 5244c5620
> < *     Set encoded version, sl flow and hop
> ---
> > *       Get max number of paths to return.
> 5248,5261c5624,5628
> < AL_INLINE ib_net32_t AL_API
> < ib_member_set_sl_flow_hop(
> <       IN              const   uint8_t                                         sl,
> <       IN              const   net32_t                                         flow_lbl,
> <       IN              const   uint8_t                                         hop_limit )
> < {
> <       ib_net32_t              sl_flow_hop;
> <
> <       sl_flow_hop = sl;
> <       sl_flow_hop <<= 20;
> <       sl_flow_hop |= (cl_ntoh32( flow_lbl ) & 0x000FFFFF);
> <       sl_flow_hop <<= 8;
> <       sl_flow_hop |= hop_limit;
> <       return cl_hton32(sl_flow_hop);
> ---
> > static inline uint8_t
> > ib_multipath_rec_num_path(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> > {
> >         return( p_rec->num_path &0x7F );
> 5265,5272c5632,5633
> < *     sl
> < *             [in] the service level.
> < *
> < *     flow_lbl
> < *             [in] the flow label info
> < *
> < *     hop_limit
> < *             [in] the hop limit.
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5275,5276c5636
> < *     sl_flow_hop
> < *             [out] the sl flow label and hop limit
> ---
> > *       Maximum number of paths to return for each unique SGID_DGID combination.
> 5281c5641
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5284c5644
> < /****f* IBA Base: Types/ib_member_get_scope
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_sl
> 5286c5646
> < *     ib_member_get_scope
> ---
> > *       ib_multipath_rec_sl
> 5289c5649
> < *     Get encoded MGID scope
> ---
> > *       Get multipath service level.
> 5293,5295c5653,5655
> < AL_INLINE uint8_t AL_API
> < ib_member_get_scope(
> <       IN              const   uint8_t                                         scope_state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_sl(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5297c5657
> <       return (scope_state >> 4);
> ---
> >         return( (uint8_t)((cl_ntoh16( p_rec->sl )) & 0xF) );
> 5301,5302c5661,5662
> < *     scope_state
> < *             [in] the scope and state
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5305c5665,5667
> < *     Encoded scope.
> ---
> > *     SL.
> > *
> > * NOTES
> 5308c5670
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5311c5673
> < /****f* IBA Base: Types/ib_member_get_state
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_mtu
> 5313c5675
> < *     ib_member_get_state
> ---
> > *       ib_multipath_rec_mtu
> 5316c5678
> < *     Get encoded MGID JoinState
> ---
> > *       Get encoded path MTU.
> 5320,5322c5682,5684
> < AL_INLINE uint8_t AL_API
> < ib_member_get_state(
> <       IN              const   uint8_t                                         scope_state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_mtu(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5324c5686
> <       return (scope_state & 0x0f);
> ---
> >         return( (uint8_t)(p_rec->mtu & IB_MULTIPATH_REC_BASE_MASK) );
> 5328,5329c5690,5691
> < *     scope_state
> < *             [in] the scope and state
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5332c5694,5702
> < *             Encoded JoinState
> ---
> > *       Encoded path MTU.
> > *               1: 256
> > *               2: 512
> > *               3: 1024
> > *               4: 2048
> > *               5: 4096
> > *               others: reserved
> > *
> > * NOTES
> 5335c5705
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5338c5708
> < /****f* IBA Base: Types/ib_member_get_scope_state
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_mtu_sel
> 5340c5710
> < *     ib_member_get_scope_state
> ---
> > *       ib_multipath_rec_mtu_sel
> 5343c5713
> < *     Get encoded MGID scope and JoinState
> ---
> > *       Get encoded multipath MTU selector.
> 5347,5351c5717,5719
> < AL_INLINE void AL_API
> < ib_member_get_scope_state(
> <       IN              const   uint8_t                                         scope_state,
> <               OUT                     uint8_t* const                          p_scope,
> <               OUT                     uint8_t* const                          p_state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_mtu_sel(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5353,5357c5721
> <       if (p_scope)
> <               *p_scope = ib_member_get_scope( scope_state );
> <
> <       if (p_state)
> <               *p_state = ib_member_get_state( scope_state );
> ---
> >         return( (uint8_t)((p_rec->mtu & IB_MULTIPATH_REC_SELECTOR_MASK) >> 6) );
> 5361,5362c5725,5726
> < *     scope_state
> < *             [in] the scope and state
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5365,5369c5729,5733
> < *     p_scope
> < *             [out] pointer to the MGID scope
> < *
> < *     p_state
> < *             [out] pointer to the join state
> ---
> > *       Encoded path MTU selector value (for queries).
> > *               0: greater than MTU specified
> > *               1: less than MTU specified
> > *               2: exactly the MTU specified
> > *               3: largest MTU available
> 5374c5738
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5377c5741
> < /****f* IBA Base: Types/ib_member_set_scope
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_rate
> 5379c5743
> < *     ib_member_set_scope
> ---
> > *       ib_multipath_rec_rate
> 5382c5746
> < *     Set encoded scope of a MCR.
> ---
> > *       Get encoded multipath rate.
> 5386,5389c5750,5752
> < AL_INLINE void AL_API
> < ib_member_set_scope(
> <       IN      OUT                     uint8_t* const                          p_scope_state,
> <       IN              const   uint8_t                                         scope )
> ---
> > static inline uint8_t
> > ib_multipath_rec_rate(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5391,5394c5754
> <       CL_ASSERT( scope <= 0x0F );
> <       /* Scope is MS 4-bits. */
> <       *p_scope_state &= 0xF0;
> <       *p_scope_state |= (scope << 4);
> ---
> >         return( (uint8_t)(p_rec->rate & IB_MULTIPATH_REC_BASE_MASK) );
> 5398,5402c5758,5759
> < *     scope_state
> < *             [in/out] Pointer to the MCR scope_state field.
> < *
> < *     scope
> < *             [in] The desired scope.
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5405c5762,5768
> < *     This function does not return a value.
> ---
> > *       Encoded multipath rate.
> > *               2: 2.5 Gb/sec.
> > *               3: 10 Gb/sec.
> > *               4: 30 Gb/sec.
> > *               others: reserved
> > *
> > * NOTES
> 5408c5771
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5411c5774
> < /****f* IBA Base: Types/ib_member_set_state
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_rate_sel
> 5413c5776
> < *     ib_member_set_state
> ---
> > *       ib_multipath_rec_rate_sel
> 5416c5779
> < *     Set encoded JoinState of a MCR.
> ---
> > *       Get encoded multipath rate selector.
> 5420,5423c5783,5785
> < AL_INLINE void AL_API
> < ib_member_set_state(
> <       IN      OUT                     uint8_t* const                          p_scope_state,
> <       IN              const   uint8_t                                         state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_rate_sel(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5425,5428c5787
> <       CL_ASSERT( state <= 0x0F );
> <       /* State is LS 4-bits. */
> <       *p_scope_state &= 0x0F;
> <       *p_scope_state |= (state & 0x0F);
> ---
> >         return( (uint8_t)((p_rec->rate & IB_MULTIPATH_REC_SELECTOR_MASK) >> 6) );
> 5432,5436c5791,5792
> < *     scope_state
> < *             [in/out] Pointer to the MCR scope_state field to modify.
> < *
> < *     state
> < *             [in] the JoinState
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5439c5795,5801
> < *     This function does not return a value.
> ---
> > *       Encoded path rate selector value (for queries).
> > *               0: greater than rate specified
> > *               1: less than rate specified
> > *               2: exactly the rate specified
> > *               3: largest rate available
> > *
> > * NOTES
> 5442c5804
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5445c5807
> < /****f* IBA Base: Types/ib_member_set_scope_state
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_pkt_life
> 5447c5809
> < *     ib_member_set_scope_state
> ---
> > *       ib_multipath_rec_pkt_life
> 5450c5812
> < *     Set encoded version, MGID scope and JoinState
> ---
> > *       Get encoded multipath pkt_life.
> 5454,5457c5816,5818
> < AL_INLINE uint8_t AL_API
> < ib_member_set_scope_state(
> <       IN              const   uint8_t                                         scope,
> <       IN              const   uint8_t                                         state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_pkt_life(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5459,5460c5820
> <       /* Scope is MS 4-bits, state is LS 4-bits */
> <       return ((scope << 4) | (state & 0xF));
> ---
> >         return( (uint8_t)(p_rec->pkt_life & IB_MULTIPATH_REC_BASE_MASK) );
> 5464,5468c5824,5825
> < *     scope
> < *             [in] the MGID scope
> < *
> < *     state
> < *             [in] the JoinState
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5471,5472c5828
> < *     scope_state
> < *             [out] the encoded one
> ---
> > *       Encoded multipath pkt_life = 4.096 �sec * 2 ** PacketLifeTime.
> 5477c5833
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5480c5836
> < /****f* IBA Base: Types/ib_member_set_join_state
> ---
> > /****f* IBA Base: Types/ib_multipath_rec_pkt_life_sel
> 5482c5838
> < *     ib_member_set_join_state
> ---
> > *       ib_multipath_rec_pkt_life_sel
> 5485c5841
> < *     Set JoinState
> ---
> > *       Get encoded multipath pkt_lifetime selector.
> 5489,5492c5845,5847
> < AL_INLINE void AL_API
> < ib_member_set_join_state(
> <       IN      OUT                     ib_member_rec_t                         *p_mc_rec,
> <       IN              const   uint8_t                                         state )
> ---
> > static inline uint8_t
> > ib_multipath_rec_pkt_life_sel(
> >         IN              const   ib_multipath_rec_t* const            p_rec )
> 5494,5495c5849
> <       p_mc_rec->scope_state &= 0xF0;
> <       p_mc_rec->scope_state |= (state & 0x0F);
> ---
> >         return( (uint8_t)((p_rec->pkt_life & IB_MULTIPATH_REC_SELECTOR_MASK) >> 6 ));
> 5499,5503c5853,5854
> < *     p_mc_rec
> < *             [in] pointer to the member record
> < *
> < *     state
> < *             [in] the JoinState
> ---
> > *       p_rec
> > *               [in] Pointer to the multipath record object.
> 5506c5857,5861
> < *     NONE
> ---
> > *       Encoded path pkt_lifetime selector value (for queries).
> > *               0: greater than rate specified
> > *               1: less than rate specified
> > *               2: exactly the rate specified
> > *               3: smallest packet lifetime available
> 5511c5866
> < *     ib_member_rec_t
> ---
> > *       ib_multipath_rec_t
> 5514,5515c5869,5877
> < /*
> <  * Join State Codes:
> ---
> > #define IB_NUM_PKEY_ELEMENTS_IN_BLOCK         32
> > /****s* IBA Base: Types/ib_pkey_table_t
> > * NAME
> > *     ib_pkey_table_t
> > *
> > * DESCRIPTION
> > *     IBA defined PKey table. (14.2.5.7)
> > *
> > * SYNOPSIS
> 5517,5519d5878
> < #define IB_MC_REC_STATE_FULL_MEMBER 0x01
> < #define IB_MC_REC_STATE_NON_MEMBER 0x02
> < #define IB_MC_REC_STATE_SEND_ONLY_MEMBER 0x04
> 5521,5529c5880,5883
> < /*
> <  *    Generic MAD notice types
> <  */
> < #define IB_NOTICE_TYPE_FATAL                          0x00
> < #define IB_NOTICE_TYPE_URGENT                         0x01
> < #define IB_NOTICE_TYPE_SECURITY                               0x02
> < #define IB_NOTICE_TYPE_SUBN_MGMT                      0x03
> < #define IB_NOTICE_TYPE_INFO                                   0x04
> < #define IB_NOTICE_TYPE_EMPTY                          0x7F
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_pkey_table
> > {
> >       ib_net16_t                      pkey_entry[IB_NUM_PKEY_ELEMENTS_IN_BLOCK];
> 5530a5885,5887
> > }     PACK_SUFFIX ib_pkey_table_t;
> > #include <complib/cl_packoff.h>
> > /************/
> 5531a5889,5897
> > /****s* IBA Base: Types/ib_pkey_table_record_t
> > * NAME
> > *     ib_pkey_table_record_t
> > *
> > * DESCRIPTION
> > *     IBA defined P_Key Table Record for SA Query. (15.2.5.11)
> > *
> > * SYNOPSIS
> > */
> 5533c5899
> < typedef struct _ib_mad_notice_attr
> ---
> > typedef struct _ib_pkey_table_record
> 5535,5545c5901,5906
> <       /* is_generic:1, type:7, producer type or vendor id:24 */
> <       net32_t                         combo1;
> <       /* trap number or device id, depending on is_generic. */
> <       net16_t                         combo2;
> <
> <       net16_t                         issuer_lid;
> <       /* notice toggle:1, notice_count:15 */
> <       net16_t                         combo3;
> <
> <       uint8_t                         data_details[54];
> <       ib_gid_t                        issuer_gid;
> ---
> >       ib_net16_t                      lid; // for CA: lid of port, for switch lid of port 0
> >       uint16_t                                block_num;
> >    uint8_t                            port_num; // for switch: port number, for CA: reserved
> >       uint8_t                         reserved1;
> >       uint16_t                        reserved2;
> >       ib_pkey_table_t pkey_tbl;
> 5547c5908
> < }     PACK_SUFFIX ib_mad_notice_attr_t;
> ---
> > }     PACK_SUFFIX ib_pkey_table_record_t;
> 5548a5910
> > /************/
> 5550c5912,5914
> < /****f* IBA Base: Types/ib_notice_get_generic
> ---
> > #define IB_DROP_VL 15
> > #define IB_MAX_NUM_VLS 16
> > /****s* IBA Base: Types/ib_slvl_table_t
> 5552c5916
> < *     ib_notice_get_generic
> ---
> > *     ib_slvl_table_t
> 5555c5919
> < *     Retrieves whether a notice trap is generic.
> ---
> > *     IBA defined SL2VL Mapping Table Attribute. (14.2.5.8)
> 5559,5561c5923,5924
> < AL_INLINE boolean_t AL_API
> < ib_notice_get_generic(
> <       IN              const   ib_mad_notice_attr_t* const     p_notice_attr )
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_slvl_table
> 5563,5574c5926,5933
> <       if( cl_ntoh32( p_notice_attr->combo1 ) & 0x00000001 )
> <               return TRUE;
> <       return FALSE;
> < }
> < /*
> < * PARAMETERS
> < *     p_notice_attr
> < *             [in] Pointer to the notice attribute structure for which to return
> < *             whether it is generic or not.
> < *
> < * RETURN VALUES
> < *     Returns TRUE if the notice is generic.
> ---
> >       uint8_t raw_vl_by_sl[IB_MAX_NUM_VLS/2];
> > }     PACK_SUFFIX ib_slvl_table_t;
> > #include <complib/cl_packoff.h>
> > /************/
> >
> > /****s* IBA Base: Types/ib_slvl_table_record_t
> > * NAME
> > *     ib_slvl_table_record_t
> 5576c5935,5936
> < *     Returns FALSE if the notice is vendor specific.
> ---
> > * DESCRIPTION
> > *     IBA defined SL to VL Mapping Table Record for SA Query. (15.2.5.4)
> 5578,5580c5938,5947
> < * SEE ALSO
> < *     ib_mad_notice_attr_t, ib_notice_set_generic
> < *********/
> ---
> > * SYNOPSIS
> > */
> > #include <complib/cl_packon.h>
> > typedef struct _ib_slvl_table_record
> > {
> >       ib_net16_t              lid; // for CA: lid of port, for switch lid of port 0
> >       uint8_t                 in_port_num;    // reserved for CAs
> >       uint8_t                 out_port_num;   // reserved for CAs
> >       uint32_t                resv;
> >       ib_slvl_table_t slvl_tbl;
> 5582c5949,5953
> < /****f* IBA Base: Types/ib_notice_set_generic
> ---
> > }     PACK_SUFFIX ib_slvl_table_record_t;
> > #include <complib/cl_packoff.h>
> > /************/
> >
> > /****f* IBA Base: Types/ib_slvl_table_set
> 5584c5955
> < *     ib_notice_set_generic
> ---
> > *     ib_slvl_table_set
> 5587c5958
> < *     Sets whether a notice trap is generic.
> ---
> > *     Set slvl table entry.
> 5591,5594c5962,5966
> < AL_INLINE void AL_API
> < ib_notice_set_generic(
> <       IN      OUT                     ib_mad_notice_attr_t* const     p_notice_attr,
> <       IN              const   boolean_t                                       is_generic )
> ---
> > static inline void
> > ib_slvl_table_set(
> >   IN          ib_slvl_table_t*        p_slvl_tbl,
> >   IN          uint8_t                 sl_index,
> >   IN     uint8_t                 vl )
> 5596c5968,5970
> <       uint32_t        val;
> ---
> >   uint8_t idx = sl_index/2;
> >   CL_ASSERT(vl <= 15);
> >   CL_ASSERT(sl_index <= 15);
> 5598,5600c5972,5976
> <       val = cl_ntoh32( p_notice_attr->combo1 );
> <       if( is_generic )
> <               val |= 0x00000001;
> ---
> >   if (sl_index%2)
> >   {
> >     /* this is an odd sl. Need to update the ls bits */
> >     p_slvl_tbl->raw_vl_by_sl[idx] = ( p_slvl_tbl->raw_vl_by_sl[idx] & 0xF0 ) | vl ;
> >   }
> 5602,5603c5978,5981
> <               val &= 0xFFFFFFFE;
> <       p_notice_attr->combo1 = cl_hton32( val );
> ---
> >   {
> >     /* this is an even sl. Need to update the ms bits */
> >     p_slvl_tbl->raw_vl_by_sl[idx] = ( vl << 4 ) | ( p_slvl_tbl->raw_vl_by_sl[idx] & 0x0F );
> >   }
> 5607,5609c5985,5989
> < *     p_notice_attr
> < *             [in/out] Pointer to the notice attribute structure for which to set
> < *             the generic bit.
> ---
> > *     p_slvl_tbl
> > *             [in] pointer to ib_slvl_table_t object.
> > *
> > *     sl_index
> > *             [in] the sl index in the table to be updated.
> 5611,5612c5991,5992
> < *     is_generic
> < *             [in] TRUE if the notice is generic, FALSE if vendor specific.
> ---
> > *     vl
> > *             [in] the vl value to update for that sl.
> 5615c5995,5997
> < *     This function does not return a value.
> ---
> > *     None
> > *
> > * NOTES
> 5618c6000
> < *     ib_mad_notice_attr_t, ib_notice_get_generic
> ---
> > *     ib_slvl_table_t
> 5621c6003
> < /****f* IBA Base: Types/ib_notice_get_type
> ---
> > /****f* IBA Base: Types/ib_slvl_table_get
> 5623c6005
> < *     ib_notice_get_type
> ---
> > *     ib_slvl_table_get
> 5626c6008
> < *     Retrieves the type of a notice trap.
> ---
> > *     Get slvl table entry.
> 5630,5632c6012,6020
> < AL_INLINE uint8_t AL_API
> < ib_notice_get_type(
> <       IN              const   ib_mad_notice_attr_t* const     p_notice_attr )
> ---
> > static inline uint8_t
> > ib_slvl_table_get(
> >   IN          const ib_slvl_table_t*        p_slvl_tbl,
> >   IN          uint8_t                 sl_index )
> > {
> >   uint8_t idx = sl_index/2;
> >   CL_ASSERT(sl_index <= 15);
> >
> >   if (sl_index%2)
> 5634c6022,6029
> <       return (uint8_t)((cl_ntoh32( p_notice_attr->combo1 ) >> 1) & 0x0000007F);
> ---
> >     /* this is an odd sl. Need to return the ls bits. */
> >     return ( p_slvl_tbl->raw_vl_by_sl[idx] & 0x0F );
> >   }
> >   else
> >   {
> >     /* this is an even sl. Need to return the ms bits. */
> >     return ( (p_slvl_tbl->raw_vl_by_sl[idx] & 0xF0) >> 4 );
> >   }
> 5638,5639c6033,6037
> < *     p_notice_attr
> < *             [in] Pointer to the notice attribute structure whose type to return.
> ---
> > *     p_slvl_tbl
> > *             [in] pointer to ib_slvl_table_t object.
> > *
> > *     sl_index
> > *             [in] the sl index in the table whose value should be returned.
> 5642c6040,6042
> < *     Returns the type of the notice.
> ---
> > *     vl for the requested sl_index.
> > *
> > * NOTES
> 5645c6045
> < *     ib_mad_notice_attr_t, ib_notice_set_type
> ---
> > *     ib_slvl_table_t
> 5648c6048
> < /****f* IBA Base: Types/ib_notice_set_type
> ---
> > /****s* IBA Base: Types/ib_vl_arb_element_t
> 5650c6050
> < *     ib_notice_set_type
> ---
> > *     ib_vl_arb_element_t
> 5653c6053
> < *     Sets the type of a notice trap.
> ---
> > *     IBA defined VL Arbitration Table Element. (14.2.5.9)
> 5657,5660c6057,6058
> < AL_INLINE void AL_API
> < ib_notice_set_type(
> <       IN      OUT                     ib_mad_notice_attr_t* const     p_notice_attr,
> <       IN              const   uint8_t                                         type )
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_vl_arb_element
> 5662c6060,6061
> <       uint32_t        val;
> ---
> >   uint8_t vl;
> >   uint8_t weight;
> 5664,5684c6063,6065
> <       val = cl_ntoh32( p_notice_attr->combo1 );
> <       /* Clear the type. */
> <       val &= 0xFFFFFF01;
> <       /* Set new value. */
> <       val |= (((uint32_t)(type & 0x7F)) << 1);
> <       p_notice_attr->combo1 = cl_hton32( val );
> < }
> < /*
> < * PARAMETERS
> < *     p_notice_attr
> < *             [in/out] Pointer to the notice attribute structure whose type to set.
> < *
> < *     type
> < *             [in] Type of notice trap.
> < *
> < * RETURN VALUES
> < *     This function does not return a value.
> < *
> < * SEE ALSO
> < *     ib_mad_notice_attr_t, ib_notice_get_type
> < *********/
> ---
> > }     PACK_SUFFIX ib_vl_arb_element_t;
> > #include <complib/cl_packoff.h>
> > /************/
> 5686c6067,6068
> < /****f* IBA Base: Types/ib_notice_get_prod_type
> ---
> > #define IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK 32
> > /****s* IBA Base: Types/ib_vl_arb_table_t
> 5688c6070
> < *     ib_notice_get_prod_type
> ---
> > *     ib_vl_arb_table_t
> 5691c6073
> < *     Retrieves the producer type from a generic notice trap.
> ---
> > *     IBA defined VL Arbitration Table. (14.2.5.9)
> 5695,5697c6077,6078
> < AL_INLINE uint32_t AL_API
> < ib_notice_get_prod_type(
> <       IN              const   ib_mad_notice_attr_t* const     p_notice_attr )
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_vl_arb_table
> 5699,5712c6080,6084
> <       return (cl_ntoh32( p_notice_attr->combo1 ) >> 8);
> < }
> < /*
> < * PARAMETERS
> < *     p_notice_attr
> < *             [in] Pointer to the notice attribute structure whose
> < *             prducer type to return.
> < *
> < * RETURN VALUES
> < *     Returns the producer type of the notice, in host byte order.
> < *
> < * SEE ALSO
> < *     ib_mad_notice_attr_t, ib_notice_set_prod_type
> < *********/
> ---
> >       ib_vl_arb_element_t vl_entry[IB_NUM_VL_ARB_ELEMENTS_IN_BLOCK];
> >
> > }     PACK_SUFFIX ib_vl_arb_table_t;
> > #include <complib/cl_packoff.h>
> > /************/
> 5714c6086
> < /****f* IBA Base: Types/ib_notice_set_prod_type
> ---
> > /****s* IBA Base: Types/ib_vl_arb_table_record_t
> 5716c6088
> < *     ib_notice_set_prod_type
> ---
> > *     ib_vl_arb_table_record_t
> 5719c6091
> < *     Sets the producer type of a generic notice trap.
> ---
> > *     IBA defined VL Arbitration Table Record for SA Query. (15.2.5.9)
> 5723,5726c6095,6096
> < AL_INLINE void AL_API
> < ib_notice_set_prod_type(
> <       IN      OUT                     ib_mad_notice_attr_t* const     p_notice_attr,
> <       IN              const   uint32_t                                        prod_type )
> ---
> > #include <complib/cl_packon.h>
> > typedef struct _ib_vl_arb_table_record
> 5728c6098,6106
> <       uint32_t        val;
> ---
> >       ib_net16_t                      lid; // for CA: lid of port, for switch lid of port 0
> >       uint8_t                         port_num;
> >       uint8_t                         block_num;
> >       uint32_t                        reserved;
> >       ib_vl_arb_table_t       vl_arb_tbl;
> >
> > }     PACK_SUFFIX ib_vl_arb_table_record_t;
> > #include <complib/cl_packoff.h>
> > /************/
> 5730,5736d6107
> <       val = cl_ntoh32( p_notice_attr->combo1 );
> <       /* Clear the type. */
> <       val &= 0x000000FF;
> <       /* Set new value. */
> <       val |= (prod_type << 8);
> <       p_notice_attr->combo1 = cl_hton32( val );
> < }
> 5738,5751c6109,6119
> < * PARAMETERS
> < *     p_notice_attr
> < *             [in/out] Pointer to the notice attribute structure
> < *             whose producer type to set.
> < *
> < *     prod_type
> < *             [in] Producer type of notice trap.
> < *
> < * RETURN VALUES
> < *     This function does not return a value.
> < *
> < * SEE ALSO
> < *     ib_mad_notice_attr_t, ib_notice_get_prod_type
> < *********/
> ---
> >  *    Global route header information received with unreliable datagram messages
> >  */
> > #include <complib/cl_packon.h>
> > typedef struct _ib_grh
> > {
> >       ib_net32_t                              ver_class_flow;
> >       ib_net16_t                              resv1;
> >       uint8_t                                 resv2;
> >       uint8_t                                 hop_limit;
> >       ib_gid_t                                src_gid;
> >       ib_gid_t                                dest_gid;
> 5753c6121,6124
> < /****f* IBA Base: Types/ib_notice_get_vend_id
> ---
> > }     PACK_SUFFIX ib_grh_t;
> > #include <complib/cl_packoff.h>
> >
> > /****f* IBA Base: Types/ib_grh_get_ver_class_flow
> 5755c6126
> < *     ib_notice_get_vend_id
> ---
> > *     ib_grh_get_ver_class_flow
> 5758c6129
> < *     Retrieves the vendor ID from a vendor specific notice trap.
> ---
> > *     Get encoded version, traffic class and flow label in grh
> 5762,5764c6133,6138
> < AL_INLINE uint32_t AL_API
> < ib_notice_get_vend_id(
> <       IN              const   ib_mad_notice_attr_t* const     p_notice_attr )
> ---
> > static inline void
> > ib_grh_get_ver_class_flow(
> >       IN              const   ib_net32_t                                      ver_class_flow,
> >               OUT                     uint8_t* const                          p_ver,
> >               OUT                     uint8_t* const                          p_tclass,
> >               OUT                     uint32_t* const                         p_flow_lbl )
> 5766c6140,6153
> <       return ib_notice_get_prod_type( p_notice_attr );
> ---
> >       ib_net32_t tmp_ver_class_flow;
> >
> >       if (p_ver)
> >               *p_ver = (uint8_t)(ver_class_flow & 0x0f);
> >
> >       tmp_ver_class_flow = ver_class_flow >> 4;
> >
> >       if (p_tclass)
> >               *p_tclass = (uint8_t)(tmp_ver_class_flow & 0xff);
> >
> >       tmp_ver_class_flow = tmp_ver_class_flow >> 8;
> >
> >       if (p_flow_lbl)
> >               *p_flow_lbl = tmp_ver_class_flow & 0xfffff;
> 5770,5772c6157,6158
> < *     p_notice_attr
> < *             [in] Pointer to...
>
> [Message clipped]


More information about the ofw mailing list