Blame IbAccess/Common/Inc/ib_types.h

Packit Service 3470d1
/* BEGIN_ICS_COPYRIGHT3 ****************************************
Packit Service 3470d1
Packit Service 3470d1
Copyright (c) 2015-2017, Intel Corporation
Packit Service 3470d1
Packit Service 3470d1
Redistribution and use in source and binary forms, with or without
Packit Service 3470d1
modification, are permitted provided that the following conditions are met:
Packit Service 3470d1
Packit Service 3470d1
    * Redistributions of source code must retain the above copyright notice,
Packit Service 3470d1
      this list of conditions and the following disclaimer.
Packit Service 3470d1
    * Redistributions in binary form must reproduce the above copyright
Packit Service 3470d1
      notice, this list of conditions and the following disclaimer in the
Packit Service 3470d1
      documentation and/or other materials provided with the distribution.
Packit Service 3470d1
    * Neither the name of Intel Corporation nor the names of its contributors
Packit Service 3470d1
      may be used to endorse or promote products derived from this software
Packit Service 3470d1
      without specific prior written permission.
Packit Service 3470d1
Packit Service 3470d1
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit Service 3470d1
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 3470d1
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit Service 3470d1
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit Service 3470d1
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 3470d1
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit Service 3470d1
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit Service 3470d1
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit Service 3470d1
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit Service 3470d1
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit Service 3470d1
Packit Service 3470d1
** END_ICS_COPYRIGHT3   ****************************************/
Packit Service 3470d1
Packit Service 3470d1
/* [ICS VERSION STRING: unknown] */
Packit Service 3470d1
Packit Service 3470d1
#ifndef _IBA_IB_TYPES_H_
Packit Service 3470d1
#define _IBA_IB_TYPES_H_
Packit Service 3470d1
Packit Service 3470d1
/* Basic Infiniband data types */
Packit Service 3470d1
Packit Service 3470d1
#define IB1_1	1	/* set to 1 to build IB 1.1 compliant version, 0 for 1.0a */
Packit Service 3470d1
Packit Service 3470d1
#include "iba/public/datatypes.h"
Packit Service 3470d1
#include "iba/public/ibyteswap.h"
Packit Service 3470d1
Packit Service 3470d1
#ifdef __cplusplus
Packit Service 3470d1
extern "C" {
Packit Service 3470d1
#endif
Packit Service 3470d1
Packit Service 3470d1
struct _PCI_DEVICE;
Packit Service 3470d1
Packit Service 3470d1
typedef void		*IB_HANDLE;
Packit Service 3470d1
Packit Service 3470d1
typedef uint32		IB_L_KEY;
Packit Service 3470d1
typedef uint32		IB_R_KEY;
Packit Service 3470d1
typedef uint32		IB_Q_KEY;
Packit Service 3470d1
typedef uint16		IB_P_KEY;
Packit Service 3470d1
typedef uint16		IB_LID;
Packit Service 3470d1
typedef	uint8		IB_PATHBITS;
Packit Service 3470d1
#define IB_PATHBITS_MASK	0x7f	/* path bits are no more than 7 bits */
Packit Service 3470d1
typedef uint8		IB_LMC;
Packit Service 3470d1
typedef	uint8		IB_SL;
Packit Service 3470d1
typedef	uint64		IB_VIRT_ADDR;
Packit Service 3470d1
Packit Service 3470d1
typedef	uint64		EUI64;
Packit Service 3470d1
Packit Service 3470d1
/* the well-known Q_Key for QP1. */
Packit Service 3470d1
#define	QP1_WELL_KNOWN_Q_KEY				0x80010000U
Packit Service 3470d1
Packit Service 3470d1
/* the default P_Key */
Packit Service 3470d1
#define DEFAULT_P_KEY						0xffffU
Packit Service 3470d1
Packit Service 3470d1
/* -------------------------------------------------------------------------- */
Packit Service 3470d1
/* LID's */
Packit Service 3470d1
Packit Service 3470d1
#define	LID_RESERVED						0U		/* RESERVED;  */
Packit Service 3470d1
#define	LID_PERMISSIVE						0xffffU	/* PROMISCUOUS;  */
Packit Service 3470d1
Packit Service 3470d1
#define LID_UCAST_START						0x0001U
Packit Service 3470d1
#define LID_UCAST_END						0xbfffU
Packit Service 3470d1
Packit Service 3470d1
#define LID_MCAST_START						0xc000U
Packit Service 3470d1
#define LID_MCAST_END						0xfffeU
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
/* -------------------------------------------------------------------------- */
Packit Service 3470d1
/* GID's		 */
Packit Service 3470d1
#define	IPV6_LINK_LOCAL_PREFIX				0x3faU	/* 1111111010b */
Packit Service 3470d1
#define	IPV6_SITE_LOCAL_PREFIX				0x3fbU	/* 1111111011b */
Packit Service 3470d1
#define IPV6_MULTICAST_PREFIX				0xffU	/* 11111111b */
Packit Service 3470d1
Packit Service 3470d1
/* Multicast Flags definitions */
Packit Service 3470d1
#define IPV6_MCAST_FLAG_PERMANENT			0U
Packit Service 3470d1
#define IPV6_MCAST_FLAG_TRANSIENT			1U
Packit Service 3470d1
Packit Service 3470d1
/* Multicast Address Scope definitions */
Packit Service 3470d1
typedef enum {
Packit Service 3470d1
	IPV6_RESERVED_0 = 0,
Packit Service 3470d1
	IPV6_NODE_LOCAL,
Packit Service 3470d1
	IPV6_LINK_LOCAL,
Packit Service 3470d1
	IPV6_RESERVED_3,
Packit Service 3470d1
	IPV6_RESERVED_4,
Packit Service 3470d1
	IPV6_SITE_LOCAL,
Packit Service 3470d1
	IPV6_RESERVED_6,
Packit Service 3470d1
	IPV6_RESERVED_7,
Packit Service 3470d1
	IPV6_ORG_LOCAL,
Packit Service 3470d1
	IPV6_RESERVED_9,
Packit Service 3470d1
	IPV6_RESERVED_10,
Packit Service 3470d1
	IPV6_RESERVED_11,
Packit Service 3470d1
	IPV6_RESERVED_12,
Packit Service 3470d1
	IPV6_RESERVED_13,
Packit Service 3470d1
	IPV6_GLOBAL,
Packit Service 3470d1
	IPV6_RESERVED_15
Packit Service 3470d1
} IPV6_MCAST_SCOPE;
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
/* Default GID subnet prefix.  Can be combined with the port GUID to form a */
Packit Service 3470d1
/* GID usable on the local subnet. */
Packit Service 3470d1
#define DEFAULT_SUBNET_PREFIX	0xFE80000000000000Ull
Packit Service 3470d1
Packit Service 3470d1
/* format fields for each format type */
Packit Service 3470d1
#define IB_GID_FORMAT_LINK_LOCAL	0x3faU	/* 10 bits */
Packit Service 3470d1
#define IB_GID_FORMAT_SITE_LOCAL	0x3fbU	/* 10 bits */
Packit Service 3470d1
#define IB_GID_FORMAT_MCAST 		0xffU	/* 8 bits */
Packit Service 3470d1
#define IB_GID_MCAST_FLAG_T			0x01U	/* if set, non-permanent MC GID */
Packit Service 3470d1
Packit Service 3470d1
	/* values for scope other than those below are reserved */
Packit Service 3470d1
#define IB_GID_MCAST_SCOPE_LINK_LOCAL	0x2U
Packit Service 3470d1
#define IB_GID_MCAST_SCOPE_SITE_LOCAL	0x5U
Packit Service 3470d1
#define IB_GID_MCAST_SCOPE_ORG_LOCAL	0x8U
Packit Service 3470d1
#define IB_GID_MCAST_SCOPE_GLOBAL		0xeU
Packit Service 3470d1
Packit Service 3470d1
#define IB_GID_MCAST_FORMAT_MASK_H		0xFF00000000000000Ull
Packit Service 3470d1
#define IB_GID_ALL_CA_MCAST_H			0xFF02000000000000Ull
Packit Service 3470d1
#define IB_GID_ALL_CA_MCAST_L			0x0000000000000001Ull
Packit Service 3470d1
Packit Service 3470d1
#define IB_QP_MCAST						0xffffffU	/* dest QP for multicast */
Packit Service 3470d1
Packit Service 3470d1
#include "iba/public/ipackon.h"
Packit Service 3470d1
Packit Service 3470d1
typedef union _IB_GID {
Packit Service 3470d1
	uchar	Raw[16];
Packit Service 3470d1
	struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
		uint32	HH;
Packit Service 3470d1
		uint32	HL;
Packit Service 3470d1
		uint32	LH;
Packit Service 3470d1
		uint32	LL;
Packit Service 3470d1
#else
Packit Service 3470d1
		uint32	LL;
Packit Service 3470d1
		uint32	LH;
Packit Service 3470d1
		uint32	HL;
Packit Service 3470d1
		uint32	HH;
Packit Service 3470d1
#endif
Packit Service 3470d1
	} AsReg32s;
Packit Service 3470d1
	struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
		uint64	H;
Packit Service 3470d1
		uint64	L;
Packit Service 3470d1
#else
Packit Service 3470d1
		uint64	L;
Packit Service 3470d1
		uint64	H;
Packit Service 3470d1
#endif
Packit Service 3470d1
	} AsReg64s;
