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

Eitan Zahavi eitan at mellanox.co.il
Mon Jul 10 03:54:26 PDT 2006


> 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 the notice attribute structure whose
< *		vendor ID to return.
---
> *	ver_class_flow
> *		[in] the version, traffic class and flow label info.
5775c6161,6170
< *	Returns the vendor ID of the notice, in host byte order.
---
> *	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
> *
> * NOTES
5778c6173
< *	ib_mad_notice_attr_t, ib_notice_set_vend_id
---
> *	ib_grh_t
5781c6176
< /****f* IBA Base: Types/ib_notice_set_vend_id
---
> /****f* IBA Base: Types/ib_grh_set_ver_class_flow
5783c6178
< *	ib_notice_set_vend_id
---
> *	ib_grh_set_ver_class_flow
5786c6181
< *	Sets the vendor ID of a vendor specific notice trap.
---
> *	Set encoded version, traffic class and flow label in grh
5790,5793c6185,6189
< AL_INLINE void AL_API
< ib_notice_set_vend_id(
< 	IN	OUT			ib_mad_notice_attr_t* const	p_notice_attr,
< 	IN		const	uint32_t					vend_id )
---
> static inline ib_net32_t
> ib_grh_set_ver_class_flow(
> 	IN		const	uint8_t						ver,
> 	IN		const	uint8_t						tclass,
> 	IN		const	uint32_t					flow_lbl )
5795c6191,6198
< 	ib_notice_set_prod_type( p_notice_attr, vend_id );
---
> 	ib_net32_t		ver_class_flow;
> 
> 	ver_class_flow = flow_lbl;
> 	ver_class_flow = ver_class_flow << 8;
> 	ver_class_flow = ver_class_flow | tclass;
> 	ver_class_flow = ver_class_flow << 4;
> 	ver_class_flow = ver_class_flow | ver;
> 	return (ver_class_flow);
5799,5801c6202,6203
< *	p_notice_attr
< *		[in/out] Pointer to the notice attribute structure
< *		whose vendor ID to set.
---
> *	ver
> *		[in] the version info.
5803,5804c6205,6209
< *	vend_id
< *		[in] Vendor ID of notice trap.
---
> *	tclass
> *		[in] the traffic class info.
> *
> *	flow_lbl
> *		[in] the flow label info
5807c6212,6215
< *	This function does not return a value.
---
> *	ver_class_flow
> *		[out] the version, traffic class and flow label info.
> *
> * NOTES
5810c6218
< *	ib_mad_notice_attr_t, ib_notice_get_vend_id
---
> *	ib_grh_t
5813c6221
< /****f* IBA Base: Types/ib_notice_get_trap_num
---
> /****s* IBA Base: Types/ib_member_rec_t
5815c6223
< *	ib_notice_get_trap_num
---
> *	ib_member_rec_t
5818c6226,6227
< *	Retrieves the trap number from a generic notice trap.
---
> *	Multicast member record, used to create, join, and leave multicast
> *	groups.
5822,5824c6231,6232
< AL_INLINE uint16_t AL_API
< ib_notice_get_trap_num(
< 	IN		const	ib_mad_notice_attr_t* const	p_notice_attr )
---
> #include <complib/cl_packon.h>
> typedef struct _ib_member_rec
5826,5827c6234,6250
< 	return cl_ntoh16( p_notice_attr->combo2 );
< }
---
> 	ib_gid_t				mgid;
> 	ib_gid_t				port_gid;
> 	ib_net32_t				qkey;
> 	ib_net16_t				mlid;
> 	uint8_t					mtu;
> 	uint8_t					tclass;
> 	ib_net16_t				pkey;
> 	uint8_t					rate;
> 	uint8_t					pkt_life;
> 	ib_net32_t				sl_flow_hop;
> 	uint8_t					scope_state;
> 	uint8_t					proxy_join:1;
> 	uint8_t					reserved[2];
> 	uint8_t					pad[4];
> 
> }	PACK_SUFFIX ib_member_rec_t;
> #include <complib/cl_packoff.h>
5829,5832c6252,6254
< * PARAMETERS
< *	p_notice_attr
< *		[in] Pointer to the notice attribute structure whose
< *		trap number to return.
---
> * FIELDS
> *	mgid
> *		Multicast GID address for this multicast group.
5834,5835c6256,6257
< * RETURN VALUES
< *	Returns the vendor ID of the notice, in host byte order.
---
> *	port_gid
> *		Valid GID of the endpoint joining this multicast group.
5837,5843c6259,6260
< * SEE ALSO
< *	ib_mad_notice_attr_t, ib_notice_set_trap_num
< *********/
< 
< /****f* IBA Base: Types/ib_notice_set_trap_num
< * NAME
< *	ib_notice_set_trap_num
---
> *	qkey
> *		Q_Key to be sued by this multicast group.
5845,5846c6262,6263
< * DESCRIPTION
< *	Sets the trap number of a generic notice trap.
---
> *	mlid
> *		Multicast LID for this multicast group.
5848,5861c6265,6266
< * SYNOPSIS
< */
< AL_INLINE void AL_API
< ib_notice_set_trap_num(
< 	IN	OUT			ib_mad_notice_attr_t* const	p_notice_attr,
< 	IN		const	uint16_t					trap_num )
< {
< 	p_notice_attr->combo2 = cl_hton16( trap_num );
< }
< /*
< * PARAMETERS
< *	p_notice_attr
< *		[in/out] Pointer to the notice attribute structure
< *		whose trap number to set.
---
> *	mtu
> *		MTU and MTU selector fields to use on this path
5863,5864c6268,6269
< *	trap_num
< *		[in] Trap number to set.
---
> *	tclass
> *		Another global routing parameter.
5866,5867c6271,6272
< * RETURN VALUES
< *	This function does not return a value.
---
> *	pkey
> *		Partition key (P_Key) to use for this member.
5869,5875c6274,6275
< * SEE ALSO
< *	ib_mad_notice_attr_t, ib_notice_get_trap_num
< *********/
< 
< /****f* IBA Base: Types/ib_notice_get_dev_id
< * NAME
< *	ib_notice_get_dev_id
---
> *	rate
> *		Rate and rate selector fields to use on this path.
5877,5878c6277,6278
< * DESCRIPTION
< *	Retrieves the device ID from a vendor specific notice trap.
---
> *	pkt_life
> *		Packet lifetime
5880,5892c6280,6281
< * SYNOPSIS
< */
< AL_INLINE uint16_t AL_API
< ib_notice_get_dev_id(
< 	IN		const	ib_mad_notice_attr_t* const	p_notice_attr )
< {
< 	return ib_notice_get_trap_num( p_notice_attr );
< }
< /*
< * PARAMETERS
< *	p_notice_attr
< *		[in] Pointer to the notice attribute structure whose
< *		device ID to return.
---
> *	sl_flow_hop
> *		Global routing parameters: service level, hop count, and flow label.
5894,5895c6283,6287
< * RETURN VALUES
< *	Returns the vendor ID of the notice, in host byte order.
---
> *	scope_state
> *		MGID scope and JoinState of multicast request.
> *
> *	proxy_join
> *		Enables others in the Partition to proxy add/remove from the group
5898d6289
< *	ib_mad_notice_attr_t, ib_notice_set_dev_id
5901c6292
< /****f* IBA Base: Types/ib_notice_set_dev_id
---
> /****f* IBA Base: Types/ib_member_get_sl_flow_hop
5903c6294
< *	ib_notice_set_dev_id
---
> *	ib_member_get_sl_flow_hop
5906c6297
< *	Sets the producer type of a vendor specific notice trap.
---
> *	Get encoded sl, flow label, and hop limit
5910,5913c6301,6306
< AL_INLINE void AL_API
< ib_notice_set_dev_id(
< 	IN	OUT			ib_mad_notice_attr_t* const	p_notice_attr,
< 	IN		const	uint16_t					dev_id )
---
> static inline void
> ib_member_get_sl_flow_hop(
> 	IN const ib_net32_t sl_flow_hop,
> 	OUT uint8_t* const p_sl,
> 	OUT uint32_t* const p_flow_lbl,
> 	OUT uint8_t* const p_hop )
5915c6308,6320
< 	ib_notice_set_trap_num( p_notice_attr, dev_id );
---
> 	uint32_t tmp;
> 
> 	tmp = cl_ntoh32(sl_flow_hop);
> 	if (p_hop)
> 		*p_hop = (uint8_t)tmp;
> 	tmp >>= 8;
> 
> 	if (p_flow_lbl)
> 		*p_flow_lbl = (uint32_t)(tmp & 0xfffff);
> 	tmp >>= 20;
> 
> 	if (p_sl)
> 		*p_sl = (uint8_t)tmp;
5919,5924c6324,6325
< *	p_notice_attr
< *		[in/out] Pointer to the notice attribute structure
< *		whose device ID to set.
< *
< *	dev_id
< *		[in] Device ID of notice trap.
---
> *	sl_flow_hop
> *		[in] the sl, flow label, and hop limit of MC Group
5927c6328,6337
< *	This function does not return a value.
---
> *	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
5930c6340
< *	ib_mad_notice_attr_t, ib_notice_get_dev_id
---
> *	ib_member_rec_t
5933c6343
< /****f* IBA Base: Types/ib_notice_get_toggle
---
> /****f* IBA Base: Types/ib_member_set_sl_flow_hop
5935c6345
< *	ib_notice_get_toggle
---
> *	ib_member_set_sl_flow_hop
5938c6348
< *	Retrieves the notice toggle bit from a notice trap.
---
> *	Set encoded sl, flow label, and hop limit
5942,5944c6352,6356
< AL_INLINE boolean_t AL_API
< ib_notice_get_toggle(
< 	IN		const	ib_mad_notice_attr_t* const	p_notice_attr )
---
> static inline ib_net32_t
> ib_member_set_sl_flow_hop(
> 	IN const uint8_t sl,
> 	IN const uint32_t flow_label,
> 	IN const uint8_t hop_limit )
5946c6358,6361
< 	return (cl_ntoh16( p_notice_attr->combo3 ) & 0x0001);
---
> 	uint32_t tmp;
> 
> 	tmp = (sl << 28) | ((flow_label & 0xfffff) << 8) | hop_limit;
> 	return cl_hton32(tmp);
5950,5952c6365,6372
< *	p_notice_attr
< *		[in] Pointer to the notice attribute structure whose
< *		notice toggle bit value to return.
---
> *	sl
> *		[in] the service level.
> *
> *	flow_lbl
> *		[in] the flow label info
> *
> *	hop_limit
> *		[in] the hop limit.
5955c6375,6376
< *	Returns TRUE if the notice toggle bit of the notice is set.
---
> *	sl_flow_hop
> *		[out] the sl, flow label, and hop limit
5957c6378
< *	Returns FALSE otherwise.
---
> * NOTES
5960c6381
< *	ib_mad_notice_attr_t, ib_notice_set_toggle
---
> *	ib_member_rec_t
5963c6384
< /****f* IBA Base: Types/ib_notice_set_toggle
---
> /****f* IBA Base: Types/ib_member_get_scope_state
5965c6386
< *	ib_notice_set_toggle
---
> *	ib_member_get_scope_state
5968c6389
< *	Sets the notice toggle bit of a notice trap.
---
> *	Get encoded MGID scope and JoinState
5972,5975c6393,6397
< AL_INLINE void AL_API
< ib_notice_set_toggle(
< 	IN	OUT			ib_mad_notice_attr_t* const	p_notice_attr,
< 	IN		const	boolean_t					toggle_val )
---
> static inline void
> ib_member_get_scope_state(
> 	IN		const	uint8_t						scope_state,
> 		OUT			uint8_t* const				p_scope,
> 		OUT			uint8_t* const				p_state )
5977,5983c6399,6408
< 	uint16_t	val;
< 	val = cl_ntoh16( p_notice_attr->combo3 );
< 	if( toggle_val )
< 		val |= 0x0001;
< 	else
< 		val &= 0xFFFE;
< 	p_notice_attr->combo3 = cl_hton16( val );
---
> 	uint8_t		tmp_scope_state;
> 
> 	if (p_state)
> 		*p_state = (uint8_t)(scope_state & 0x0f);
> 
> 	tmp_scope_state = scope_state >> 4;
> 
> 	if (p_scope)
> 		*p_scope = (uint8_t)(tmp_scope_state & 0x0f);
> 
5987,5993c6412,6413
< *	p_notice_attr
< *		[in/out] Pointer to the notice attribute structure
< *		whose notice toggle bit to set or clear.
< *
< *	toggle_val
< *		[in] Boolean value indicating whether the toggle bit of the notice
< *		should be set or cleared.
---
> *	scope_state
> *		[in] the scope and state
5996c6416,6422
< *	This function does not return a value.
---
> *	p_scope
> *		[out] pointer to the MGID scope
> *
> *	p_state
> *		[out] pointer to the join state
> *
> * NOTES
5999c6425
< *	ib_mad_notice_attr_t, ib_notice_get_toggle
---
> *	ib_member_rec_t
6002c6428
< /****f* IBA Base: Types/ib_notice_get_count
---
> /****f* IBA Base: Types/ib_member_set_scope_state
6004c6430
< *	ib_notice_get_count
---
> *	ib_member_set_scope_state
6007c6433
< *	Retrieves the notice toggle count from a notice trap.
---
> *	Set encoded version, MGID scope and JoinState
6011,6013c6437,6440
< AL_INLINE boolean_t AL_API
< ib_notice_get_count(
< 	IN		const	ib_mad_notice_attr_t* const	p_notice_attr )
---
> static inline uint8_t
> ib_member_set_scope_state(
> 	IN		const	uint8_t						scope,
> 	IN		const	uint8_t						state )
6015c6442,6447
< 	return ((cl_ntoh16( p_notice_attr->combo3 ) & 0xFFFE) >> 1);
---
> 	uint8_t		scope_state;
> 
> 	scope_state = scope;
> 	scope_state = scope_state << 4;
> 	scope_state = scope_state | state;
> 	return (scope_state);
6019,6021c6451,6455
< *	p_notice_attr
< *		[in] Pointer to the notice attribute structure whose
< *		notice toggle count to return.
---
> *	scope
> *		[in] the MGID scope
> *
> *	state
> *		[in] the JoinState
6024c6458,6461
< *	Returns the notice toggle count of the notice.
---
> *	scope_state
> *		[out] the encoded one
> *
> * NOTES
6027c6464
< *	ib_mad_notice_attr_t, ib_notice_set_count
---
> *	ib_member_rec_t
6030c6467
< /****f* IBA Base: Types/ib_notice_set_count
---
> /****f* IBA Base: Types/ib_member_set_join_state
6032c6469
< *	ib_notice_set_count
---
> *	ib_member_set_join_state
6035c6472
< *	Sets the toggle count of a notice trap.
---
> *	Set JoinState
6039,6042c6476,6479
< AL_INLINE void AL_API
< ib_notice_set_count(
< 	IN	OUT			ib_mad_notice_attr_t* const	p_notice_attr,
< 	IN		const	uint16_t					toggle_cnt )
---
> static inline void
> ib_member_set_join_state(
> 	IN	OUT			ib_member_rec_t				*p_mc_rec,
> 	IN		const	uint8_t						state )
6044,6048c6481,6482
< 	uint16_t	val;
< 	val = cl_ntoh16( p_notice_attr->combo3 );
< 	val &= 0x0001;
< 	val |= (toggle_cnt << 1);
< 	p_notice_attr->combo3 = cl_hton16( val );
---
>    /* keep the scope as it is */
> 	p_mc_rec->scope_state = (p_mc_rec->scope_state & 0xF0) | (0x0f & state);
6052,6054c6486,6487
< *	p_notice_attr
< *		[in/out] Pointer to the notice attribute structure
< *		whose device ID to set.
---
> *	p_mc_rec
> *		[in] pointer to the member record
6056,6057c6489,6490
< *	toggle_cnt
< *		[in] Toggle count value of the notice.
---
> *	state
> *		[in] the JoinState
6060c6493,6495
< *	This function does not return a value.
---
> *	NONE
> *
> * NOTES
6063c6498
< *	ib_mad_notice_attr_t, ib_notice_get_count
---
> *	ib_member_rec_t
6065a6501,6518
> /*
>  * Join State Codes:
>  */
> #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
> 
> /*
>  *	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
> 
> 
6067c6520
< typedef struct _ib_inform_info
---
> typedef struct _ib_mad_notice_attr    // Total Size calc  Accumulated
6069c6522
< 	ib_gid_t				gid;
---
>   uint8_t				generic_type;    // 1                1
6071,6078c6524,6531
< 	ib_net16_t				lid_range_begin;
< 	ib_net16_t				lid_range_end;
< 	// EZ: not v1.1 ib_net16_t				pkey;
< 	ib_net16_t				reserved;
< 	uint8_t					is_generic;
< 	uint8_t					subscribe;
< 	// EZ: not v1.1 ib_net16_t				class_range;
< 	ib_net16_t				trap_type;
---
>   union _notice_g_or_v
>   {
> 	 struct _notice_generic            // 5                6
> 	 {
> 		uint8_t		prod_type_msb;
> 		ib_net16_t	prod_type_lsb;
> 		ib_net16_t	trap_num;
> 	 }	PACK_SUFFIX generic;
6080,6085c6533,6539
< 	/* trap num or dev_id */
< 	ib_net16_t				combo1;
< 	/* QPN:24, resv:3, resp_time_val:5 */
< 	ib_net32_t				combo2;
< 	/* resv:8, producer type or vendor id:24 */
< 	ib_net32_t				combo3;
---
> 	 struct _notice_vend
> 	 {
> 		uint8_t		vend_id_msb;
> 		ib_net16_t	vend_id_lsb;
> 		ib_net16_t	dev_id;
> 	 }	PACK_SUFFIX vend;
>   } g_or_v;
6087,6088c6541,6565
< }	PACK_SUFFIX ib_inform_info_t;
< #include <complib/cl_packoff.h>
---
>   ib_net16_t			issuer_lid;    // 2                 8
>   ib_net16_t			toggle_count;  // 2                 10
>   
>   union _data_details               // 54                64
> 	{
> 	  struct _raw_data
> 	  {
> 		 uint8_t	details[54];
> 	  } PACK_SUFFIX raw_data;
> 
> 	  struct _ntc_64_67
> 	  {
> 		 uint8_t    res[6];
> 		 ib_gid_t   gid;	// the Node or Multicast Group that came in/out
> 	  } PACK_SUFFIX ntc_64_67;
> 
> 	  struct _ntc_128 {
> 		 ib_net16_t sw_lid; // the sw lid of which link state changed
> 	  } PACK_SUFFIX ntc_128;
> 	  
> 	  struct _ntc_129_131 {
> 		 ib_net16_t    pad;
> 		 ib_net16_t    lid;		// lid and port number of the violation
> 		 uint8_t     port_num;
> 	  } PACK_SUFFIX ntc_129_131;
6089a6567,6629
> 	  struct _ntc_144 {
> 		 ib_net16_t    pad1;
> 		 ib_net16_t    lid;		// lid where capability mask changed
> 		 ib_net16_t    pad2;
> 		 ib_net32_t    new_cap_mask; // new capability mask
> 	  } PACK_SUFFIX ntc_144;
> 
> 	  struct _ntc_145 {
> 		 ib_net16_t    pad1;
> 		 ib_net16_t    lid;		// lid where sys guid changed
> 		 ib_net16_t    pad2;
> 		 ib_net64_t    new_sys_guid; // new system image guid
> 	  } PACK_SUFFIX ntc_145;
> 
> 	  struct _ntc_256 {                       // total: 54
> 		 ib_net16_t    pad1;                   // 2
> 		 ib_net16_t    lid;                    // 2
> 		 ib_net16_t    pad2;                   // 2
> 		 uint8_t       method;                 // 1
> 		 uint8_t       pad3;                   // 1
> 		 ib_net16_t    attr_id;                // 2
> 		 ib_net32_t    attr_mod;               // 4
> 		 ib_net64_t    mkey;                   // 8
> 		 uint8_t       dr_slid;                // 1
> 		 uint8_t       dr_trunc_hop;           // 1
> 		 uint8_t       dr_rtn_path[30];        // 30
> 	  } PACK_SUFFIX ntc_256;
> 
> 	  struct _ntc_257_258 // violation of p/q_key // 49
> 	  {
> 		 ib_net16_t    pad1;                   // 2
> 		 ib_net16_t    lid1;                   // 2
> 		 ib_net16_t    lid2;                   // 2
> 		 ib_net32_t    key;                    // 2
> 		 uint8_t       sl;                     // 1
> 		 ib_net32_t    qp1;                    // 4
> 		 ib_net32_t    qp2;                    // 4
> 		 ib_gid_t      gid1;                   // 16
> 		 ib_gid_t      gid2;                   // 16
> 	  } PACK_SUFFIX ntc_257_258;
> 
> 	  struct _ntc_259 // p/q_key violation with sw info 53
> 	  {
> 		 ib_net16_t    data_valid;   // 2
> 		 ib_net16_t    lid1;         // 2
> 		 ib_net16_t    lid2;         // 2
> 		 ib_net32_t    key;          // 4
> 		 uint8_t       sl;           // 1
> 		 ib_net32_t    qp1;          // 4
> 		 uint8_t       qp2_msb;      // 1
> 		 ib_net16_t    qp2_lsb;      // 2
> 		 ib_gid_t      gid1;         // 16
> 		 ib_gid_t      gid2;         // 16
> 		 ib_net16_t    sw_lid;       // 2
> 		 uint8_t       port_no;      // 1
> 	  } PACK_SUFFIX ntc_259;
> 
> 	} data_details;
> 
>   ib_gid_t			issuer_gid;    // 16          80
> 
> }	PACK_SUFFIX ib_mad_notice_attr_t;
> #include <complib/cl_packoff.h>
6091c6631
< /****f* IBA Base: Types/ib_inform_get_trap_num
---
> /****f* IBA Base: Types/ib_notice_is_generic
6093c6633
< *	ib_inform_get_trap_num
---
> *	ib_notice_is_generic
6096c6636
< *	Retrieves the trap number from an inform info structure.
---
> *	Check if the notice is generic
6100,6102c6640,6642
< AL_INLINE uint16_t AL_API
< ib_inform_get_trap_num(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
---
> static inline boolean_t
> ib_notice_is_generic(
>   IN		   const	ib_mad_notice_attr_t *p_ntc)
6104c6644
< 	return cl_ntoh16( p_inform_info->combo1 );
---
>   return (p_ntc->generic_type & 0x80);
6108,6110c6648,6649
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		trap number to return.
---
> *	p_ntc
> *		[in] Pointer to  the notice MAD attribute
6113c6652
< *	Returns the trap number of the infrom info, in host byte order.
---
> *	TRUE if mad is generic
6116c6655
< *	ib_inform_info_t, ib_inform_set_trap_num
---
> *	ib_mad_notice_attr_t
6119c6658
< /****f* IBA Base: Types/ib_inform_set_trap_num
---
> /****f* IBA Base: Types/ib_notice_get_type
6121c6660
< *	ib_inform_set_trap_num
---
> *	ib_notice_get_type
6124c6663
< *	Sets the trap number of an inform info structure.
---
> *	Get the notice type
6128,6131c6667,6669
< AL_INLINE void AL_API
< ib_inform_set_trap_num(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	uint16_t					trap_num )
---
> static inline uint8_t
> ib_notice_get_type(
>   IN		   const	ib_mad_notice_attr_t *p_ntc)
6133c6671
< 	p_inform_info->combo1 = cl_hton16( trap_num );
---
>   return p_ntc->generic_type & 0x7f;
6137,6142c6675,6676
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose trap number to set.
< *
< *	trap_num
< *		[in] Trap number to set.
---
> *	p_ntc
> *		[in] Pointer to  the notice MAD attribute
6145c6679
< *	This function does not return a value.
---
> *	TRUE if mad is generic
6148c6682
< *	ib_inform_info_t, ib_inform_get_trap_num
---
> *	ib_mad_notice_attr_t
6151c6685
< /****f* IBA Base: Types/ib_inform_get_dev_id
---
> /****f* IBA Base: Types/ib_notice_get_prod_type
6153c6687
< *	ib_inform_get_dev_id
---
> *	ib_notice_get_prod_type
6156c6690
< *	Retrieves the device ID from a vendor specific inform trap.
---
> *	Get the notice Producer Type of Generic Notice
6160,6162c6694,6696
< AL_INLINE uint16_t AL_API
< ib_inform_get_dev_id(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
---
> static inline ib_net32_t
> ib_notice_get_prod_type(
>   IN		   const	ib_mad_notice_attr_t *p_ntc)
6164c6698,6701
< 	return ib_inform_get_trap_num( p_inform_info );
---
>   uint32_t pt;
>   pt = cl_ntoh16(p_ntc->g_or_v.generic.prod_type_lsb) |
>     (p_ntc->g_or_v.generic.prod_type_msb << 16);
>   return cl_hton32(pt);
6168,6170c6705,6706
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		device ID to return.
---
> *	p_ntc
> *		[in] Pointer to the notice MAD attribute
6173c6709
< *	Returns the vendor ID of the inform info, in host byte order.
---
> *	The producer type
6176c6712
< *	ib_inform_info_t, ib_inform_set_dev_id
---
> *	ib_mad_notice_attr_t
6179c6715
< /****f* IBA Base: Types/ib_inform_set_dev_id
---
> /****f* IBA Base: Types/ib_notice_set_prod_type
6181c6717
< *	ib_inform_set_dev_id
---
> *	ib_notice_set_prod_type
6184c6720
< *	Sets the producer type of a vendor specific inform trap.
---
> *	Set the notice Producer Type of Generic Notice
6188,6191c6724,6727
< AL_INLINE void AL_API
< ib_inform_set_dev_id(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	uint16_t					dev_id )
---
> static inline void
> ib_notice_set_prod_type(
>   IN ib_mad_notice_attr_t *p_ntc,
>   IN ib_net32_t prod_type_val)
6193c6729,6731
< 	ib_inform_set_trap_num( p_inform_info, dev_id );
---
>   uint32_t ptv = cl_ntoh32(prod_type_val);
>   p_ntc->g_or_v.generic.prod_type_lsb = cl_hton16((uint16_t)(ptv & 0x0000ffff));
>   p_ntc->g_or_v.generic.prod_type_msb = (uint8_t)( (ptv & 0x00ff0000) >> 16);
6197,6199c6735,6736
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose device ID to set.
---
> *	p_ntc
> *		[in] Pointer to the notice MAD attribute
6201,6202c6738,6739
< *	dev_id
< *		[in] Device ID of inform trap.
---
> *  prod_type
> *     [in] The producer Type code
6205c6742
< *	This function does not return a value.
---
> *	None
6208c6745
< *	ib_inform_info_t, ib_inform_get_dev_id
---
> *	ib_mad_notice_attr_t
6211c6748
< /****f* IBA Base: Types/ib_inform_get_qpn
---
> /****f* IBA Base: Types/ib_notice_get_vend_id
6213c6750
< *	ib_inform_get_qpn
---
> *	ib_notice_get_vend_id
6216c6753
< *	Retrieves the QPN from an inform info structure.
---
> *	Get the Vendor Id of Vendor type Notice
6220,6222c6757,6759
< AL_INLINE net32_t AL_API
< ib_inform_get_qpn(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
---
> static inline ib_net32_t
> ib_notice_get_vend_id(
>   IN		   const	ib_mad_notice_attr_t *p_ntc)
6224c6761,6764
< 	return (p_inform_info->combo2 & CL_NTOH32( 0x00FFFFFF ));
---
>   uint32_t vi;
>   vi = cl_ntoh16(p_ntc->g_or_v.vend.vend_id_lsb) |
>     (p_ntc->g_or_v.vend.vend_id_msb << 16);
>   return cl_hton32(vi);
6228,6230c6768,6769
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		QPN to return.
---
> *	p_ntc
> *		[in] Pointer to  the notice MAD attribute
6233c6772
< *	Returns the QPN of the infrom info.
---
> *	The Vendor Id of Vendor type Notice
6236c6775
< *	ib_inform_info_t, ib_inform_set_qpn
---
> *	ib_mad_notice_attr_t
6239c6778
< /****f* IBA Base: Types/ib_inform_set_qpn
---
> /****f* IBA Base: Types/ib_notice_set_vend_id
6241c6780
< *	ib_inform_set_qpn
---
> *	ib_notice_set_vend_id
6244c6783
< *	Sets the QPN of an inform info structure.
---
> *	Set the notice Producer Type of Generic Notice
6248,6251c6787,6790
< AL_INLINE void AL_API
< ib_inform_set_qpn(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	net32_t						qpn )
---
> static inline void
> ib_notice_set_vend_id(
>   IN ib_mad_notice_attr_t *p_ntc,
>   IN ib_net32_t vend_id)
6253,6254c6792,6794
< 	p_inform_info->combo2 &= CL_NTOH32( 0xFF000000 );
< 	p_inform_info->combo2 |= (qpn & CL_NTOH32( 0x00FFFFFF ));
---
>   uint32_t vi = cl_ntoh32(vend_id);
>   p_ntc->g_or_v.vend.vend_id_lsb = cl_hton16((uint16_t)(vi & 0x0000ffff));
>   p_ntc->g_or_v.vend.vend_id_msb = (uint8_t)((vi & 0x00ff0000) >> 16);
6258,6260c6798,6799
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose QPN to set.
---
> *	p_ntc
> *		[in] Pointer to the notice MAD attribute
6262,6263c6801,6802
< *	qpn
< *		[in] QPN of the inform info.
---
> *  vend_id
> *     [in] The producer Type code
6266c6805
< *	This function does not return a value.
---
> *	None
6269c6808
< *	ib_inform_info_t, ib_inform_get_qpn
---
> *	ib_mad_notice_attr_t
6272,6283c6811,6812
< /****f* IBA Base: Types/ib_inform_get_resp_time_val
< * NAME
< *	ib_inform_get_resp_time_val
< *
< * DESCRIPTION
< *	Retrieves the response time value from an inform info structure.
< *
< * SYNOPSIS
< */
< AL_INLINE uint8_t AL_API
< ib_inform_get_resp_time_val(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
---
> #include <complib/cl_packon.h>
> typedef struct _ib_inform_info
6285,6298c6814,6839
< 	return (uint8_t)(cl_ntoh32( p_inform_info->combo2 ) >> 27);
< }
< /*
< * PARAMETERS
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		response time value to return.
< *
< * RETURN VALUES
< *	Returns the response time value of the infrom info.
< *
< * SEE ALSO
< *	ib_inform_info_t, ib_inform_set_resp_time_val
< *********/
---
>   ib_gid_t				   gid;
>   ib_net16_t				lid_range_begin;
>   ib_net16_t				lid_range_end;
>   ib_net16_t				reserved1;
>   uint8_t					is_generic;
>   uint8_t					subscribe;
>   ib_net16_t				trap_type;
>   union _inform_g_or_v
>   {
> 	 struct _inform_generic
> 	 {
> 		ib_net16_t		trap_num;
> 		ib_net32_t		qpn_resp_time_val;
>       uint8_t        reserved2;
> 		uint8_t			node_type_msb;
> 		ib_net16_t		node_type_lsb;
> 	 } PACK_SUFFIX generic;
> 	 
> 	 struct _inform_vend
> 	 {
> 		ib_net16_t		dev_id;
> 		ib_net32_t		qpn_resp_time_val;
>       uint8_t        reserved2;
> 		uint8_t			vendor_id_msb;
> 		ib_net16_t		vendor_id_lsb;
> 	 } PACK_SUFFIX vend;
6300c6841,6846
< /****f* IBA Base: Types/ib_inform_set_resp_time_val
---
>   }	PACK_SUFFIX g_or_v;
>   
> }	PACK_SUFFIX ib_inform_info_t;
> #include <complib/cl_packoff.h>
> 
> /****f* IBA Base: Types/ib_inform_info_get_qpn_resp_time
6302c6848
< *	ib_inform_set_resp_time_val
---
> *	ib_inform_info_get_qpn_resp_time
6305c6851
< *	Sets the response time value of an inform info structure.
---
> *	Get QPN of the inform info
6309,6312c6855,6859
< AL_INLINE void AL_API
< ib_inform_set_resp_time_val(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	uint8_t						resp_time_val )
---
> static inline void
> ib_inform_info_get_qpn_resp_time(
>   IN		   const	ib_net32_t			qpn_resp_time_val,
>   OUT			ib_net32_t* const			p_qpn,
>   OUT			uint8_t* const				p_resp_time_val )
6314c6861
< 	uint32_t	val;
---
>   uint32_t tmp = cl_ntoh32(qpn_resp_time_val);
6316,6319c6863,6867
< 	val = cl_ntoh32( p_inform_info->combo2 );
< 	val &= 0x07FFFFFF;
< 	val |= (resp_time_val << 27);
< 	p_inform_info->combo2 = cl_hton32( val );
---
>   if (p_qpn)
>     *p_qpn = cl_hton32((tmp & 0xffffff00) >> 8);
> 	
> 	if (p_resp_time_val)
> 		*p_resp_time_val = (uint8_t)(tmp & 0x0000001f);
6323,6328c6871,6872
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose response time value to set.
< *
< *	resp_time_val
< *		[in] Response time value of the inform info.
---
> *	qpn_resp_time_val
> *		[in] the  qpn and resp time val from the mad
6331,6339c6875,6876
< *	This function does not return a value.
< *
< * SEE ALSO
< *	ib_inform_info_t, ib_inform_get_resp_time_val
< *********/
< 
< /****f* IBA Base: Types/ib_inform_get_prod_type
< * NAME
< *	ib_inform_get_prod_type
---
> *	p_qpn
> *		[out] pointer to the qpn
6341,6356c6878,6879
< * DESCRIPTION
< *	Retrieves the producer type from an inform info structure.
< *
< * SYNOPSIS
< */
< AL_INLINE uint32_t AL_API
< ib_inform_get_prod_type(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
< {
< 	return (cl_ntoh32( p_inform_info->combo3 ) >> 8);
< }
< /*
< * PARAMETERS
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		prducer type to return.
---
> *	p_state
> *		[out] pointer to the resp time val
6358,6359c6881
< * RETURN VALUES
< *	Returns the producer type of the infrom info, in host byte order.
---
> * NOTES
6362c6884
< *	ib_inform_info_t, ib_inform_set_prod_type
---
> *	ib_inform_info_t
6365c6887
< /****f* IBA Base: Types/ib_inform_set_prod_type
---
> /****f* IBA Base: Types/ib_inform_info_set_qpn
6367c6889
< *	ib_inform_set_prod_type
---
> *	ib_inform_info_set_qpn
6370c6892
< *	Sets the producer type of an inform info structure.
---
> *	Set the QPN of the inform info
6374,6377c6896,6899
< AL_INLINE void AL_API
< ib_inform_set_prod_type(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	uint32_t					prod_type )
---
> static inline void
> ib_inform_info_set_qpn(
>   IN	ib_inform_info_t 	*p_ii,
>   IN	ib_net32_t const	qpn)
6379c6901,6906
< 	p_inform_info->combo3 = cl_hton32( prod_type << 8 );
---
>   uint32_t tmp = cl_ntoh32(p_ii->g_or_v.generic.qpn_resp_time_val);
>   p_ii->g_or_v.generic.qpn_resp_time_val = 
>     cl_hton32(
>       (tmp & 0x000000ff) |
>       ((cl_ntoh32(qpn) << 8) & 0xffffff00)
>       );
6383,6388d6909
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose producer type to set.
< *
< *	prod_type
< *		[in] Producer type of inform trap.
6390,6391c6911
< * RETURN VALUES
< *	This function does not return a value.
---
> * NOTES
6394c6914
< *	ib_inform_info_t, ib_inform_get_prod_type
---
> *	ib_inform_info_t
6397c6917
< /****f* IBA Base: Types/ib_inform_get_vend_id
---
> /****f* IBA Base: Types/ib_inform_info_get_node_type
6399c6919
< *	ib_inform_get_vend_id
---
> *	ib_inform_info_get_node_type
6402c6922
< *	Retrieves the vendor ID from an inform info structure.
---
> *	Get Node Type of the Inform Info
6406,6408c6926,6928
< AL_INLINE uint32_t AL_API
< ib_inform_get_vend_id(
< 	IN		const	ib_inform_info_t* const		p_inform_info )
---
> static inline ib_net32_t
> ib_inform_info_get_node_type(
>   IN		   const	ib_inform_info_t  *p_inf)
6410c6930,6933
< 	return ib_inform_get_prod_type( p_inform_info );
---
>   uint32_t nt;
>   nt = cl_ntoh16(p_inf->g_or_v.generic.node_type_lsb) |
>     (p_inf->g_or_v.generic.node_type_msb << 16);
>   return cl_hton32(nt);
6414,6416c6937,6938
< *	p_inform_info
< *		[in] Pointer to the inform info structure whose
< *		vendor ID to return.
---
> *	p_inf
> *		[in] pointer to an inform info
6419c6941,6943
< *	Returns the vendor ID of the infrom info, in host byte order.
---
> *     The node type
> *
> * NOTES
6422c6946
< *	ib_inform_info_t, ib_inform_set_vend_id
---
> *	ib_inform_info_t
6425c6949
< /****f* IBA Base: Types/ib_inform_set_vend_id
---
> /****f* IBA Base: Types/ib_inform_info_get_vend_id
6427c6951
< *	ib_inform_set_vend_id
---
> *	ib_inform_info_get_vend_id
6430c6954
< *	Sets the vendor ID of an inform info structure.
---
> *	Get Node Type of the Inform Info
6434,6437c6958,6960
< AL_INLINE void AL_API
< ib_inform_set_vend_id(
< 	IN	OUT			ib_inform_info_t* const		p_inform_info,
< 	IN		const	uint32_t					vend_id )
---
> static inline ib_net32_t
> ib_inform_info_get_vend_id(
>   IN	const	ib_inform_info_t  *p_inf)
6439c6962,6965
< 	ib_inform_set_prod_type( p_inform_info, vend_id );
---
>   uint32_t vi;
>   vi = cl_ntoh16(p_inf->g_or_v.vend.vendor_id_lsb) |
>     (p_inf->g_or_v.vend.vendor_id_msb << 16);
>   return cl_hton32(vi);
6443,6448c6969,6970
< *	p_inform_info
< *		[in/out] Pointer to the inform info structure
< *		whose vendor ID to set.
< *
< *	vend_id
< *		[in] Vendor ID of inform trap.
---
> *	p_inf
> *		[in] pointer to an inform info
6451c6973,6975
< *	This function does not return a value.
---
> *     The node type
> *
> * NOTES
6454c6978
< *	ib_mad_inform_info_t, ib_inform_get_vend_id
---
> *	ib_inform_info_t
6457d6980
< 
6471,6472c6994,6995
< 	net16_t					subscriber_enum;
< 	uint16_t				reserved[3];
---
> 	ib_net16_t			subscriber_enum;
> 	uint8_t 			reserved[6];
6477c7000
< /********/
---
> 
6504c7027
< 	ib_mad_t		hdr;
---
> 	ib_mad_t		header;
6514c7037
< *	hdr
---
> *	header
6545d7067
< #define IB_DM_MAX_CTRL			0xFF;
6586c7108
< AL_INLINE uint8_t AL_API
---
> static inline uint8_t
6615c7137
< AL_INLINE uint8_t AL_API
---
> static inline uint8_t
6644c7166
< AL_INLINE uint8_t AL_API
---
> static inline uint8_t
6649,6654c7171,7175
< 	if( !slot )
< 		return SLOT_DOES_NOT_EXIST;
< 	else if( slot-- & 0x01 )
< 		return (p_iou_info->controller_list[slot >> 1] >> 4);
< 	else
< 		return (p_iou_info->controller_list[slot >> 1] & 0x0F);
---
> 	if( slot >= IB_DM_CTRL_LIST_SIZE ) return SLOT_DOES_NOT_EXIST;
> 	else return (int8_t)
> 		( (slot%2) ?
> 			((p_iou_info->controller_list[slot/2] & 0xf0) >> 4 ):
> 			(p_iou_info->controller_list[slot/2] & 0x0f) );
6662c7183
< *		[in] 1-based slot number of the IOC slot to check.
---
> *		[in] Pointer to the IO Unit information structure.
6665,6666c7186
< *	Returns the encoded value for the desired slot.  Possible values are
< *	SLOT_DOES_NOT_EXIST, IOC_NOT_INSTALLED, and IOC_INSTALLED.
---
> *	OptionROM field of the IO Unit information.
6669d7188
< *	The input slot number is 1-based, not zero based.
6685c7204
< typedef __declspec(align(8)) struct _ib_ioc_profile
---
> typedef struct _ib_ioc_profile
6794c7313
< AL_INLINE uint32_t AL_API
---
> static inline uint32_t
6802c7321
< AL_INLINE void AL_API
---
> static inline void
6811,6826d7329
< AL_INLINE uint32_t AL_API
< ib_ioc_profile_get_subsys_vend_id(
< 	IN		const	ib_ioc_profile_t* const		p_ioc_profile )
< {
< 	return( cl_ntoh32(p_ioc_profile->subsys_vend_id) >> 8 );
< }
< 
< 
< AL_INLINE void AL_API
< ib_ioc_profile_set_subsys_vend_id(
< 	IN				ib_ioc_profile_t* const		p_ioc_profile,
< 	IN		const	uint32_t					subsys_vend_id )
< {
< 	p_ioc_profile->subsys_id = (cl_hton32(subsys_vend_id) << 8);
< }
< 
6886,6891c7389
< /****f* IBA Bases: Types/ib_dm_get_slot_lo_hi
< * DESCRIPTION
< *	Returns the IOC slot number, and the lower and upper bound of the
< *	service entries given the attribute modifier of ServiceEntries response.
< */
< AL_INLINE void AL_API
---
> static inline void
6894,6896c7392,7394
< 		OUT			uint8_t		*const	p_slot OPTIONAL,
< 		OUT			uint8_t		*const	p_lo OPTIONAL,
< 		OUT			uint8_t		*const	p_hi OPTIONAL )
---
> 		OUT			uint8_t		*const	p_slot,
> 		OUT			uint8_t		*const	p_lo,
> 		OUT			uint8_t		*const	p_hi )
6901c7399
< 		*p_slot = (uint8_t)( ( tmp_slot_lo_hi >> 16 ) );
---
> 		*p_slot = (uint8_t)( ( tmp_slot_lo_hi >> 16 ) & 0x0f );
6904c7402
< 		*p_hi	= (uint8_t)( ( tmp_slot_lo_hi >> 8 ) );
---
> 		*p_hi	= (uint8_t)( ( tmp_slot_lo_hi >> 8 ) & 0xff );
6907c7405
< 		*p_lo	= (uint8_t)( ( tmp_slot_lo_hi >> 0 ) );
---
> 		*p_lo	= (uint8_t)( ( tmp_slot_lo_hi >> 0 ) & 0xff );
6909,6924d7406
< /* SEE ALSO
< * ib_dm_set_slot_lo_hi
< ********/
< 
< /****f* IBA Bases: Types/ib_dm_set_slot_lo_hi
< * DESCRIPTION
< *	Joins the IOC slot number, and the lower and upper bound of the service 
< *	entries and returns it.
< */
< AL_INLINE net32_t AL_API
< ib_dm_set_slot_lo_hi(
< 	IN		const	uint8_t						slot,
< 	IN		const	uint8_t						lo,
< 	IN		const	uint8_t						hi )
< {
< 	uint32_t	tmp;
6926,6933d7407
< 	tmp = slot << 16;
< 	tmp |= hi << 8;
< 	tmp |= lo;
< 	return cl_hton32( tmp );
< }
< /* SEE ALSO
< * ib_dm_get_slot_lo_hi
< ********/
6936c7410
<  *	Information describing an I/O controller
---
>  *	IBA defined information describing an I/O controller
6938c7412
< #pragma warning(disable:4324)
---
> #include <complib/cl_packon.h>
6941,6948c7415,7420
< 	net64_t					chassis_guid;
< 	uint8_t					chassis_slot;
< 	net64_t					iou_guid;
< 	uint8_t					iou_slot;
< 	ib_ioc_profile_t		profile;
< 
< }	ib_ioc_info_t;
< #pragma warning(default:4324)
---
> 	ib_net64_t				module_guid;
> 	ib_net64_t				iou_guid;
> 	ib_ioc_profile_t		ioc_profile;
> 	ib_net64_t				access_key;
> 	uint16_t				initiators_conf;
> 	uint8_t					resv[38];
6949a7422,7423
> }	PACK_SUFFIX ib_ioc_info_t;
> #include <complib/cl_packoff.h>
6954a7429
> #define IB_MCLASS_CM_VER_1					1
6959,6969c7434,7456
< #define IB_REQ_PDATA_SIZE					92
< #define IB_MRA_PDATA_SIZE					222
< #define IB_REJ_PDATA_SIZE					148
< #define IB_REP_PDATA_SIZE					196
< #define IB_RTU_PDATA_SIZE					224
< #define IB_LAP_PDATA_SIZE					168
< #define IB_APR_PDATA_SIZE					148
< #define IB_DREQ_PDATA_SIZE					220
< #define IB_DREP_PDATA_SIZE					224
< #define IB_SIDR_REQ_PDATA_SIZE				216
< #define IB_SIDR_REP_PDATA_SIZE				136
---
> #define IB_REQ_PDATA_SIZE_VER2				92
> #define IB_MRA_PDATA_SIZE_VER2				222
> #define IB_REJ_PDATA_SIZE_VER2				148
> #define IB_REP_PDATA_SIZE_VER2				196
> #define IB_RTU_PDATA_SIZE_VER2				224
> #define IB_LAP_PDATA_SIZE_VER2				168
> #define IB_APR_PDATA_SIZE_VER2				148
> #define IB_DREQ_PDATA_SIZE_VER2				220
> #define IB_DREP_PDATA_SIZE_VER2				224
> #define IB_SIDR_REQ_PDATA_SIZE_VER2			216
> #define IB_SIDR_REP_PDATA_SIZE_VER2			136
> 
> #define IB_REQ_PDATA_SIZE_VER1				92
> #define IB_MRA_PDATA_SIZE_VER1				222
> #define IB_REJ_PDATA_SIZE_VER1				148
> #define IB_REP_PDATA_SIZE_VER1				204
> #define IB_RTU_PDATA_SIZE_VER1				224
> #define IB_LAP_PDATA_SIZE_VER1				168
> #define IB_APR_PDATA_SIZE_VER1				151
> #define IB_DREQ_PDATA_SIZE_VER1				220
> #define IB_DREP_PDATA_SIZE_VER1				224
> #define IB_SIDR_REQ_PDATA_SIZE_VER1			216
> #define IB_SIDR_REP_PDATA_SIZE_VER1			140
7022a7510,7511
> 
> #define IB_REJ_SERVICE_HANDOFF				CL_HTON16(65535)
7048c7537
< #define IB_AP_INVALID_QPN					6
---
> #define IB_AP_INVALID_QPN_EECN				6
7084c7573
< typedef uint8_t								ib_sidr_status_t;
---
> typedef uint16_t							ib_sidr_status_t;
7093,7186d7581
< /************/
< /****s* IBA Base: Types/ib_gmp_t
< * NAME
< *	ib_gmp_t
< *
< * DESCRIPTION
< *	IBA defined GMP MAD format. (16.1.1)
< *
< * SYNOPSIS
< */
< #define IB_GMP_DATA_SIZE 200
< 
< #include <complib/cl_packon.h>
< typedef struct _ib_gmp
< {
< 	uint8_t					base_ver;
< 	uint8_t					mgmt_class;
< 	uint8_t					class_ver;
< 	uint8_t					method;
< 	ib_net16_t				status;
< 	ib_net16_t				resv;
< 	ib_net64_t				trans_id;
< 	ib_net16_t				attr_id;
< 	ib_net16_t				resv1;
< 	ib_net32_t				attr_mod;
< 	uint8_t					resv2[40];
< 	uint8_t					data[IB_GMP_DATA_SIZE];
< 
< }	PACK_SUFFIX ib_gmp_t;
< #include <complib/cl_packoff.h>
< /**********/
< #define IB_GMP_MAD_HDR_SIZE (sizeof(ib_gmp_t) - IB_GMP_DATA_SIZE)
< 
< 
< 
< /************/
< /****s* IBA Base: Types/ib_port_counters_t
< * NAME
< *	ib_gmp_t
< *
< * DESCRIPTION
< *	IBA defined PortCounters MAD format. (16.1.3.5)
< *
< * SYNOPSIS
< */
< #include <complib/cl_packon.h>
< typedef struct _ib_port_counters
< {
< 	uint8_t			reserved0;
< 	uint8_t			port_select;
< 	ib_net16_t		counter_select;
< 	ib_net16_t		symbol_error_counter; 
< 	uint8_t			link_error_recovery_counter;
< 	uint8_t			link_down_counter; 
< 	ib_net16_t		port_rcv_errors; 
< 	ib_net16_t		port_rcv_remote_physical_errors;
< 	ib_net16_t		port_rcv_switch_relay_errors; 
< 	ib_net16_t		port_xmit_discard; 
< 	uint8_t			port_xmit_constraint_errors;
< 	uint8_t			port_rcv_constraint_errors;
< 	uint8_t			reserved1;
< 	/* uint4_t excessive_buffer_overrun_errors;
< 	uint4_t local_link_integrity_errors; */
< 	uint8_t			lli_errors_exc_buf_errors;
< 	ib_net16_t		reserved2; 
< 	ib_net16_t		vl15_dropped;
< 	ib_net32_t		port_xmit_data;
< 	ib_net32_t		port_rcv_data;
< 	ib_net32_t		port_xmit_pkts;
< 	ib_net32_t		port_rcv_pkts;
< 
< }	PACK_SUFFIX ib_port_counters_t;
< #include <complib/cl_packoff.h>
< 
< 
< #define IB_COUNTER_SYMBOL_ERROR					CL_NTOH16(1<<0)
< #define IB_COUNTER_LINK_RECOVERY_ERROR			CL_NTOH16(1<<1)
< #define IB_COUNTER_LINK_DOWN					CL_NTOH16(1<<2)
< #define IB_COUNTER_RCV_ERROR					CL_NTOH16(1<<3)
< #define IB_COUNTERT_RCV_RMT_PHY_ERROR			CL_NTOH16(1<<4)
< #define IB_COUNTER_RCV_SWITCH_RELAY_ERROR		CL_NTOH16(1<<5)
< #define IB_COUNTER_XMIT_DISCARD					CL_NTOH16(1<<6)
< #define IB_COUNTER_XMIT_CONSTRAIN				CL_NTOH16(1<<7)
< #define IB_COUNTER_RCV_CONSTRAIN				CL_NTOH16(1<<8)
< #define IB_COUNTER_LINK_INTEG_ERROR				CL_NTOH16(1<<9)
< #define IB_COUNTER_EXECE_BUF_ERROR				CL_NTOH16(1<<10)
< #define IB_COUNTER_VL15_DROP					CL_NTOH16(1<<11)
< #define IB_COUNTER_XMIT_DATA					CL_NTOH16(1<<12)
< #define IB_COUNTER_XMIT_PKT						CL_NTOH16(1<<13)
< #define IB_COUNTER_RCV_DATA						CL_NTOH16(1<<14)
< #define IB_COUNTER_RCV_PKT						CL_NTOH16(1<<15)
< #define IB_COUNTER_ALL							0xff
< 
< 
7192,7200c7587,7596
< typedef struct _ib_ca* __ptr64			ib_ca_handle_t;
< typedef struct _ib_pd* __ptr64			ib_pd_handle_t;
< typedef struct _ib_mr* __ptr64			ib_mr_handle_t;
< typedef struct _mlnx_fmr* __ptr64		mlnx_fmr_handle_t;
< typedef struct _ib_mw* __ptr64			ib_mw_handle_t;
< typedef struct _ib_qp* __ptr64			ib_qp_handle_t;
< typedef struct _ib_cq* __ptr64			ib_cq_handle_t;
< typedef struct _ib_av* __ptr64			ib_av_handle_t;
< typedef struct _ib_mcast* __ptr64		ib_mcast_handle_t;
---
> typedef struct _ib_ca			*ib_ca_handle_t;
> typedef struct _ib_pd			*ib_pd_handle_t;
> typedef struct _ib_rdd			*ib_rdd_handle_t;
> typedef struct _ib_mr			*ib_mr_handle_t;
> typedef struct _ib_mw			*ib_mw_handle_t;
> typedef struct _ib_qp			*ib_qp_handle_t;
> typedef struct _ib_eec			*ib_eec_handle_t;
> typedef struct _ib_cq			*ib_cq_handle_t;
> typedef struct _ib_av			*ib_av_handle_t;
> typedef struct _ib_mcast		*ib_mcast_handle_t;
7233a7630
> 	IB_INVALID_EEC_STATE,
7250a7648
> 	IB_INVALID_EEC_HANDLE,
7254d7651
< 	IB_INVALID_FMR_HANDLE,
7255a7653
> 	IB_INVALID_RDD_HANDLE,
7264a7663
> 	IB_EE_IN_TIMEWAIT,
7267,7269d7665
< 	IB_INVALID_INDEX,
< 	IB_NO_MATCH,
< 	IB_PENDING,
7275c7671
< 
---
> extern const char* ib_error_str[];
7286c7682
< AL_EXPORT const char* AL_API
---
> static inline const char*
7288c7684,7689
< 	IN				ib_api_status_t				status );
---
> 	IN				ib_api_status_t				status )
> {
> 	if( status > IB_UNKNOWN_ERROR )
> 		status = IB_UNKNOWN_ERROR;
> 	return( ib_error_str[status] );
> }
7323a7725,7727
> 	IB_AE_EEC_FATAL,
> 	IB_AE_EEC_COMM,
> 	IB_AE_EEC_APM,
7334a7739
> 	IB_AE_EEC_APM_ERROR,
7339d7743
< 	IB_AE_CLIENT_REREGISTER,
7346c7750
< *		An error occurred when accessing the send queue of the QP.
---
> *		An error occurred when accessing the send queue of the QP or EEC.
7355c7759
< *		An error occurred when accessing the receive queue of the QP.
---
> *		An error occurred when accessing the receive queue of the QP or EEC.
7372a7777,7791
> *	IB_AE_EEC_FATAL
> *		If reliable datagram service is supported, this event indicates that
> *		a catastrophic error occurred while accessing or processing the EEC
> *		that prevents reporting of completions.
> *
> *	IB_AE_EEC_COMM
> *		If reliable datagram service is supported, this event indicates that
> *		the first packet has arrived for the receive work queue where the
> *		EEC is still in the RTR state.
> *
> *	IB_AE_EEC_APM
> *		If reliable datagram service and alternate path migration is supported,
> *		this event indicates that the EEC connection has migrated to the
> *		alternate path.
> *
7414a7834,7838
> *	IB_AE_EEC_APM_ERROR
> *		If reliable datagram service and alternate path migration is supported,
> *		this event indicates that an incoming path migration request to this
> *		EEC was not accepted.
> *
7429,7431d7852
< *	IB_AE_CLIENT_REREGISTER
< *		The SM idicate to client to reregister its SA records.
< *
7438c7859
< 
---
> extern const char* ib_async_event_str[];
7449c7870
< AL_EXPORT const char* AL_API
---
> static inline const char*
7451c7872,7877
< 	IN				ib_async_event_t			event );
---
> 	IN				ib_async_event_t			event )
> {
> 	if( event > IB_AE_UNKNOWN )
> 		event = IB_AE_UNKNOWN;
> 	return( ib_async_event_str[event] );
> }
7485c7911
< 	void* __ptr64			context;
---
> 	void					*context;
7595,7599d8020
< 	boolean_t		ipd;
< 	boolean_t		pkey_switch_ext_port;
< 	boolean_t		bm;
< 	boolean_t		link_rtl;
< 	boolean_t		client_reregister;
7703,7704c8124,8125
< 	ib_gid_t* __ptr64		p_gid_table;
< 	ib_net16_t* __ptr64		p_pkey_table;
---
> 	ib_gid_t				*p_gid_table;
> 	ib_net16_t				*p_pkey_table;
7729d8149
< 	uint64_t				fw_ver;
7756a8177
> 	uint8_t					max_eec_resp_res;
7759a8181,8184
> 	uint8_t					max_eec_init_depth;
> 
> 	uint32_t				max_eecs;
> 	uint32_t				max_rdds;
7767,7768d8191
< 	uint32_t				max_fmr;
< 	uint32_t				max_map_per_fmr;
7798,7799c8221,8222
< 	uint32_t* __ptr64		p_page_size;
< 	ib_port_attr_t* __ptr64	p_port_attr;
---
> 	uint32_t				*p_page_size;
> 	ib_port_attr_t			*p_port_attr;
7816,7818d8238
< *	fw_ver
< *		Device Firmware version.
< *
7870,7871c8290,8292
< *		Maximum limit on number of responder resources for incomming RDMA
< *		operations on QPs.
---
> *	max_eec_resp_res
> *		Maximum limit on number of responder resources for incoming RDMA
> *		operations, on QPs and EEC's respectively.
7878c8299,8300
< *		Maximimum initiator depth per QP for initiating RDMA reads and
---
> *	max_eec_init_depth
> *		Maximimum initiator depth per QP or EEC for initiating RDMA reads and
7880a8303,8308
> *	max_eecs
> *		Maximimum number of EEC's supported by the HCA.
> *
> *	max_rdds
> *		Maximum number of Reliable datagram domains supported.
> *
7913c8341
< *		Indicates ability to change primary port for a QP during a
---
> *		Indicates ability to change primary port for a QP or EEC during a
7974c8402
< AL_EXPORT ib_ca_attr_t* AL_API
---
> ib_ca_attr_t*
7977,8014c8405
< 	IN		const	ib_ca_attr_t* const		p_src );
< /*
< * PARAMETERS
< *	p_dest
< *		Pointer to the buffer that is the destination of the copy.
< *
< *	p_src
< *		Pointer to the CA attributes to copy.
< *
< * RETURN VALUE
< *	Pointer to the copied CA attributes.
< *
< * NOTES
< *	The buffer pointed to by the p_dest parameter must be at least the size
< *	specified in the size field of the buffer pointed to by p_src.
< *
< * SEE ALSO
< *	ib_ca_attr_t, ib_dup_ca_attr, ib_free_ca_attr
< *****/
< 
< 
< /****d* Access Layer/ib_pd_type_t
< * NAME
< *	ib_pd_type_t
< *
< * DESCRIPTION
< *	Indicates the type of protection domain being allocated.
< *
< * SYNOPSIS
< */
< typedef enum _ib_pd_type
< {
< 	IB_PDT_NORMAL,
< 	IB_PDT_ALIAS,
< 	IB_PDT_SQP,
< 	IB_PDT_UD
< 
< }	ib_pd_type_t;
---
> 	IN		const	ib_ca_attr_t* const		p_src );
8016,8018c8407,8412
< * VALUES
< *	IB_PDT_NORMAL
< *		Protection domain for all non-aliased QPs.
---
> * PARAMETERS
> *	p_dest
> *		Pointer to the buffer that is the destination of the copy.
> *
> *	p_src
> *		Pointer to the CA attributes to copy.
8020,8021c8414,8415
< *	IB_PDT_ALIAS
< *		Protection domain for IB_QPT_QP0_ALIAS and IB_QPT_QP1_ALIAS QPs.
---
> * RETURN VALUE
> *	Pointer to the copied CA attributes.
8023,8024c8417,8419
< *	IB_PDT_SQP
< *		Protection domain for special queue pair usage.
---
> * NOTES
> *	The buffer pointed to by the p_dest parameter must be at least the size
> *	specified in the size field of the buffer pointed to by p_src.
8026,8027c8421,8422
< *	IB_PDT_UD
< *		Protection domain for UD queue pair usage.
---
> * SEE ALSO
> *	ib_ca_attr_t, ib_dup_ca_attr, ib_free_ca_attr
8081c8476,8477
< 	IB_QPT_UNRELIABLE_DGRM	= 3,		/* Purposefully skip RDD type. */
---
> 	IB_QPT_RELIABLE_DGRM	= 2,		/* Matches CM REQ transport type */
> 	IB_QPT_UNRELIABLE_DGRM,
8098a8495,8497
> *	IB_QPT_RELIABLE_DGRM
> *		Reliable, datagram queue pair.
> *
8211a8611,8612
> 	ib_rdd_handle_t			h_rdd;
> 
8227a8629,8633
> *	h_rdd
> *		A handle to a reliable datagram domain to associate with the queue
> *		pair.  This field is ignored if the queue pair is not a reliable
> *		datagram type queue pair.
> *
8291d8696
< 	uint32_t				sq_max_inline;
8300a8706
> 	ib_rdd_handle_t			h_rdd;
8322,8326c8728,8729
< *		This is a handle to a protection domain associated with the QP.
< *
< *	sq_max_inline
< *		Maximum payload that can be inlined directly in a WQE, eliminating
< *		protection checks and additional DMA operations.
---
> *		This is a handle to a protection domain associated with the queue
> *		pair, or NULL if the queue pair is type IB_QPT_RELIABLE_DGRM.
8384a8788,8797
> 		struct _qp_reset
> 		{
> 			/*
> 			 * Time, in milliseconds, that the QP needs to spend in the
> 			 * time wait state before being reused.
> 			 */
> 			uint32_t			timewait;
> 
> 		}	reset;
> 
8386a8800
> 			ib_qp_opts_t		opts;
8400d8813
< 			uint8_t				rnr_nak_timeout;
8408a8822
> 			uint8_t				rnr_nak_timeout;
8416a8831
> 			uint8_t				rnr_nak_timeout;
8421d8835
< 			uint8_t				rnr_nak_timeout;
8454c8868
< /****d* Access Layer/ib_wr_type_t
---
> /****s* Access Layer/ib_eec_attr_t
8456c8870
< *	ib_wr_type_t
---
> *	ib_eec_attr_t
8459c8873
< *	Identifies the type of work request posted to a queue pair.
---
> *	Information about an end-to-end context.
8463c8877
< typedef enum _ib_wr_type_t
---
> typedef struct _ib_eec_attr
8465,8470c8879,8881
< 	WR_SEND = 1,
< 	WR_RDMA_WRITE,
< 	WR_RDMA_READ,
< 	WR_COMPARE_SWAP,
< 	WR_FETCH_ADD,
< 	WR_UNKNOWN
---
> 	ib_qp_state_t			state;
> 	ib_rdd_handle_t			h_rdd;
> 	ib_net32_t				local_eecn;
8472,8473c8883,8899
< }	ib_wr_type_t;
< /*****/
---
> 	ib_net32_t				sq_psn;
> 	ib_net32_t				rq_psn;
> 	uint8_t					primary_port;
> 	uint16_t				pkey_index;
> 	uint32_t				resp_res;
> 	ib_net32_t				remote_eecn;
> 	uint32_t				init_depth;
> 	uint32_t				dest_num;	// ??? What is this?
> 	ib_av_attr_t			primary_av;
> 	ib_av_attr_t			alternate_av;
> 	ib_apm_state_t			apm_state;
> 
> }	ib_eec_attr_t;
> /*
> * SEE ALSO
> *	ib_qp_state_t, ib_av_attr_t, ib_apm_state_t
> *****/
8476c8902
< /****f* IBA Base: Types/ib_get_wr_type_str
---
> /****d* Access Layer/ib_eec_opts_t
8478c8904
< *	ib_get_wr_type_str
---
> *	ib_eec_opts_t
8481c8907
< *	Returns a string for the specified work request type
---
> *	Optional fields supplied in the modify EEC operation.
8485,8488c8911,8919
< AL_EXPORT const char* AL_API
< ib_get_wr_type_str(
< 	IN				uint8_t						wr_type );
< 
---
> typedef uint32_t				ib_eec_opts_t;
> #define IB_MOD_EEC_ALTERNATE_AV	0x00000001
> #define IB_MOD_EEC_PKEY			0x00000002
> #define IB_MOD_EEC_APM_STATE	0x00000004
> #define IB_MOD_EEC_PRIMARY_AV	0x00000008
> #define IB_MOD_EEC_RNR			0x00000010
> #define IB_MOD_EEC_RESP_RES		0x00000020
> #define IB_MOD_EEC_OUTSTANDING	0x00000040
> #define IB_MOD_EEC_PRIMARY_PORT	0x00000080
8490,8493c8921,8924
< * PARAMETERS
< *	wr_type
< *		[in] Encoded work request type as defined in the
< work request attribute.
---
> * NOTES
> *
> *
> *****/
8495,8496c8926,8928
< * RETURN VALUES
< *	Pointer to the work request type string.
---
> /****s* Access Layer/ib_eec_mod_t
> * NAME
> *	ib_eec_mod_t
8498c8930,8932
< * NOTES
---
> * DESCRIPTION
> *	Information needed to change the state of an end-to-end context through
> *	the ib_modify_eec function.
8499a8934,8989
> * SYNOPSIS
> */
> typedef struct _ib_eec_mod
> {
> 	ib_qp_state_t				req_state;
> 
> 	union _eec_state
> 	{
> 		struct _eec_init
> 		{
> 			uint8_t				primary_port;
> 			uint16_t			pkey_index;
> 
> 		}	init;
> 
> 		struct _eec_rtr
> 		{
> 			ib_net32_t			rq_psn;
> 			ib_net32_t			remote_eecn;
> 			ib_av_attr_t		primary_av;
> 			uint8_t				resp_res;
> 
> 			ib_eec_opts_t		opts;
> 			ib_av_attr_t		alternate_av;
> 			uint16_t			pkey_index;
> 
> 		}	rtr;
> 
> 		struct _eec_rts
> 		{
> 			ib_net32_t			sq_psn;
> 			uint8_t				retry_cnt;
> 			uint8_t				rnr_retry_cnt;
> 			uint8_t				local_ack_timeout;
> 			uint8_t				init_depth;
> 
> 			ib_eec_opts_t		opts;
> 			ib_av_attr_t		alternate_av;
> 			ib_apm_state_t		apm_state;
> 
> 			ib_av_attr_t		primary_av;
> 			uint16_t			pkey_index;
> 			uint8_t				primary_port;
> 
> 		}	rts;
> 
> 		struct _eec_sqd
> 		{
> 			boolean_t			sqd_event;
> 
> 		}	sqd;
> 
> 	}	state;
> 
> }	ib_eec_mod_t;
> /*
8500a8991,8996
> *	ib_qp_state_t, ib_av_attr_t, ib_apm_state_t
> *****/
> 
> 
> /****d* Access Layer/ib_wr_type_t
> * NAME
8502c8998,9013
< *********/
---
> *
> * DESCRIPTION
> *	Identifies the type of work request posted to a queue pair.
> *
> * SYNOPSIS
> */
> typedef enum _ib_wr_type_t
> {
> 	WR_SEND = 1,
> 	WR_RDMA_WRITE,
> 	WR_RDMA_READ,
> 	WR_COMPARE_SWAP,
> 	WR_FETCH_ADD
> 
> }	ib_wr_type_t;
> /*****/
8518c9029
< 	uint64_t				vaddr;
---
> 	void					*vaddr;
8543a9055,9056
> 
> 
8570a9084
> *
8575a9090
> *
8597c9112
< 	struct _ib_send_wr* __ptr64	p_next;
---
> 	struct _ib_send_wr		*p_next;
8602c9117
< 	ib_local_ds_t* __ptr64		ds_array;
---
> 	ib_local_ds_t			*ds_array;
8612,8613d9126
< 			uint16_t		pkey_index;
< 			void* __ptr64	rsvd;
8616a9130,9137
> 		struct _send_rd
> 		{
> 			ib_net32_t		remote_qp;
> 			ib_net32_t		remote_qkey;
> 			ib_net32_t		eecn;
> 
> 		}	rd;
> 
8641c9162
< 		net32_t				rkey;
---
> 		uint32_t			rkey;
8689,8693c9210,9215
< *	dgrm.ud.pkey_index
< *		The pkey index for this send work request.  This is valid only
< *		for IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types.  The work request
< *		is posted to using this pkey index build the GMP's BTH instead
< *		of the QP's pkey.
---
> *	dgrm.rd.remote_qp
> *		Identifies the destination queue pair of a reliable datagram send
> *		operation.
> *
> *	dgrm.rd.remote_qkey
> *		The qkey for the destination queue pair.
8695,8696c9217,9219
< *	dgrm.ud.rsvd
< *		Reserved for use by the Access Layer.
---
> *	dgrm.rd.eecn
> *		The local end-to-end context number to use with the reliable datagram
> *		send operation.
8764c9287
< 	struct _ib_recv_wr* __ptr64	p_next;
---
> 	struct _ib_recv_wr		*p_next;
8767c9290
< 	ib_local_ds_t* __ptr64		ds_array;
---
> 	ib_local_ds_t			*ds_array;
8810c9333
< 	net32_t					current_rkey;
---
> 	uint32_t				current_rkey;
8856a9380
> 	IB_WCS_LOCAL_EEC_OP_ERR,
8865,8867c9389,9391
<  	IB_WCS_BAD_RESP_ERR,
<  	IB_WCS_LOCAL_ACCESS_ERR,
<  	IB_WCS_GENERAL_ERR,
---
> 	IB_WCS_REM_INVALID_RD_REQ_ERR,
> 	IB_WCS_INVALID_EECN,
> 	IB_WCS_INVALID_EEC_STATE,
8894a9419,9423
> *	IB_WCS_LOCAL_EEC_OP_ERR
> *		An internal EEC consistency error was generated while processing
> *		this work request.  This may indicate that the EEC was in an incorrect
> *		state for the requested operation.
> *
8931,8938c9460,9468
<  *	IB_WCS_BAD_RESP_ERR,
<  *		An unexpected transport layer opcode was returned
<  *		by the responder.
<  *
<  *	IB_WCS_LOCAL_ACCESS_ERR,
<  *		A protection error occurred on a local data buffer
<  *		during the processing of a RDMA Write with Immediate Data 
<  *		operation sent from the remote node.
---
> *	IB_WCS_REM_INVALID_RD_REQ_ERR,
> *		Responder detected an invalid RD message.  This may be the result of an
> *		invalid qkey or an RDD mismatch.
> *
> *	IB_WCS_INVALID_EECN
> *		An invalid EE context number was detected.
> *
> *	IB_WCS_INVALID_EEC_STATE
> *		The EEC was in an invalid state for the specified request.
8947,8950d9476
<  *
<  *	IB_WCS_GENERAL_ERR,
<  *		Any other error
<  *
8953a9480,9481
> extern const char* ib_wc_status_str[];
> 
8964c9492
< AL_EXPORT const char* AL_API
---
> static inline const char*
8966c9494,9499
< 	IN				ib_wc_status_t				wc_status );
---
> 	IN				ib_wc_status_t				wc_status )
> {
> 	if( wc_status > IB_WCS_UNKNOWN )
> 		wc_status = IB_WCS_UNKNOWN;
> 	return( ib_wc_status_str[wc_status] );
> }
8999,9000c9532
< 	IB_WC_RECV_RDMA_WRITE,
< 	IB_WC_UNKNOWN
---
> 	IB_WC_RECV_RDMA_WRITE
9006,9031d9537
< /****f* IBA Base: Types/ib_get_wc_type_str
< * NAME
< *	ib_get_wc_type_str
< *
< * DESCRIPTION
< *	Returns a string for the specified work completion type.
< *
< * SYNOPSIS
< */
< AL_EXPORT const char* AL_API
< ib_get_wc_type_str(
< 	IN				ib_wc_type_t				wc_type );
< /*
< * PARAMETERS
< *	wc_type
< *		[in] work completion type value
< *
< * RETURN VALUES
< *	Pointer to the work completion type description string.
< *
< * NOTES
< *
< * SEE ALSO
< *********/
< 
< 
9077c9583
< 	struct _ib_wc* __ptr64	p_next;
---
> 	struct _ib_wc			*p_next;
9105a9612,9621
> 		struct _wc_rd
> 		{
> 			ib_net32_t		remote_eecn;
> 			ib_net32_t		remote_qp;
> 			ib_net16_t		remote_lid;
> 			uint8_t			remote_sl;
> 			uint32_t		free_cnt;
> 
> 		}	rd;
> 
9140a9657
> *
9172,9173c9689,9690
< *		The pkey index of the source queue pair. This is valid only for
< *		IB_QPT_QP1 and IB_QPT_QP1_ALIAS QP types.
---
> *		The pkey index for the source queue pair. This is valid only for
> *		GSI type QP's.
9183a9701,9717
> *	recv.rd.remote_eecn
> *		The remote end-to-end context number that sent the received message.
> *
> *	recv.rd.remote_qp
> *		Identifies the source queue pair of a received message.
> *
> *	recv.rd.remote_lid
> *		The source LID of the received message.
> *
> *	recv.rd.remote_sl
> *		The service level used by the source of the received message.
> *
> *	recv.rd.free_cnt
> *		The number of available entries in the completion queue.  Reliable
> *		datagrams may complete out of order, so this field may be used to
> *		determine the number of additional completions that may occur.
> *
9229c9763
< 	void* __ptr64			vaddr;
---
> 	void					*vaddr;
9249,9320d9782
< #ifdef CL_KERNEL
< 
< /****s* Access Layer/mlnx_fmr_create_t
< * NAME
< *	mlnx_fmr_create_t
< *
< * DESCRIPTION
< *	Information required to create a Mellanox fast memory region.
< *
< * SYNOPSIS
< */
< typedef struct _mlnx_fmr_create
< {
< 	int					max_pages;
< 	int					max_maps;
< 	uint8_t				page_size;
< 	ib_access_t			access_ctrl;
< 
< }	mlnx_fmr_create_t;
< /*
< * FIELDS
< *	max_pages
< *		max pages in the region.
< *
< *	max_maps
< *		max times, the region can be mapped before remapping.
< *
< *	page_size
< *		log2 of the page size (e.g. 12 for 4KB).
< *
< *	access_ctrl
< *		Access rights of the registered region.
< *
< * NOTES
< *	This is a Mellanox specific extension to verbs.
< *
< * SEE ALSO
< *	ib_access_t
< *****/
< 
< #endif
< 
< /****s* Access Layer/ib_phys_range_t
< * NAME
< *	ib_phys_range_t
< *
< * DESCRIPTION
< *	Information describing a physical memory range.
< *
< * SYNOPSIS
< */
< typedef struct _ib_phys_range
< {
< 	uint64_t				base_addr;
< 	uint64_t				size;
< 
< }	ib_phys_range_t;
< /*
< * FIELDS
< *	base_addr
< *		Physical address of the base of the memory range.
< *
< *	size
< *		size, in bytes, of the memory range.
< *
< * NOTES
< *	The base address must be start and end on an HCA-supported page boundary.
< *
< * SEE ALSO
< *	ib_phys_create_t
< *********/
< 
9334,9335c9796,9797
< 	uint32_t					num_ranges;
< 	ib_phys_range_t* __ptr64	range_array;
---
> 	uint32_t				num_bufs;
> 	uint64_t				*buf_array;
9337c9799
< 	uint32_t					hca_page_size;
---
> 	uint32_t				page_size;
9342d9803
< * FIELDS
9346,9347c9807,9808
< *	num_ranges
< *		Number of ib_phys_range structures listed in the specified range array.
---
> *	num_bufs
> *		Number of buffers listed in the specified buffer array.
9349,9350c9810,9811
< *	range_array
< *		An array of ib_phys_range structures to be registered as a single memory
---
> *	buf_array
> *		An array of physical buffers to be registered as a single memory
9354,9355c9815,9816
< *		The offset into the first physical memory range of the specified memory
< *		region on which to start the virtual address.
---
> *		The offset into the first physical page of the specified memory
> *		region to start the virtual address.
9357,9358c9818,9819
< *	hca_page_size
< *		The HCA page size to use to register the memory.
---
> *	page_size
> *		The physical page size of the memory being registered.
9380,9383c9841,9844
< 	uint64_t				local_lb;
< 	uint64_t				local_ub;
< 	uint64_t				remote_lb;
< 	uint64_t				remote_ub;
---
> 	void					*local_lb;
> 	void					*local_ub;
> 	void					*remote_lb;
> 	void					*remote_ub;
9385,9386c9846,9847
< 	net32_t					lkey;
< 	net32_t					rkey;
---
> 	uint32_t				lkey;
> 	uint32_t				rkey;
9396,9397c9857
< *		memory access.  This is always a 64-bit quantity to support registering
< *		more than 4GB of memory on 32-bit systems with PAE.
---
> *		memory access.
9401,9402c9861
< *		memory access.  This is always a 64-bit quantity to support registering
< *		more than 4GB of memory on 32-bit systems with PAE.
---
> *		memory access.
9406,9407c9865
< *		memory access.  This is always a 64-bit quantity to support registering
< *		more than 4GB of memory on 32-bit systems with PAE.
---
> *		memory access.
9411,9412c9869
< *		memory access.  This is always a 64-bit quantity to support registering
< *		more than 4GB of memory on 32-bit systems with PAE.
---
> *		memory access.
9465d9921
< #define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED 	0x00800000
9544,9547d9999
< *
< *	IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED
< *		Used to modify the system image GUID for the port.
< *
9661a10114
> 	IN	OUT			void*						p_buf OPTIONAL;
9663c10116
< 	IN				uint32_t					buf_info;
---
> 	IN	OUT			uint32_t					num_bytes_ret;
9665,9666d10117
< 		OUT			uint32_t					num_bytes_ret;
< 	IN	OUT			void* __ptr64				p_buf OPTIONAL;
9674,9684d10124
< *	status
< *		The completion status from the verbs provider.  This field should be
< *		initialize to indicate an error to allow detection and cleanup in
< *		case a communication error occurs between user-mode and kernel-mode.
< *
< *	buf_size
< *		The size of the buffer in bytes.
< *
< *	buf_info
< *		Additional buffer information
< *
9690a10131,10133
> *	buf_size
> *		The size of the buffer in bytes.
> *
9696a10140,10144
> *	status
> *		The completion status from the verbs provider.  This field should be
> *		initialize to indicate an error to allow detection and cleanup in
> *		case a communication error occurs between user-mode and kernel-mode.
> *
9703a10152
> END_C_DECLS
9705,9710c10154
< #ifdef __cplusplus
< }	/* extern "C" */
< #endif	/* __cplusplus */
< 
< 
< #endif /* __IB_TYPES_H__ */
---
> #endif // __IB_TYPES_H__





More information about the general mailing list