Packit Service 3470d1
	union _IB_GID_TYPE {
Packit Service 3470d1
		struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint64		FormatPrefix:	10;
Packit Service 3470d1
				uint64		Reserved:		54;	/* Must be zero */
Packit Service 3470d1
			} s;
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
#else
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint64		Reserved:		54;	/* Must be zero */
Packit Service 3470d1
				uint64		FormatPrefix:	10;
Packit Service 3470d1
			} s;
Packit Service 3470d1
#endif
Packit Service 3470d1
		} LinkLocal;
Packit Service 3470d1
		
Packit Service 3470d1
		struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint64		FormatPrefix:	10;
Packit Service 3470d1
				uint64		Reserved:		38;	/* Must be zero */
Packit Service 3470d1
				uint64		SubnetPrefix:	16;
Packit Service 3470d1
			} s;
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
#else
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint64		SubnetPrefix:	16;
Packit Service 3470d1
				uint64		Reserved:		38;	/* Must be zero */
Packit Service 3470d1
				uint64		FormatPrefix:	10;
Packit Service 3470d1
			} s;
Packit Service 3470d1
#endif
Packit Service 3470d1
		} SiteLocal;
Packit Service 3470d1
		
Packit Service 3470d1
		struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
			uint64		SubnetPrefix;
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
#else
Packit Service 3470d1
			EUI64		InterfaceID;
Packit Service 3470d1
			uint64		SubnetPrefix;
Packit Service 3470d1
#endif
Packit Service 3470d1
		} Global;
Packit Service 3470d1
		
Packit Service 3470d1
		struct {
Packit Service 3470d1
#if CPU_BE
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint16		FormatPrefix:	8;
Packit Service 3470d1
				uint16		Flags:		4;
Packit Service 3470d1
				uint16		Scope:		4;
Packit Service 3470d1
			} s;
Packit Service 3470d1
			uchar			GroupId[14];
Packit Service 3470d1
#else
Packit Service 3470d1
			uchar			GroupId[14];
Packit Service 3470d1
			struct {
Packit Service 3470d1
				uint16		Scope:			4;
Packit Service 3470d1
				uint16		Flags:			4;
Packit Service 3470d1
				uint16		FormatPrefix:	8;
Packit Service 3470d1
			} s;
Packit Service 3470d1
#endif
Packit Service 3470d1
		} Multicast;
Packit Service 3470d1
	} Type;
Packit Service 3470d1
} PACK_SUFFIX IB_GID;
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * The IB Global Route header found in the first 40 bytes of the first data
Packit Service 3470d1
 * segment on globally routed Unreliable Datagram messages.
Packit Service 3470d1
 *
Packit Service 3470d1
 * TBD - cleanup to use similar names to GlobalRouteInfo in vpi.h
Packit Service 3470d1
 */
Packit Service 3470d1
Packit Service 3470d1
typedef struct _IB_GRH {
Packit Service 3470d1
	union {
Packit Service 3470d1
		uint32 AsReg32;
Packit Service 3470d1
Packit Service 3470d1
		struct _S_GRH {
Packit Service 3470d1
#if CPU_LE
Packit Service 3470d1
			uint32	FlowLabel:	20;	/* This field identifies sequences of  */
Packit Service 3470d1
									/* packets requiring special handling. */
Packit Service 3470d1
			uint32	TClass	:	8;	/* Traffic Class-This field is used by */
Packit Service 3470d1
									/* IBA to communicate global service level */
Packit Service 3470d1
			uint32	IPVer	:	4;	/* IP Version-This field indicates version */
Packit Service 3470d1
									/* of the GRH */
Packit Service 3470d1
#else
Packit Service 3470d1
			uint32	IPVer	:	4;	/* IP Version-This field indicates version */
Packit Service 3470d1
									/* of the GRH */
Packit Service 3470d1
			uint32	TClass	:	8;	/* Traffic Class-This field is used by */
Packit Service 3470d1
									/* IBA to communicate global service level */
Packit Service 3470d1
			uint32	FlowLabel:	20;	/* This field identifies sequences of  */
Packit Service 3470d1
									/* packets requiring special handling. */
Packit Service 3470d1
#endif
Packit Service 3470d1
		} s;
Packit Service 3470d1
	} u1;
Packit Service 3470d1
Packit Service 3470d1
	uint16	PayLen;		/* Payload length -This field indicates the length of  */
Packit Service 3470d1
						/* the packet in bytes following the GRH.  */
Packit Service 3470d1
						/* This includes from the first byte after the end of */
Packit Service 3470d1
						/* the GRH up to but not including either the VCRC  */
Packit Service 3470d1
						/* or any padding to achieve 4 byte length.  */
Packit Service 3470d1
						/* For raw packets with GRH, the padding is determined */
Packit Service 3470d1
						/* from the lower two bits of this GRH:Payload length  */
Packit Service 3470d1
						/* field. (For IBA packets it is determined from the  */
Packit Service 3470d1
						/* pad field in the transport header.) Padding is */
Packit Service 3470d1
						/* placed immediately before the VCRC field. */
Packit Service 3470d1
						/* Note: GRH:PayLen is different from LRH:PkyLen. */
Packit Service 3470d1
	uint8	NxtHdr;		/* Next Header-This field identifies the header  */
Packit Service 3470d1
						/* following the GRH. This field is included for  */
Packit Service 3470d1
						/* compatibility with IPV6 headers.  */
Packit Service 3470d1
						/* It should indicate IBA transport. */
Packit Service 3470d1
	uint8	HopLimit;	/* Hop Limit-This field sets a strict bound on  */
Packit Service 3470d1
						/* the number of hops between subnets a packet  */
Packit Service 3470d1
						/* can make before being discarded. This is */
Packit Service 3470d1
						/* enforced only by routers. */
Packit Service 3470d1
	IB_GID	SGID;		/* Source GID-This field identifies the  */
Packit Service 3470d1
						/* Global Identifier (GID) for the port */
Packit Service 3470d1
						/* which injected the packet into the network. */
Packit Service 3470d1
	IB_GID	DGID;		/* Destination GID-This field identifies the GID  */
Packit Service 3470d1
						/* for the port which will consume */
Packit Service 3470d1
						/* the packet from the network. */
Packit Service 3470d1
} PACK_SUFFIX IB_GRH;
Packit Service 3470d1
Packit Service 3470d1
#include "iba/public/ipackoff.h"
Packit Service 3470d1
Packit Service 3470d1
static __inline
Packit Service 3470d1
void
Packit Service 3470d1
BSWAP_IB_GID(
Packit Service 3470d1
	IB_GID	*IbGid
Packit Service 3470d1
	)
Packit Service 3470d1
{
Packit Service 3470d1
#if CPU_LE
Packit Service 3470d1
	/* Swap all 128 bits */
Packit Service 3470d1
	uint64 temp = IbGid->AsReg64s.L;
Packit Service 3470d1
Packit Service 3470d1
	IbGid->AsReg64s.L = ntoh64(IbGid->AsReg64s.H);
Packit Service 3470d1
	IbGid->AsReg64s.H = ntoh64(temp);
Packit Service 3470d1
#endif
Packit Service 3470d1
}
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
static __inline
Packit Service 3470d1
void
Packit Service 3470d1
BSWAP_IB_GRH(
Packit Service 3470d1
	IB_GRH			*Dest
Packit Service 3470d1
	)
Packit Service 3470d1
{	
Packit Service 3470d1
#if CPU_LE
Packit Service 3470d1
	Dest->u1.AsReg32 = ntoh32(Dest->u1.AsReg32);
Packit Service 3470d1
	Dest->PayLen = ntoh16(Dest->PayLen);
Packit Service 3470d1
Packit Service 3470d1
	BSWAP_IB_GID(&Dest->SGID);
Packit Service 3470d1
	BSWAP_IB_GID(&Dest->DGID);
Packit Service 3470d1
#endif
Packit Service 3470d1
} 
Packit Service 3470d1
Packit Service 3470d1
/* MTU of neighbor endnode connected to this port:
Packit Service 3470d1
 * this enum is used for all SM and CM messages
Packit Service 3470d1
 * it is also used in other datatypes as noted below
Packit Service 3470d1
 */
Packit Service 3470d1
typedef enum _IB_MTU {
Packit Service 3470d1
	IB_MTU_256		= 1,
Packit Service 3470d1
	IB_MTU_512		= 2,
Packit Service 3470d1
	IB_MTU_1024		= 3,
Packit Service 3470d1
	IB_MTU_2048		= 4,
Packit Service 3470d1
	IB_MTU_4096		= 5,
Packit Service 3470d1
    IB_MTU_MAX		= 5
Packit Service 3470d1
	/* 0, 6 - 15 (or 63 in some packets): reserved */
Packit Service 3470d1
} IB_MTU;
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
/* Static rate for link.
Packit Service 3470d1
 * This enum is used in all SM, CM and ADDRESS_VECTOR APIs
Packit Service 3470d1
 */
Packit Service 3470d1
typedef enum _IB_STATIC_RATE {
Packit Service 3470d1
	IB_STATIC_RATE_DONTCARE = 0,	/* allowed for SA query */
Packit Service 3470d1
									/* for ADDRESS_VECTOR means local port rate */
Packit Service 3470d1
	IB_STATIC_RATE_1GB = 1,		/* obsolete, now reserved */
Packit Service 3470d1
	IB_STATIC_RATE_1X = 2,		/* depricated, use IB_STATIC_RATE_2_5G */
Packit Service 3470d1
	IB_STATIC_RATE_2_5G = 2,	/* 2.5 Gb/sec (1X SDR) */
Packit Service 3470d1
	IB_STATIC_RATE_MIN = 2,		/* lowest standard rate */
Packit Service 3470d1
	IB_STATIC_RATE_4X = 3,		/* depricated, use IB_STATIC_RATE_10G */
Packit Service 3470d1
	IB_STATIC_RATE_10G = 3,		/* 10.0 Gb/sec (4X SDR, 1X QDR) */
Packit Service 3470d1
	IB_STATIC_RATE_12X = 4,		/* depricated, use IB_STATIC_RATE_30G */
Packit Service 3470d1
	IB_STATIC_RATE_30G = 4,		/* 30.0 Gb/sec (12X SDR) */
Packit Service 3470d1
	IB_STATIC_RATE_5G = 5,		/* 5.0 Gb/sec (1X DDR) */
Packit Service 3470d1
	IB_STATIC_RATE_20G = 6,		/* 20.0 Gb/sec (4X DDR, 8X SDR) */
Packit Service 3470d1
	IB_STATIC_RATE_40G = 7,		/* 40.0 Gb/sec (4X QDR, 8X DDR) */
Packit Service 3470d1
	IB_STATIC_RATE_60G = 8,		/* 60.0 Gb/sec (12X DDR) */
Packit Service 3470d1
	IB_STATIC_RATE_80G = 9,		/* 80.0 Gb/sec (8X QDR) */
Packit Service 3470d1
	IB_STATIC_RATE_120G = 10,	/* 120.0 Gb/sec (12X QDR) */
Packit Service 3470d1
	IB_STATIC_RATE_LAST_QDR = 10,	/* last QDR value, all FDR/EDR must be after this */
Packit Service 3470d1
	IB_STATIC_RATE_14G = 11,	/* 14.0625 Gb/sec (1X FDR) */
Packit Service 3470d1
	IB_STATIC_RATE_56G = 12,	/* 56.25 Gb/sec (4X FDR) */
Packit Service 3470d1
	IB_STATIC_RATE_112G = 13,	/* 112.5 Gb/sec (8X FDR) */
Packit Service 3470d1
	IB_STATIC_RATE_168G = 14,	/* 168.75 Gb/sec (12X FDR) */
Packit Service 3470d1
	IB_STATIC_RATE_25G = 15,	/* 25.78125 Gb/sec (1X EDR) */
Packit Service 3470d1
	IB_STATIC_RATE_100G = 16,	/* 103.125 Gb/sec (4X EDR) */
Packit Service 3470d1
	IB_STATIC_RATE_200G = 17,	/* 206.25 Gb/sec (8X EDR) */
Packit Service 3470d1
	IB_STATIC_RATE_300G = 18,	/* 309.375 Gb/sec (12X EDR) */
Packit Service 3470d1
	IB_STATIC_RATE_MAX = 18,	/* highest standard rate */
Packit Service 3470d1
	IB_STATIC_RATE_LAST = 18	/* last valid value */
Packit Service 3470d1
	/* 19-63 reserved */
Packit Service 3470d1
} IB_STATIC_RATE;
Packit Service 3470d1
Packit Service 3470d1
/* IB does not define rate for SMI/GSI packets and
Packit Service 3470d1
 * IB does not have Static rate in UD LRH
Packit Service 3470d1
 * so we can't be sure what rate of remote port is for SMI/GSI req/response
Packit Service 3470d1
 * we use a constant value for SMI/GSI QPs, this uses full port speed
Packit Service 3470d1
 * an alternative could be to use 1X speed to be conservative
Packit Service 3470d1
 * (GSI should not be a performance path?)
Packit Service 3470d1
 */
Packit Service 3470d1
#define IB_STATIC_RATE_GSI IB_STATIC_RATE_DONTCARE
Packit Service 3470d1
#define IB_STATIC_RATE_SMI IB_STATIC_RATE_DONTCARE
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Per Channel Adapter definitions and data types
Packit Service 3470d1
 */
Packit Service 3470d1
Packit Service 3470d1
typedef enum {
Packit Service 3470d1
	CAAtomicNone,	/* No Atomic operations supported. */
Packit Service 3470d1
	CAAtomicLocal,	/* Atomicity guaranteed only between QPs on this CA. */
Packit Service 3470d1
	CAAtomicGlobal	/* Atomicity guaranteed between CA and components that can */
Packit Service 3470d1
					/* access the target memory. */
Packit Service 3470d1
					/* of the atomic operation. */
Packit Service 3470d1
} IB_CA_ATOMIC_LVL;
Packit Service 3470d1
Packit Service 3470d1
typedef enum {
Packit Service 3470d1
	CAPathMigNone,	/* Channel Interface does not support path migration */
Packit Service 3470d1
	CAPathMigAuto	/* Automatic Path Migration supported by CI */
Packit Service 3470d1
} IB_CA_PATH_MIGRATION_LVL;
Packit Service 3470d1
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Port Attributes
Packit Service 3470d1
 */
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Port LID and LMC values for addressing within the Subnet
Packit Service 3470d1
 */
Packit Service 3470d1
typedef struct _IB_PORT_ADDRESS {
Packit Service 3470d1
	IB_LID		BaseLID;	/* Base LID */
Packit Service 3470d1
	IB_LMC		LMC;		/* LMC */
Packit Service 3470d1
} IB_PORT_ADDRESS;
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Info needed to reach the Subnet Manager for a port
Packit Service 3470d1
 */
Packit Service 3470d1
typedef struct _IB_PORT_SM_ADDRESS {
Packit Service 3470d1
	IB_LID		LID;		/* Base LID */
Packit Service 3470d1
	IB_SL		ServiceLevel;
Packit Service 3470d1
} IB_PORT_SM_ADDRESS;
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * IB Port States (matches values for SMA PortInfo.PortState)
Packit Service 3470d1
 */
Packit Service 3470d1
typedef enum _IB_PORT_STATE {
Packit Service 3470d1
	PortStateNop = 0,		/* Noop - only for SMA Set */
Packit Service 3470d1
	PortStateDown = 1,		/* Down (includes failed links) */
Packit Service 3470d1
	PortStateInit = 2,		/* Initialize */
Packit Service 3470d1
	PortStateArmed = 3,		/* Armed */
Packit Service 3470d1
	PortStateActive = 4,	/* Active */
Packit Service 3470d1
	PortStateMax = 4		/* Maximum Valid Value */
Packit Service 3470d1
} IB_PORT_STATE;
Packit Service 3470d1
Packit Service 3470d1
/* Port Capabilities (a subset of those in IB_PORT_INFO) */
Packit Service 3470d1
typedef enum _IB_PORT_CAPABILITIES {
Packit Service 3470d1
	PORT_IS_SM							= 0x00000001U,
Packit Service 3470d1
	PORT_IS_SM_DISABLED					= 0x00000002U,
Packit Service 3470d1
	PORT_IS_SNMP_TUNNELING_SUPPORTED	= 0x00000004U,
Packit Service 3470d1
	PORT_IS_DEVICE_MGMT_SUPPORTED		= 0x00000008U,
Packit Service 3470d1
	PORT_IS_VENDOR_CLASS_SUPPORTED		= 0x00000010U
Packit Service 3470d1
} IB_PORT_CAPABILITIES;
Packit Service 3470d1
Packit Service 3470d1
/* Port initialization type requested from SM */
Packit Service 3470d1
typedef enum _IB_PORT_INIT_TYPE {
Packit Service 3470d1
	PORT_INIT_TYPE_NOLOAD				= 0x00000001U,
Packit Service 3470d1
	PORT_INIT_TYPE_PRESERVE_CONTENT		= 0x00000002U,
Packit Service 3470d1
	PORT_INIT_TYPE_PRESERVE_PRESENCE	= 0x00000004U,
Packit Service 3470d1
	PORT_INIT_TYPE_DO_NOT_RESUSCITATE	= 0x00000008U
Packit Service 3470d1
} IB_PORT_INIT_TYPE;
Packit Service 3470d1
Packit Service 3470d1
/* Port Link Width Active */
Packit Service 3470d1
typedef enum _IB_PORT_WIDTH {
Packit Service 3470d1
	PORT_WIDTH_1X =0,
Packit Service 3470d1
	PORT_WIDTH_4X =1,
Packit Service 3470d1
	PORT_WIDTH_12X =2,
Packit Service 3470d1
	PORT_WIDTH_8X =3
Packit Service 3470d1
} IB_PORT_WIDTH;
Packit Service 3470d1
Packit Service 3470d1
/* Port Link Speed Active */
Packit Service 3470d1
typedef enum _IB_PORT_SPEED {
Packit Service 3470d1
	PORT_SPEED_2_5G =0,
Packit Service 3470d1
	PORT_SPEED_5G   =1,
Packit Service 3470d1
	PORT_SPEED_10G  =2,
Packit Service 3470d1
	PORT_SPEED_14G  =3,
Packit Service 3470d1
	PORT_SPEED_25G  =4
Packit Service 3470d1
} IB_PORT_SPEED;
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * This is the per port attributes structure.
Packit Service 3470d1
 * As there are two variable sized tables, pointers are used to reference into
Packit Service 3470d1
 * the tables as well as the beginning of the next port's attribute structure.
Packit Service 3470d1
 */
Packit Service 3470d1
typedef struct _IB_PORT_ATTRIBUTES {
Packit Service 3470d1
	struct _IB_PORT_ATTRIBUTES	*Next;	/* Pointer to the structure for the */
Packit Service 3470d1
										/* next port.  */
Packit Service 3470d1
										/* Null if this is last port in list. */
Packit Service 3470d1
	IB_GID		*GIDTable;				/* Pointer to the GID table */
Packit Service 3470d1
	IB_P_KEY	*PkeyTable;				/* Pointer to the Pkey table */
Packit Service 3470d1
	EUI64		GUID;					/* Port GUID */
Packit Service 3470d1
	uint32		VirtualLanes;			/* Number of data virtual lanes */
Packit Service 3470d1
										/* supported (from VLCap incl. VL 15) */
Packit Service 3470d1
										/* 2, 3, 5, 9 or 16 */
Packit Service 3470d1
	IB_PORT_STATE	PortState;
Packit Service 3470d1
	IB_PORT_CAPABILITIES	Capabilities;	/* optional capabilities */
Packit Service 3470d1
	IB_PORT_INIT_TYPE	InitTypeReply;	/* initialization type requested */
Packit Service 3470d1
	uint32		QkeyViolationCounter;	/* Invalid Qkey counter */
Packit Service 3470d1
	uint16		PkeyViolationCounter;	/* Invalid Pkey counter */
Packit Service 3470d1
	uint8		NumPkeys;				/* Number of Pkeys in the Pkey table */
Packit Service 3470d1
	uint8		NumGIDs;				/* Number of GIDs in the GID table */
Packit Service 3470d1
	IB_PORT_ADDRESS		Address;		/* Port addressing info */
Packit Service 3470d1
	uint8		ActiveWidth:2;			/* IB_PORT_WIDTH enum */
Packit Service 3470d1
	uint8		ActiveSpeed:3;			/* IB_PORT_SPEED enum */
Packit Service 3470d1
	uint8		Reserved:3;
Packit Service 3470d1
	IB_PORT_SM_ADDRESS	SMAddress;		/* SM info for the port */
Packit Service 3470d1
Packit Service 3470d1
	uint8	SubnetTimeout;		/* Specifies the maximum expected subnet  */
Packit Service 3470d1
								/* propagation delay, which depends upon the  */
Packit Service 3470d1
								/* configuration of the switches, to reach any  */
Packit Service 3470d1
								/* port in the subnet and shall also be used to  */
Packit Service 3470d1
								/* determine the maximum rate which SubnTraps()  */
Packit Service 3470d1
								/* can be sent from this port.  */
Packit Service 3470d1
								/* The duration of time is calculated based on  */
Packit Service 3470d1
								/* (4.096 uS * 2^SubnetTimeOut) */
Packit Service 3470d1
Packit Service 3470d1
	uint8	RespTimeValue;		/* Specifies the expected maximum time between  */
Packit Service 3470d1
								/* the port reception of a SMP and the  */
Packit Service 3470d1
								/* transmission of the associated response.  */
Packit Service 3470d1
								/* The duration of time is calculated based on  */
Packit Service 3470d1
								/* (4.096 uS * 2^RespTimeValue).  */
Packit Service 3470d1
								/* The default value shall be 8. */
Packit Service 3470d1
	uint32	NeighborMTU;		/* Maximum Transfer Unit (packet size) */
Packit Service 3470d1
								/* which has been configured between this */
Packit Service 3470d1
								/* port and the neighbor port */
Packit Service 3470d1
								/* represented in bytes (256, 512, ... 4096) */
Packit Service 3470d1
	uint32	MaxMTU;				/* Maximum Transfer Unit supported */
Packit Service 3470d1
								/* (packet size) from MTUCap */
Packit Service 3470d1
								/* represented in bytes (256, 512, ... 4096) */
Packit Service 3470d1
	uint64	MaxMessageLen;		/* Maximum message length */
Packit Service 3470d1
	/* add new fields here to ensure binary compatibility with existing code */
Packit Service 3470d1
Packit Service 3470d1
	/* */
Packit Service 3470d1
	/* The GID and Pkey tables are located here at the end of the port */
Packit Service 3470d1
	/* attributes structure. The caller must allocate the space to hold the */
Packit Service 3470d1
	/* tables at the end of this structure. The size indicated in */
Packit Service 3470d1
	/* PortAttributesListSize will be used to determine the number of port */
Packit Service 3470d1
	/* attributes structures that may be returned. */
Packit Service 3470d1
	/* */
Packit Service 3470d1
} IB_PORT_ATTRIBUTES;
Packit Service 3470d1
Packit Service 3470d1
/* Page size is 2K * 2^bit_position */
Packit Service 3470d1
#define IB_MR_PAGESIZE_MIN_LOG2	11
Packit Service 3470d1
#define IB_MR_PAGESIZE_MIN	2048
Packit Service 3470d1
#define IB_MR_PAGESIZE_2K	0x000000001U
Packit Service 3470d1
#define IB_MR_PAGESIZE_4K	0x000000002U
Packit Service 3470d1
#define IB_MR_PAGESIZE_8K	0x000000004U
Packit Service 3470d1
#define IB_MR_PAGESIZE_16K	0x000000008U
Packit Service 3470d1
#define IB_MR_PAGESIZE_32K	0x000000010U
Packit Service 3470d1
#define IB_MR_PAGESIZE_64K	0x000000020U
Packit Service 3470d1
#define IB_MR_PAGESIZE_128K	0x000000040U
Packit Service 3470d1
#define IB_MR_PAGESIZE_256K	0x000000080U
Packit Service 3470d1
#define IB_MR_PAGESIZE_512K	0x000000100U
Packit Service 3470d1
#define IB_MR_PAGESIZE_1M	0x000000200U
Packit Service 3470d1
#define IB_MR_PAGESIZE_2M	0x000000400U
Packit Service 3470d1
#define IB_MR_PAGESIZE_4M	0x000000800U
Packit Service 3470d1
#define IB_MR_PAGESIZE_8M	0x000001000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_16M	0x000002000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_32M	0x000004000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_64M	0x000008000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_128M	0x000010000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_256M	0x000020000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_512M	0x000040000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_1G	0x000080000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_2G	0x000100000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_4G	0x000200000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_8G	0x000400000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_16G	0x000800000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_32G	0x001000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_64G	0x002000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_128G	0x004000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_256G	0x008000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_512G	0x010000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_1T	0x020000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_2T	0x040000000U
Packit Service 3470d1
#define IB_MR_PAGESIZE_4T	0x080000000U
Packit Service 3470d1
Packit Service 3470d1
typedef uint32 IB_MR_PAGESIZES;
Packit Service 3470d1
Packit Service 3470d1
typedef enum _IB_CA_CAPABILITIES {
Packit Service 3470d1
	CA_IS_SYSTEM_IMAGE_GUID_SUPPORTED		= 0x00000001U,
Packit Service 3470d1
	CA_IS_INIT_TYPE_SUPPORTED				= 0x00000002U,	/* TBD ReInit? */
Packit Service 3470d1
	CA_IS_PORT_ACTIVE_EVENT_SUPPORTED		= 0x00000004U,
Packit Service 3470d1
	CA_IS_RNR_NAK_SUPPORTED					= 0x00000008U,
Packit Service 3470d1
	CA_IS_AV_PORT_CHECK_SUPPORTED			= 0x00000010U,
Packit Service 3470d1
	CA_IS_RC_PORT_CHANGE_SUPPORTED			= 0x00000020U,
Packit Service 3470d1
	CA_IS_QP_MODIFY_NO_TRANSITION_SUPPORTED	= 0x00000040U,
Packit Service 3470d1
	CA_IS_PKEY_VIOLATION_COUNTER_SUPPORTED	= 0x00000080U,
Packit Service 3470d1
	CA_IS_QKEY_VIOLATION_COUNTER_SUPPORTED	= 0x00000100U,
Packit Service 3470d1
	CA_IS_MODIFY_QDEPTH_SUPPORTED			= 0x00000200U,
Packit Service 3470d1
	CA_IS_RAW_MULTICAST_SUPPORTED			= 0x00000400U,
Packit Service 3470d1
	CA_IS_PORT_SHUTDOWN_SUPPORTED			= 0x00000800U,
Packit Service 3470d1
    CA_IS_ENHANCED_SWITCH_PORT0             = 0x00001000U,
Packit Service 3470d1
    CA_IS_UNSIGNALED_RECV_SUPPORTED         = 0x00002000U,
Packit Service 3470d1
		/* AV not used by hardware after iba_post_send */
Packit Service 3470d1
    CA_IS_AV_SOFT			         		= 0x00004000U
Packit Service 3470d1
} IB_CA_CAPABILITIES;
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Channel Adapter Attributes
Packit Service 3470d1
 */
Packit Service 3470d1
typedef struct _IB_CA_ATTRIBUTES {
Packit Service 3470d1
	EUI64		GUID;
Packit Service 3470d1
	EUI64		SystemImageGuid;
Packit Service 3470d1
	uint32		VendorId;
Packit Service 3470d1
	uint16		DeviceId;
Packit Service 3470d1
	uint16		DeviceRevision;
Packit Service 3470d1
	uint32		QueuePairs;			/* Number of QPs */
Packit Service 3470d1
	uint32		WorkReqs;			/* Max outstanding WRs permitted on any WQ */
Packit Service 3470d1
	uint32		DSListDepth;		/* Max depth of scatter/gather list on a WR */
Packit Service 3470d1
	uint32		RDDSListDepth;		/* Max depth of scatter list on an RD RQ WR */
Packit Service 3470d1
	uint32		CompletionQueues;	/* Number of CQs */
Packit Service 3470d1
	uint32		WorkCompletions;	/* Max number of WC/CQE per CQ */
Packit Service 3470d1
	uint32		MemoryRegions;		/* Max number of Memory Regions */
Packit Service 3470d1
	uint8		NodeType;
Packit Service 3470d1
	uint8		Reserved10;
Packit Service 3470d1
	uint16		Reserved11;
Packit Service 3470d1
	uint64		MemRegionSize;		/* Max size of a Memory Region */
Packit Service 3470d1
	uint32		MemoryWindows;		/* Max number of Memory Windows */
Packit Service 3470d1
	uint32		ProtectionDomains;	/* Number of Protection Domains */
Packit Service 3470d1
	uint32		RDDomains;			/* Number of Reliable Datagram Domains */
Packit Service 3470d1
	IB_MR_PAGESIZES	MemRegionPageSizes;	/* The page sizes supported by the CA */
Packit Service 3470d1
										/* memory management subsystem. */
Packit Service 3470d1
	uint32		Ports;				/* Number of ports */
Packit Service 3470d1
	uint32		Partitions;			/* Maximum number of partitions */
Packit Service 3470d1
	uint32		MaxMTU;				/* smallest of MaxMtu values for */
Packit Service 3470d1
									/* all ports on CA */
Packit Service 3470d1
									/* represented in bytes (256, 512, ... 4096) */
Packit Service 3470d1
	uint64		MaxMessageLen;		/* smallest of MaxMessageLen for all */
Packit Service 3470d1
									/* ports on CA */
Packit Service 3470d1
	IB_CA_CAPABILITIES	Capabilities;	/* optional capabilities */
Packit Service 3470d1
	IB_CA_ATOMIC_LVL	AtomicityLevel;	/* Support level for atomic operations */
Packit Service 3470d1
	uint8		LocalCaAckDelay;	/* time for local CA to respond to */
Packit Service 3470d1
									/* an inbound transport layer ACK or NAK */
Packit Service 3470d1
									/* in 4.096*2^n usec units */
Packit Service 3470d1
	uint8		MaxQPInitiatorDepth;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per QP as a requestor/initiator */
Packit Service 3470d1
	uint8		MaxEECInitiatorDepth;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per EEC as a requestor/initiator */
Packit Service 3470d1
	uint8		MaxQPResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per QP as a responder */
Packit Service 3470d1
	uint8		MaxEECResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per EEC as a responder */
Packit Service 3470d1
	uint8		Reserved1;
Packit Service 3470d1
	uint16		MaxRearmNumWC;		/* Maximum value for NumWC argument */
Packit Service 3470d1
									/* in iba_rearm_n_cq.  If this value is 1 */
Packit Service 3470d1
									/* then the CA does not support coallesing */
Packit Service 3470d1
									/* completions and iba_rearm_n_cq is */
Packit Service 3470d1
									/* functionally the same as */
Packit Service 3470d1
									/* iba_rearm_cq(...,CQEventSelNextWC) */
Packit Service 3470d1
	uint32		MaxCAResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per CA as a responder */
Packit Service 3470d1
	uint32		EEContexts;			/* Max number of EE contexts */
Packit Service 3470d1
	uint32		IPv6QPs;			/* Max number of Raw IPv6 Datagram QPs */
Packit Service 3470d1
	uint32		EthertypeQPs;		/* Max number of Raw Ethertype Datagram QPs */
Packit Service 3470d1
	uint32		MCastGroups;		/* Max number of multicast groups */
Packit Service 3470d1
	uint32		MCastQPs;			/* Max number of QPs which may be attached */
Packit Service 3470d1
									/* to multicast groups. */
Packit Service 3470d1
	uint32		MCastGroupQPs;		/* Max number of QPs per multicast group */
Packit Service 3470d1
	uint32		AddressVectors;		/* Max number of AVs which may be created */
Packit Service 3470d1
	IB_CA_PATH_MIGRATION_LVL	PathMigrationLevel;	/* Support level for */
Packit Service 3470d1
											/* failover/migration mechanisms. */
Packit Service 3470d1
	/* The PortAttributesList may be null. If not null the size in bytes of */
Packit Service 3470d1
	/* the buffer pointed to by PortAttributesList must be given in */
Packit Service 3470d1
	/* PortAttributeListSize. If PortAttributesList is null, the size in bytes */
Packit Service 3470d1
	/* of the area needed to hold the attributes information for all ports is */
Packit Service 3470d1
	/* returned. */
Packit Service 3470d1
	uint32				PortAttributesListSize;
Packit Service 3470d1
	IB_PORT_ATTRIBUTES	*PortAttributesList;
Packit Service 3470d1
} IB_CA_ATTRIBUTES;
Packit Service 3470d1
Packit Service 3470d1
/*
Packit Service 3470d1
 * Update of IB_CA_ATTRIBUTES. NOTE: The structure is identical to 
Packit Service 3470d1
 * IB_CA_ATTRIBUTES, but adds new fields to the end.
Packit Service 3470d1
 */
Packit Service 3470d1
typedef struct _IB_CA_ATTRIBUTES2 {
Packit Service 3470d1
	EUI64		GUID;
Packit Service 3470d1
	EUI64		SystemImageGuid;
Packit Service 3470d1
	uint32		VendorId;
Packit Service 3470d1
	uint16		DeviceId;
Packit Service 3470d1
	uint16		DeviceRevision;
Packit Service 3470d1
	uint32		QueuePairs;			/* Number of QPs */
Packit Service 3470d1
	uint32		WorkReqs;			/* Max outstanding WRs permitted on any WQ */
Packit Service 3470d1
	uint32		DSListDepth;		/* Max depth of scatter/gather list on a WR */
Packit Service 3470d1
	uint32		RDDSListDepth;		/* Max depth of scatter list on an RD RQ WR */
Packit Service 3470d1
	uint32		CompletionQueues;	/* Number of CQs */
Packit Service 3470d1
	uint32		WorkCompletions;	/* Max number of WC/CQE per CQ */
Packit Service 3470d1
	uint32		MemoryRegions;		/* Max number of Memory Regions */
Packit Service 3470d1
	uint8		NodeType;
Packit Service 3470d1
	uint8		Reserved10;
Packit Service 3470d1
	uint16		Reserved11;
Packit Service 3470d1
	uint64		MemRegionSize;		/* Max size of a Memory Region */
Packit Service 3470d1
	uint32		MemoryWindows;		/* Max number of Memory Windows */
Packit Service 3470d1
	uint32		ProtectionDomains;	/* Number of Protection Domains */
Packit Service 3470d1
	uint32		RDDomains;			/* Number of Reliable Datagram Domains */
Packit Service 3470d1
	IB_MR_PAGESIZES	MemRegionPageSizes;	/* The page sizes supported by the CA */
Packit Service 3470d1
										/* memory management subsystem. */
Packit Service 3470d1
	uint32		Ports;				/* Number of ports */
Packit Service 3470d1
	uint32		Partitions;			/* Maximum number of partitions */
Packit Service 3470d1
	uint32		MaxMTU;				/* smallest of MaxMtu values for */
Packit Service 3470d1
									/* all ports on CA */
Packit Service 3470d1
									/* represented in bytes (256, 512, ... 4096) */
Packit Service 3470d1
	uint64		MaxMessageLen;		/* smallest of MaxMessageLen for all */
Packit Service 3470d1
									/* ports on CA */
Packit Service 3470d1
	IB_CA_CAPABILITIES	Capabilities;	/* optional capabilities */
Packit Service 3470d1
	IB_CA_ATOMIC_LVL	AtomicityLevel;	/* Support level for atomic operations */
Packit Service 3470d1
	uint8		LocalCaAckDelay;	/* time for local CA to respond to */
Packit Service 3470d1
									/* an inbound transport layer ACK or NAK */
Packit Service 3470d1
									/* in 4.096*2^n usec units */
Packit Service 3470d1
	uint8		MaxQPInitiatorDepth;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per QP as a requestor/initiator */
Packit Service 3470d1
	uint8		MaxEECInitiatorDepth;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per EEC as a requestor/initiator */
Packit Service 3470d1
	uint8		MaxQPResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per QP as a responder */
Packit Service 3470d1
	uint8		MaxEECResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per EEC as a responder */
Packit Service 3470d1
	uint8		Reserved1;
Packit Service 3470d1
	uint16		MaxRearmNumWC;		/* Maximum value for NumWC argument */
Packit Service 3470d1
									/* in iba_rearm_n_cq.  If this value is 1 */
Packit Service 3470d1
									/* then the CA does not support coallesing */
Packit Service 3470d1
									/* completions and iba_rearm_n_cq is */
Packit Service 3470d1
									/* functionally the same as */
Packit Service 3470d1
									/* iba_rearm_cq(...,CQEventSelNextWC) */
Packit Service 3470d1
	uint32		MaxCAResponderResources;	/* Maximum number of RDMA reads */
Packit Service 3470d1
									/* & Atomic Ops which can be outstanding */
Packit Service 3470d1
									/* per CA as a responder */
Packit Service 3470d1
	uint32		EEContexts;			/* Max number of EE contexts */
Packit Service 3470d1
	uint32		IPv6QPs;			/* Max number of Raw IPv6 Datagram QPs */
Packit Service 3470d1
	uint32		EthertypeQPs;		/* Max number of Raw Ethertype Datagram QPs */
Packit Service 3470d1
	uint32		MCastGroups;		/* Max number of multicast groups */
Packit Service 3470d1
	uint32		MCastQPs;			/* Max number of QPs which may be attached */
Packit Service 3470d1
									/* to multicast groups. */
Packit Service 3470d1
	uint32		MCastGroupQPs;		/* Max number of QPs per multicast group */
Packit Service 3470d1
	uint32		AddressVectors;		/* Max number of AVs which may be created */
Packit Service 3470d1
	IB_CA_PATH_MIGRATION_LVL	PathMigrationLevel;	/* Support level for */
Packit Service 3470d1
											/* failover/migration mechanisms. */
Packit Service 3470d1
	/* The PortAttributesList may be null. If not null the size in bytes of */
Packit Service 3470d1
	/* the buffer pointed to by PortAttributesList must be given in */
Packit Service 3470d1
	/* PortAttributeListSize. If PortAttributesList is null, the size in bytes */
Packit Service 3470d1
	/* of the area needed to hold the attributes information for all ports is */
Packit Service 3470d1
	/* returned. */
Packit Service 3470d1
	uint32		PortAttributesListSize;
Packit Service 3470d1
	IB_PORT_ATTRIBUTES	*PortAttributesList;
Packit Service 3470d1
Packit Service 3470d1
	/* The PciDevice is provided to aid DMA mapping by kernel mode ULPs
Packit Service 3470d1
	 * Use of this pointer must be done with care.  The pointer cannot
Packit Service 3470d1
	 * be used after the CA has been closed.  NULL is returned for user space.
Packit Service 3470d1
	 */
Packit Service 3470d1
#if defined(VXWORKS)
Packit Service 3470d1
	struct _PCI_DEVICE*	PciDevice;
Packit Service 3470d1
#else
Packit Service 3470d1
	void*		PciDevice;
Packit Service 3470d1
#endif
Packit Service 3470d1
Packit Service 3470d1
	/* Extra attributes: reserved for future expansion. */
Packit Service 3470d1
	uint64		Reserved2;
Packit Service 3470d1
	uint64		Reserved3;
Packit Service 3470d1
	uint64		Reserved4;
Packit Service 3470d1
	uint64		Reserved5;
Packit Service 3470d1
	uint64		Reserved6;
Packit Service 3470d1
	uint64		Reserved7;
Packit Service 3470d1
	uint64		Reserved8;
Packit Service 3470d1
	uint64		Reserved9;
Packit Service 3470d1
} IB_CA_ATTRIBUTES2;
Packit Service 3470d1
Packit Service 3470d1
/* version of IbAccess stack itself, used to verify UVCA matches kernel stack
Packit Service 3470d1
 * version
Packit Service 3470d1
 */
Packit Service 3470d1
typedef enum {
Packit Service 3470d1
	IBT_VERSION_NONE = 0,
Packit Service 3470d1
	IBT_VERSION_LATEST = 5
Packit Service 3470d1
} IBT_VERSION;
Packit Service 3470d1
Packit Service 3470d1
#ifdef __cplusplus
Packit Service 3470d1
};
Packit Service 3470d1
#endif
Packit Service 3470d1
Packit Service 3470d1
#endif /* _IBA_IB_TYPES_H_ */