10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 59879SRamaswamy.Tummala@Sun.COM * Common Development and Distribution License (the "License"). 69879SRamaswamy.Tummala@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 229879SRamaswamy.Tummala@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_IB_IBNEX_IBNEX_DEVCTL_H 270Sstevel@tonic-gate #define _SYS_IB_IBNEX_IBNEX_DEVCTL_H 280Sstevel@tonic-gate 299879SRamaswamy.Tummala@Sun.COM #include <sys/ib/ib_types.h> 309879SRamaswamy.Tummala@Sun.COM #include <sys/ib/ibtl/ibtl_types.h> 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 360Sstevel@tonic-gate /* 370Sstevel@tonic-gate * This file contains info for devctls issued by IB cfgadm plugin. 380Sstevel@tonic-gate * The only devctl of interest is DEVCTL_AP_CONTROL which uses 390Sstevel@tonic-gate * these defines and data structures. 400Sstevel@tonic-gate */ 410Sstevel@tonic-gate 420Sstevel@tonic-gate #define IBNEX_HCAGUID_STRSZ 17 430Sstevel@tonic-gate 440Sstevel@tonic-gate /* 450Sstevel@tonic-gate * types of attachment point Identifiers (APID)s supported 460Sstevel@tonic-gate */ 470Sstevel@tonic-gate #define IBNEX_BASE_APID 0x01 /* Base static attachment point */ 480Sstevel@tonic-gate #define IBNEX_HCA_APID 0x02 /* HCA static attachment point */ 490Sstevel@tonic-gate #define IBNEX_DYN_APID 0x04 /* Dynamic IOC/DLPI attachment point */ 500Sstevel@tonic-gate #define IBNEX_UNKNOWN_APID 0x08 /* Unknown attachment point */ 510Sstevel@tonic-gate 520Sstevel@tonic-gate 530Sstevel@tonic-gate /* defines for dynamic APID handling */ 540Sstevel@tonic-gate #define DYN_SEP "::" 550Sstevel@tonic-gate #define GET_DYN(a) (((a) != NULL) ? strstr((a), DYN_SEP) : (void *)0) 560Sstevel@tonic-gate 570Sstevel@tonic-gate #define IBNEX_FABRIC "fabric" 580Sstevel@tonic-gate #define IBNEX_VPPA_STR "vppa" 590Sstevel@tonic-gate #define IBNEX_PORT_STR "port" 600Sstevel@tonic-gate #define IBNEX_HCASVC_STR "hca-svc" 610Sstevel@tonic-gate 620Sstevel@tonic-gate /* Enums while reading ib.conf file */ 630Sstevel@tonic-gate typedef enum ib_service_type_e { 640Sstevel@tonic-gate IB_NAME, /* name = */ 650Sstevel@tonic-gate IB_CLASS, /* class = */ 660Sstevel@tonic-gate IB_PORT_SERVICE, /* port-svc-list = */ 670Sstevel@tonic-gate IB_VPPA_SERVICE, /* vppa-svc-list = */ 680Sstevel@tonic-gate IB_HCASVC_SERVICE, /* hca-svc-list = */ 690Sstevel@tonic-gate IB_NONE 700Sstevel@tonic-gate } ib_service_type_t; 710Sstevel@tonic-gate 720Sstevel@tonic-gate /* 730Sstevel@tonic-gate * defines for nvlist types: (for PORT devices and IOCs) 740Sstevel@tonic-gate * The first 6 are common to both IOC and PORT devices. 750Sstevel@tonic-gate * The last 9 are used only for IOC devices. 760Sstevel@tonic-gate */ 770Sstevel@tonic-gate #define IBNEX_NODE_INFO_NVL "node_info" 780Sstevel@tonic-gate #define IBNEX_NODE_APID_NVL "node_apid" 790Sstevel@tonic-gate #define IBNEX_NODE_TYPE_NVL "node_type" 800Sstevel@tonic-gate #define IBNEX_NODE_RSTATE_NVL "node_rstate" 810Sstevel@tonic-gate #define IBNEX_NODE_OSTATE_NVL "node_ostate" 820Sstevel@tonic-gate #define IBNEX_NODE_COND_NVL "node_condition" 830Sstevel@tonic-gate 840Sstevel@tonic-gate /* 850Sstevel@tonic-gate * This flag is passed from cfgadm to ib(7d) to convey that it 860Sstevel@tonic-gate * need not attempt to probe the fabric. 870Sstevel@tonic-gate * 880Sstevel@tonic-gate * The value of these flags should be same as flags in enum 890Sstevel@tonic-gate * ibdm_ibnex_get_ioclist_mtd_t. 900Sstevel@tonic-gate */ 910Sstevel@tonic-gate #define IBNEX_DONOT_PROBE_FLAG 1 920Sstevel@tonic-gate #define IBNEX_NORMAL_PROBE 0 /* flag used by ib(7d) only */ 930Sstevel@tonic-gate 940Sstevel@tonic-gate /* 950Sstevel@tonic-gate * The following are sub-commands to DEVCTL_AP_CONTROL. 960Sstevel@tonic-gate * NOTE: IBNEX_NUM_DEVICE_NODES and IBNEX_NUM_HCA_NODES need to be 970Sstevel@tonic-gate * separate. The former is used to figure out the dynamic ap_ids for 980Sstevel@tonic-gate * the IB fabric. The latter is used for a HCA count on a given host only. 990Sstevel@tonic-gate */ 1000Sstevel@tonic-gate #define IBNEX_NUM_DEVICE_NODES 0x00010 /* how many device nodes exist? */ 1010Sstevel@tonic-gate #define IBNEX_NUM_HCA_NODES 0x00020 /* how many HCAs exist in the host? */ 1020Sstevel@tonic-gate #define IBNEX_SNAPSHOT_SIZE 0x00040 /* What is the "snapshot" size? */ 1030Sstevel@tonic-gate #define IBNEX_GET_SNAPSHOT 0x00080 /* Get the actual dynamic "snapshot" */ 1040Sstevel@tonic-gate #define IBNEX_DEVICE_PATH_SZ 0x00100 /* Given APID's device path size */ 1050Sstevel@tonic-gate #define IBNEX_GET_DEVICE_PATH 0x00200 /* Get device path for a Dynamic APID */ 1060Sstevel@tonic-gate #define IBNEX_HCA_LIST_SZ 0x00400 /* -x list_clients size for HCA APID */ 1070Sstevel@tonic-gate #define IBNEX_HCA_LIST_INFO 0x00800 /* -x list_clients info for HCA APID */ 1080Sstevel@tonic-gate #define IBNEX_UNCFG_CLNTS_SZ 0x01000 /* -x unconfig_clients option size */ 1090Sstevel@tonic-gate #define IBNEX_UNCFG_CLNTS_INFO 0x02000 /* -x unconfig_clients option data */ 1100Sstevel@tonic-gate #define IBNEX_UPDATE_PKEY_TBLS 0x04000 /* -x update_pkey_tbls */ 1110Sstevel@tonic-gate #define IBNEX_CONF_ENTRY_ADD 0x08000 /* -x conf_file add_service */ 1120Sstevel@tonic-gate #define IBNEX_CONF_ENTRY_DEL 0x10000 /* -x conf_file delete_service */ 1130Sstevel@tonic-gate #define IBNEX_HCA_VERBOSE_SZ 0x20000 /* -alv hca_apid devctl size */ 1140Sstevel@tonic-gate #define IBNEX_HCA_VERBOSE_INFO 0x40000 /* -alv hca_apid devctl data */ 1150Sstevel@tonic-gate #define IBNEX_UPDATE_IOC_CONF 0x80000 /* -x update_ioc_conf */ 1160Sstevel@tonic-gate 1170Sstevel@tonic-gate /* 1180Sstevel@tonic-gate * Data structure passed back and forth user/kernel w/ DEVCTL_AP_CONTROL 1190Sstevel@tonic-gate * devctl. Note that these are separate structures as some fields are pointers. 1200Sstevel@tonic-gate */ 1210Sstevel@tonic-gate typedef struct ibnex_ioctl_data { 1220Sstevel@tonic-gate uint_t cmd; /* one of the above commands */ 1230Sstevel@tonic-gate caddr_t buf; /* data buffer */ 1240Sstevel@tonic-gate uint_t bufsiz; /* data buffer size */ 1250Sstevel@tonic-gate caddr_t ap_id; /* Search based on this AP_ID name */ 1260Sstevel@tonic-gate uint_t ap_id_len; /* AP_ID name len */ 1270Sstevel@tonic-gate uint_t misc_arg; /* reserved */ 1280Sstevel@tonic-gate } ibnex_ioctl_data_t; 1290Sstevel@tonic-gate 1300Sstevel@tonic-gate 1310Sstevel@tonic-gate /* For 32-bit app/64-bit kernel */ 1320Sstevel@tonic-gate typedef struct ibnex_ioctl_data_32 { 1330Sstevel@tonic-gate uint32_t cmd; /* one of the above commands */ 1340Sstevel@tonic-gate caddr32_t buf; /* data buffer */ 1350Sstevel@tonic-gate uint32_t bufsiz; /* data buffer size */ 1360Sstevel@tonic-gate caddr32_t ap_id; /* Search based on this AP_ID name */ 1370Sstevel@tonic-gate uint32_t ap_id_len; /* AP_ID name len */ 1380Sstevel@tonic-gate uint32_t misc_arg; /* reserved */ 1390Sstevel@tonic-gate } ibnex_ioctl_data_32_t; 1400Sstevel@tonic-gate 1419879SRamaswamy.Tummala@Sun.COM /* 1429879SRamaswamy.Tummala@Sun.COM * General ibnex IOCTLs 1439879SRamaswamy.Tummala@Sun.COM * 1449879SRamaswamy.Tummala@Sun.COM * IBNEX_CTL_GET_API_VER 1459879SRamaswamy.Tummala@Sun.COM * ====================== 1469879SRamaswamy.Tummala@Sun.COM * 1479879SRamaswamy.Tummala@Sun.COM * Gets the version number of the API that IB nexus currently supports. 1489879SRamaswamy.Tummala@Sun.COM * 1499879SRamaswamy.Tummala@Sun.COM * arg - pointer to a structure of type ibnex_ctl_api_ver_t 1509879SRamaswamy.Tummala@Sun.COM * 1519879SRamaswamy.Tummala@Sun.COM * Caller does not set any field of this structure. When this IOCTL is issued, 1529879SRamaswamy.Tummala@Sun.COM * ib nexus will set api_ver_num field to the currently supported API 1539879SRamaswamy.Tummala@Sun.COM * version number. 1549879SRamaswamy.Tummala@Sun.COM * 1559879SRamaswamy.Tummala@Sun.COM * The caller could issue this IOCTL prior to issuing any other general 1569879SRamaswamy.Tummala@Sun.COM * ibnex IOCTLs to detect incompatible changes to the API. The caller may 1579879SRamaswamy.Tummala@Sun.COM * call other IOCTLs only if the api_ver_num matches the API version number 1589879SRamaswamy.Tummala@Sun.COM * used by the caller. 1599879SRamaswamy.Tummala@Sun.COM * 1609879SRamaswamy.Tummala@Sun.COM * 1619879SRamaswamy.Tummala@Sun.COM * IBNEX_CTL_GET_HCA_LIST 1629879SRamaswamy.Tummala@Sun.COM * ====================== 1639879SRamaswamy.Tummala@Sun.COM * 164*10183SRamaswamy.Tummala@Sun.COM * Gets GUIDs of all HCAs in the system 1659879SRamaswamy.Tummala@Sun.COM * 1669879SRamaswamy.Tummala@Sun.COM * arg - pointer to a structure of type ibnex_ctl_get_hca_list_t 1679879SRamaswamy.Tummala@Sun.COM * 1689879SRamaswamy.Tummala@Sun.COM * Caller allocates memory for HCA GUIDs. Sets hca_guids field to point to the 1699879SRamaswamy.Tummala@Sun.COM * allocated memory. Sets hca_guids_alloc_sz to the number of GUIDs for which 1709879SRamaswamy.Tummala@Sun.COM * memory has been allocated. 1719879SRamaswamy.Tummala@Sun.COM * 1729879SRamaswamy.Tummala@Sun.COM * Upon successful return from the IOCTL, nhcas will contain the number of 1739879SRamaswamy.Tummala@Sun.COM * HCAs in the system. HCA GUIDs will be copied into hca_guids array. 1749879SRamaswamy.Tummala@Sun.COM * The number of GUIDs copied are nhcas or hca_guids_alloc_sz which ever is 1759879SRamaswamy.Tummala@Sun.COM * smaller. 1769879SRamaswamy.Tummala@Sun.COM * 1779879SRamaswamy.Tummala@Sun.COM * 1789879SRamaswamy.Tummala@Sun.COM * IBNEX_CTL_QUERY_HCA 1799879SRamaswamy.Tummala@Sun.COM * =================== 1809879SRamaswamy.Tummala@Sun.COM * 1819879SRamaswamy.Tummala@Sun.COM * Query HCA attributes 1829879SRamaswamy.Tummala@Sun.COM * 1839879SRamaswamy.Tummala@Sun.COM * arg - pointer to a structure of type ibnex_ctl_query_hca_t 1849879SRamaswamy.Tummala@Sun.COM * 1859879SRamaswamy.Tummala@Sun.COM * Caller sets hca_guid field of this structure. 1869879SRamaswamy.Tummala@Sun.COM * 18710094SRamaswamy.Tummala@Sun.COM * Caller allocates memory for hca device path. Sets hca_device_path to point 18810094SRamaswamy.Tummala@Sun.COM * to the allocated memory and hca_device_path_alloc_sz to the number of bytes 18910094SRamaswamy.Tummala@Sun.COM * allocated. 19010094SRamaswamy.Tummala@Sun.COM * 1919879SRamaswamy.Tummala@Sun.COM * Upon successful return from the IOCTL, hca_info will contain HCA attributes 19210094SRamaswamy.Tummala@Sun.COM * for the specified GUID. hca_info.hca_device_path_len will contain the actual 193*10183SRamaswamy.Tummala@Sun.COM * string length of the hca device path plus one (for the terminating null 194*10183SRamaswamy.Tummala@Sun.COM * character). hca_info.hca_device_path will point to null terminated hca device 195*10183SRamaswamy.Tummala@Sun.COM * path string if the caller allocated memory for the hca device path is large 19610094SRamaswamy.Tummala@Sun.COM * enough to hold the hca device path and the terminating null character. 19710094SRamaswamy.Tummala@Sun.COM * Otherwise hca_info.hca_device_path will be set to NULL. 1989879SRamaswamy.Tummala@Sun.COM * 1999879SRamaswamy.Tummala@Sun.COM * 2009879SRamaswamy.Tummala@Sun.COM * IBNEX_CTL_QUERY_HCA_PORT 2019879SRamaswamy.Tummala@Sun.COM * ======================== 2029879SRamaswamy.Tummala@Sun.COM * 2039879SRamaswamy.Tummala@Sun.COM * Query HCA port attributes 2049879SRamaswamy.Tummala@Sun.COM * 2059879SRamaswamy.Tummala@Sun.COM * arg - pointer to a structure of type ibnex_ctl_query_hca_port_t 2069879SRamaswamy.Tummala@Sun.COM * 2079879SRamaswamy.Tummala@Sun.COM * Caller sets hca_guid and port_num fields. 2089879SRamaswamy.Tummala@Sun.COM * 2099879SRamaswamy.Tummala@Sun.COM * Caller allocates memory for sgid entries. Sets sgid_tbl to point to 2109879SRamaswamy.Tummala@Sun.COM * the allocated memory and sgid_tbl_alloc_sz to the number of sgid entries 2119879SRamaswamy.Tummala@Sun.COM * for which memory has been allocated. 2129879SRamaswamy.Tummala@Sun.COM * 2139879SRamaswamy.Tummala@Sun.COM * Caller allocates memory for pkey entries. Sets pkey_tbl to point to 2149879SRamaswamy.Tummala@Sun.COM * the allocated memory and pkey_tbl_alloc_sz to the number of pkey entries 2159879SRamaswamy.Tummala@Sun.COM * for which memory has been allocated. 2169879SRamaswamy.Tummala@Sun.COM * 2179879SRamaswamy.Tummala@Sun.COM * Upon successful return from the IOCTL, port_info will contain HCA port 2189879SRamaswamy.Tummala@Sun.COM * attributes for the specified HCA port. port_info.p_sgid_tbl_sz will contain 2199879SRamaswamy.Tummala@Sun.COM * the actual number of sgids associated with this port. port_info.p_pkey_tbl_sz 2209879SRamaswamy.Tummala@Sun.COM * will contain the actual number of pkeys associated with this port. 2219879SRamaswamy.Tummala@Sun.COM * 2229879SRamaswamy.Tummala@Sun.COM * port_info.p_sgid_tbl will point to an array containing sgids. The number of 2239879SRamaswamy.Tummala@Sun.COM * sgids in the array is sgid_tbl_alloc_sz or port_info.p_sgid_tbl_sz 2249879SRamaswamy.Tummala@Sun.COM * whichever is smaller. 2259879SRamaswamy.Tummala@Sun.COM * 2269879SRamaswamy.Tummala@Sun.COM * port_info.p_pkey_tbl will point to an array containing pkeys. The number of 2279879SRamaswamy.Tummala@Sun.COM * pkeys in the array is pkey_tbl_alloc_sz or port_info.p_pkey_tbl_sz 2289879SRamaswamy.Tummala@Sun.COM * whichever is smaller. 229*10183SRamaswamy.Tummala@Sun.COM * 230*10183SRamaswamy.Tummala@Sun.COM * Error numbers for the above ioctls upon failure: 231*10183SRamaswamy.Tummala@Sun.COM * EINVAL Invalid parameter passed 232*10183SRamaswamy.Tummala@Sun.COM * EFAULT A fault occurred copying data to or from the user space 233*10183SRamaswamy.Tummala@Sun.COM * to the kernel space. 234*10183SRamaswamy.Tummala@Sun.COM * ENXIO Specified HCA GUID does not exist 235*10183SRamaswamy.Tummala@Sun.COM * ENOENT Specified HCA port does not exist 236*10183SRamaswamy.Tummala@Sun.COM * 2379879SRamaswamy.Tummala@Sun.COM */ 2389879SRamaswamy.Tummala@Sun.COM 2399879SRamaswamy.Tummala@Sun.COM 2409879SRamaswamy.Tummala@Sun.COM /* 2419879SRamaswamy.Tummala@Sun.COM * ibnex specific ioctls 2429879SRamaswamy.Tummala@Sun.COM * 2439879SRamaswamy.Tummala@Sun.COM * NOTE: The ioctl codes should not collide with generic devctl ioctls 2449879SRamaswamy.Tummala@Sun.COM * such as DEVCTL_AP_CONFIGURE. 2459879SRamaswamy.Tummala@Sun.COM */ 2469879SRamaswamy.Tummala@Sun.COM #define IBNEX_IOC (1 << 16) 2479879SRamaswamy.Tummala@Sun.COM #define IBNEX_CTL_GET_API_VER (IBNEX_IOC + 1) /* Get API version # */ 2489879SRamaswamy.Tummala@Sun.COM #define IBNEX_CTL_GET_HCA_LIST (IBNEX_IOC + 2) /* Get HCA GUID list */ 2499879SRamaswamy.Tummala@Sun.COM #define IBNEX_CTL_QUERY_HCA (IBNEX_IOC + 3) /* Query HCA attributes */ 2509879SRamaswamy.Tummala@Sun.COM #define IBNEX_CTL_QUERY_HCA_PORT (IBNEX_IOC + 4) /* Query HCA port attributes */ 2519879SRamaswamy.Tummala@Sun.COM 2529879SRamaswamy.Tummala@Sun.COM /* 2539879SRamaswamy.Tummala@Sun.COM * The device to open for issuing ibnex IOCTLs 2549879SRamaswamy.Tummala@Sun.COM */ 2559879SRamaswamy.Tummala@Sun.COM #define IBNEX_DEVCTL_DEV "/devices/ib:devctl" 2569879SRamaswamy.Tummala@Sun.COM 2579879SRamaswamy.Tummala@Sun.COM /* 2589879SRamaswamy.Tummala@Sun.COM * ibnex IOCTL API version number - to be incremented when making an 2599879SRamaswamy.Tummala@Sun.COM * incompatible change to the API. 2609879SRamaswamy.Tummala@Sun.COM */ 2619879SRamaswamy.Tummala@Sun.COM #define IBNEX_CTL_API_VERSION 1 2629879SRamaswamy.Tummala@Sun.COM 2639879SRamaswamy.Tummala@Sun.COM #define MAX_HCA_DRVNAME_LEN 16 2649879SRamaswamy.Tummala@Sun.COM 2659879SRamaswamy.Tummala@Sun.COM /* 2669879SRamaswamy.Tummala@Sun.COM * Data structure for IBNEX_CTL_GET_API_VER 2679879SRamaswamy.Tummala@Sun.COM */ 2689879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_api_ver_s { 2699879SRamaswamy.Tummala@Sun.COM uint_t api_ver_num; /* out: supported API version */ 2709879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_api_ver_t; 2719879SRamaswamy.Tummala@Sun.COM 2729879SRamaswamy.Tummala@Sun.COM /* 2739879SRamaswamy.Tummala@Sun.COM * Data structure for IBNEX_CTL_GET_HCA_LIST 2749879SRamaswamy.Tummala@Sun.COM */ 2759879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_get_hca_list_s { 2769879SRamaswamy.Tummala@Sun.COM ib_guid_t *hca_guids; /* in/out: HCA GUID array */ 2779879SRamaswamy.Tummala@Sun.COM uint_t hca_guids_alloc_sz; /* in: # of HCA GUIDs for */ 2789879SRamaswamy.Tummala@Sun.COM /* which storage is allocated */ 2799879SRamaswamy.Tummala@Sun.COM uint_t nhcas; /* out: actual number of HCAs */ 2809879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_get_hca_list_t; 2819879SRamaswamy.Tummala@Sun.COM 2829879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_get_hca_list_32_s { 2839879SRamaswamy.Tummala@Sun.COM caddr32_t hca_guids; /* in/out: HCA GUID array */ 2849879SRamaswamy.Tummala@Sun.COM uint_t hca_guids_alloc_sz; /* in: # of HCA GUIDs for */ 2859879SRamaswamy.Tummala@Sun.COM /* which storage is allocated */ 2869879SRamaswamy.Tummala@Sun.COM uint_t nhcas; /* out: actual number of HCAs */ 2879879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_get_hca_list_32_t; 2889879SRamaswamy.Tummala@Sun.COM 2899879SRamaswamy.Tummala@Sun.COM /* 2909879SRamaswamy.Tummala@Sun.COM * HCA information structure 2919879SRamaswamy.Tummala@Sun.COM */ 2929879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_hca_info_s { 2939879SRamaswamy.Tummala@Sun.COM ib_guid_t hca_node_guid; /* Node GUID */ 2949879SRamaswamy.Tummala@Sun.COM ib_guid_t hca_si_guid; /* Optional System Image GUID */ 2959879SRamaswamy.Tummala@Sun.COM uint_t hca_nports; /* Number of physical ports */ 2969879SRamaswamy.Tummala@Sun.COM 2979879SRamaswamy.Tummala@Sun.COM /* HCA driver name and instance number */ 2989879SRamaswamy.Tummala@Sun.COM char hca_driver_name[MAX_HCA_DRVNAME_LEN]; 2999879SRamaswamy.Tummala@Sun.COM int hca_driver_instance; 3009879SRamaswamy.Tummala@Sun.COM 30110094SRamaswamy.Tummala@Sun.COM /* 30210094SRamaswamy.Tummala@Sun.COM * hca device path and the length. 303*10183SRamaswamy.Tummala@Sun.COM * hca_device_path_len contains the string length of the actual hca 304*10183SRamaswamy.Tummala@Sun.COM * device path plus one (for the terminating null character). 30510094SRamaswamy.Tummala@Sun.COM */ 30610094SRamaswamy.Tummala@Sun.COM char *hca_device_path; 30710094SRamaswamy.Tummala@Sun.COM uint_t hca_device_path_len; 30810094SRamaswamy.Tummala@Sun.COM 3099879SRamaswamy.Tummala@Sun.COM ibt_hca_flags_t hca_flags; /* HCA capabilities etc */ 3109879SRamaswamy.Tummala@Sun.COM ibt_hca_flags2_t hca_flags2; /* HCA capabilities etc */ 3119879SRamaswamy.Tummala@Sun.COM 3129879SRamaswamy.Tummala@Sun.COM uint32_t hca_vendor_id; /* Vendor ID */ 3139879SRamaswamy.Tummala@Sun.COM uint16_t hca_device_id; /* Device ID */ 3149879SRamaswamy.Tummala@Sun.COM uint32_t hca_version_id; /* Version ID */ 3159879SRamaswamy.Tummala@Sun.COM 3169879SRamaswamy.Tummala@Sun.COM uint_t hca_max_chans; /* Max channels supported */ 3179879SRamaswamy.Tummala@Sun.COM uint_t hca_max_chan_sz; /* Max outstanding WRs on any */ 3189879SRamaswamy.Tummala@Sun.COM /* channel */ 3199879SRamaswamy.Tummala@Sun.COM 3209879SRamaswamy.Tummala@Sun.COM uint_t hca_max_sgl; /* Max SGL entries per WR */ 3219879SRamaswamy.Tummala@Sun.COM 3229879SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq; /* Max num of CQs supported */ 3239879SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_sz; /* Max capacity of each CQ */ 3249879SRamaswamy.Tummala@Sun.COM 3259879SRamaswamy.Tummala@Sun.COM ibt_page_sizes_t hca_page_sz; /* Bit mask of page sizes */ 3269879SRamaswamy.Tummala@Sun.COM 3279879SRamaswamy.Tummala@Sun.COM uint_t hca_max_memr; /* Max num of HCA mem regions */ 3289879SRamaswamy.Tummala@Sun.COM ib_memlen_t hca_max_memr_len; /* Largest block, in bytes of */ 3299879SRamaswamy.Tummala@Sun.COM /* mem that can be registered */ 3309879SRamaswamy.Tummala@Sun.COM uint_t hca_max_mem_win; /* Max Memory windows in HCA */ 3319879SRamaswamy.Tummala@Sun.COM 3329879SRamaswamy.Tummala@Sun.COM uint_t hca_max_rsc; /* Max Responder Resources of */ 3339879SRamaswamy.Tummala@Sun.COM /* this HCA for RDMAR/Atomics */ 3349879SRamaswamy.Tummala@Sun.COM /* with this HCA as target. */ 3359879SRamaswamy.Tummala@Sun.COM uint8_t hca_max_rdma_in_chan; /* Max RDMAR/Atomics in per */ 3369879SRamaswamy.Tummala@Sun.COM /* chan this HCA as target. */ 3379879SRamaswamy.Tummala@Sun.COM uint8_t hca_max_rdma_out_chan; /* Max RDMA Reads/Atomics out */ 3389879SRamaswamy.Tummala@Sun.COM /* per channel by this HCA */ 3399879SRamaswamy.Tummala@Sun.COM uint_t hca_max_ipv6_chan; /* Max IPV6 channels in HCA */ 3409879SRamaswamy.Tummala@Sun.COM uint_t hca_max_ether_chan; /* Max Ether channels in HCA */ 3419879SRamaswamy.Tummala@Sun.COM 3429879SRamaswamy.Tummala@Sun.COM uint_t hca_max_mcg_chans; /* Max number of channels */ 3439879SRamaswamy.Tummala@Sun.COM /* that can join multicast */ 3449879SRamaswamy.Tummala@Sun.COM /* groups */ 3459879SRamaswamy.Tummala@Sun.COM uint_t hca_max_mcg; /* Max multicast groups */ 3469879SRamaswamy.Tummala@Sun.COM uint_t hca_max_chan_per_mcg; /* Max number of channels per */ 3479879SRamaswamy.Tummala@Sun.COM /* Multicast group in HCA */ 3489879SRamaswamy.Tummala@Sun.COM uint16_t hca_max_partitions; /* Max partitions in HCA */ 3499879SRamaswamy.Tummala@Sun.COM 3509879SRamaswamy.Tummala@Sun.COM ib_time_t hca_local_ack_delay; 3519879SRamaswamy.Tummala@Sun.COM 3529879SRamaswamy.Tummala@Sun.COM uint_t hca_max_port_sgid_tbl_sz; 3539879SRamaswamy.Tummala@Sun.COM uint16_t hca_max_port_pkey_tbl_sz; 3549879SRamaswamy.Tummala@Sun.COM uint_t hca_max_pd; /* Max# of Protection Domains */ 3559879SRamaswamy.Tummala@Sun.COM 3569879SRamaswamy.Tummala@Sun.COM uint_t hca_max_ud_dest; 3579879SRamaswamy.Tummala@Sun.COM uint_t hca_max_srqs; /* Max SRQs supported */ 3589879SRamaswamy.Tummala@Sun.COM uint_t hca_max_srqs_sz; /* Max outstanding WRs on any */ 3599879SRamaswamy.Tummala@Sun.COM /* SRQ */ 3609879SRamaswamy.Tummala@Sun.COM uint_t hca_max_srq_sgl; /* Max SGL entries per SRQ WR */ 3619879SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_handlers; 3629879SRamaswamy.Tummala@Sun.COM ibt_lkey_t hca_reserved_lkey; /* Reserved L_Key value */ 3639879SRamaswamy.Tummala@Sun.COM uint_t hca_max_fmrs; /* Max FMR Supported */ 3649879SRamaswamy.Tummala@Sun.COM 3659879SRamaswamy.Tummala@Sun.COM uint_t hca_max_lso_size; 3669879SRamaswamy.Tummala@Sun.COM uint_t hca_max_lso_hdr_size; 3679879SRamaswamy.Tummala@Sun.COM uint_t hca_max_inline_size; 3689879SRamaswamy.Tummala@Sun.COM 3699879SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_mod_count; /* CQ notify moderation */ 3709879SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_mod_usec; 3719879SRamaswamy.Tummala@Sun.COM 3729879SRamaswamy.Tummala@Sun.COM uint32_t hca_fw_major_version; /* firmware version */ 3739879SRamaswamy.Tummala@Sun.COM uint16_t hca_fw_minor_version; 3749879SRamaswamy.Tummala@Sun.COM uint16_t hca_fw_micro_version; 3759879SRamaswamy.Tummala@Sun.COM 3769879SRamaswamy.Tummala@Sun.COM /* detailed WQE size info */ 3779879SRamaswamy.Tummala@Sun.COM uint_t hca_ud_send_inline_sz; /* inline size in bytes */ 3789879SRamaswamy.Tummala@Sun.COM uint_t hca_conn_send_inline_sz; 3799879SRamaswamy.Tummala@Sun.COM uint_t hca_conn_rdmaw_inline_overhead; 3809879SRamaswamy.Tummala@Sun.COM uint_t hca_recv_sgl_sz; /* detailed SGL sizes */ 3819879SRamaswamy.Tummala@Sun.COM uint_t hca_ud_send_sgl_sz; 3829879SRamaswamy.Tummala@Sun.COM uint_t hca_conn_send_sgl_sz; 3839879SRamaswamy.Tummala@Sun.COM uint_t hca_conn_rdma_sgl_overhead; 3849879SRamaswamy.Tummala@Sun.COM int32_t hca_pad; 3859879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_hca_info_t; 3869879SRamaswamy.Tummala@Sun.COM 38710094SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_hca_info_32_s { 38810094SRamaswamy.Tummala@Sun.COM ib_guid_t hca_node_guid; /* Node GUID */ 38910094SRamaswamy.Tummala@Sun.COM ib_guid_t hca_si_guid; /* Optional System Image GUID */ 39010094SRamaswamy.Tummala@Sun.COM uint_t hca_nports; /* Number of physical ports */ 39110094SRamaswamy.Tummala@Sun.COM 39210094SRamaswamy.Tummala@Sun.COM /* HCA driver name and instance number */ 39310094SRamaswamy.Tummala@Sun.COM char hca_driver_name[MAX_HCA_DRVNAME_LEN]; 39410094SRamaswamy.Tummala@Sun.COM int hca_driver_instance; 39510094SRamaswamy.Tummala@Sun.COM 39610094SRamaswamy.Tummala@Sun.COM /* 39710094SRamaswamy.Tummala@Sun.COM * hca device path and the length. 398*10183SRamaswamy.Tummala@Sun.COM * hca_device_path_len contains the string length of the actual hca 399*10183SRamaswamy.Tummala@Sun.COM * device path plus one (for the terminating null character). 40010094SRamaswamy.Tummala@Sun.COM */ 40110094SRamaswamy.Tummala@Sun.COM caddr32_t hca_device_path; 40210094SRamaswamy.Tummala@Sun.COM uint_t hca_device_path_len; 40310094SRamaswamy.Tummala@Sun.COM 40410094SRamaswamy.Tummala@Sun.COM ibt_hca_flags_t hca_flags; /* HCA capabilities etc */ 40510094SRamaswamy.Tummala@Sun.COM ibt_hca_flags2_t hca_flags2; /* HCA capabilities etc */ 40610094SRamaswamy.Tummala@Sun.COM 40710094SRamaswamy.Tummala@Sun.COM uint32_t hca_vendor_id; /* Vendor ID */ 40810094SRamaswamy.Tummala@Sun.COM uint16_t hca_device_id; /* Device ID */ 40910094SRamaswamy.Tummala@Sun.COM uint32_t hca_version_id; /* Version ID */ 41010094SRamaswamy.Tummala@Sun.COM 41110094SRamaswamy.Tummala@Sun.COM uint_t hca_max_chans; /* Max channels supported */ 41210094SRamaswamy.Tummala@Sun.COM uint_t hca_max_chan_sz; /* Max outstanding WRs on any */ 41310094SRamaswamy.Tummala@Sun.COM /* channel */ 41410094SRamaswamy.Tummala@Sun.COM 41510094SRamaswamy.Tummala@Sun.COM uint_t hca_max_sgl; /* Max SGL entries per WR */ 41610094SRamaswamy.Tummala@Sun.COM 41710094SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq; /* Max num of CQs supported */ 41810094SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_sz; /* Max capacity of each CQ */ 41910094SRamaswamy.Tummala@Sun.COM 42010094SRamaswamy.Tummala@Sun.COM ibt_page_sizes_t hca_page_sz; /* Bit mask of page sizes */ 42110094SRamaswamy.Tummala@Sun.COM 42210094SRamaswamy.Tummala@Sun.COM uint_t hca_max_memr; /* Max num of HCA mem regions */ 42310094SRamaswamy.Tummala@Sun.COM ib_memlen_t hca_max_memr_len; /* Largest block, in bytes of */ 42410094SRamaswamy.Tummala@Sun.COM /* mem that can be registered */ 42510094SRamaswamy.Tummala@Sun.COM uint_t hca_max_mem_win; /* Max Memory windows in HCA */ 42610094SRamaswamy.Tummala@Sun.COM 42710094SRamaswamy.Tummala@Sun.COM uint_t hca_max_rsc; /* Max Responder Resources of */ 42810094SRamaswamy.Tummala@Sun.COM /* this HCA for RDMAR/Atomics */ 42910094SRamaswamy.Tummala@Sun.COM /* with this HCA as target. */ 43010094SRamaswamy.Tummala@Sun.COM uint8_t hca_max_rdma_in_chan; /* Max RDMAR/Atomics in per */ 43110094SRamaswamy.Tummala@Sun.COM /* chan this HCA as target. */ 43210094SRamaswamy.Tummala@Sun.COM uint8_t hca_max_rdma_out_chan; /* Max RDMA Reads/Atomics out */ 43310094SRamaswamy.Tummala@Sun.COM /* per channel by this HCA */ 43410094SRamaswamy.Tummala@Sun.COM uint_t hca_max_ipv6_chan; /* Max IPV6 channels in HCA */ 43510094SRamaswamy.Tummala@Sun.COM uint_t hca_max_ether_chan; /* Max Ether channels in HCA */ 43610094SRamaswamy.Tummala@Sun.COM 43710094SRamaswamy.Tummala@Sun.COM uint_t hca_max_mcg_chans; /* Max number of channels */ 43810094SRamaswamy.Tummala@Sun.COM /* that can join multicast */ 43910094SRamaswamy.Tummala@Sun.COM /* groups */ 44010094SRamaswamy.Tummala@Sun.COM uint_t hca_max_mcg; /* Max multicast groups */ 44110094SRamaswamy.Tummala@Sun.COM uint_t hca_max_chan_per_mcg; /* Max number of channels per */ 44210094SRamaswamy.Tummala@Sun.COM /* Multicast group in HCA */ 44310094SRamaswamy.Tummala@Sun.COM uint16_t hca_max_partitions; /* Max partitions in HCA */ 44410094SRamaswamy.Tummala@Sun.COM 44510094SRamaswamy.Tummala@Sun.COM ib_time_t hca_local_ack_delay; 44610094SRamaswamy.Tummala@Sun.COM 44710094SRamaswamy.Tummala@Sun.COM uint_t hca_max_port_sgid_tbl_sz; 44810094SRamaswamy.Tummala@Sun.COM uint16_t hca_max_port_pkey_tbl_sz; 44910094SRamaswamy.Tummala@Sun.COM uint_t hca_max_pd; /* Max# of Protection Domains */ 45010094SRamaswamy.Tummala@Sun.COM 45110094SRamaswamy.Tummala@Sun.COM uint_t hca_max_ud_dest; 45210094SRamaswamy.Tummala@Sun.COM uint_t hca_max_srqs; /* Max SRQs supported */ 45310094SRamaswamy.Tummala@Sun.COM uint_t hca_max_srqs_sz; /* Max outstanding WRs on any */ 45410094SRamaswamy.Tummala@Sun.COM /* SRQ */ 45510094SRamaswamy.Tummala@Sun.COM uint_t hca_max_srq_sgl; /* Max SGL entries per SRQ WR */ 45610094SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_handlers; 45710094SRamaswamy.Tummala@Sun.COM ibt_lkey_t hca_reserved_lkey; /* Reserved L_Key value */ 45810094SRamaswamy.Tummala@Sun.COM uint_t hca_max_fmrs; /* Max FMR Supported */ 45910094SRamaswamy.Tummala@Sun.COM 46010094SRamaswamy.Tummala@Sun.COM uint_t hca_max_lso_size; 46110094SRamaswamy.Tummala@Sun.COM uint_t hca_max_lso_hdr_size; 46210094SRamaswamy.Tummala@Sun.COM uint_t hca_max_inline_size; 46310094SRamaswamy.Tummala@Sun.COM 46410094SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_mod_count; /* CQ notify moderation */ 46510094SRamaswamy.Tummala@Sun.COM uint_t hca_max_cq_mod_usec; 46610094SRamaswamy.Tummala@Sun.COM 46710094SRamaswamy.Tummala@Sun.COM uint32_t hca_fw_major_version; /* firmware version */ 46810094SRamaswamy.Tummala@Sun.COM uint16_t hca_fw_minor_version; 46910094SRamaswamy.Tummala@Sun.COM uint16_t hca_fw_micro_version; 47010094SRamaswamy.Tummala@Sun.COM 47110094SRamaswamy.Tummala@Sun.COM /* detailed WQE size info */ 47210094SRamaswamy.Tummala@Sun.COM uint_t hca_ud_send_inline_sz; /* inline size in bytes */ 47310094SRamaswamy.Tummala@Sun.COM uint_t hca_conn_send_inline_sz; 47410094SRamaswamy.Tummala@Sun.COM uint_t hca_conn_rdmaw_inline_overhead; 47510094SRamaswamy.Tummala@Sun.COM uint_t hca_recv_sgl_sz; /* detailed SGL sizes */ 47610094SRamaswamy.Tummala@Sun.COM uint_t hca_ud_send_sgl_sz; 47710094SRamaswamy.Tummala@Sun.COM uint_t hca_conn_send_sgl_sz; 47810094SRamaswamy.Tummala@Sun.COM uint_t hca_conn_rdma_sgl_overhead; 47910094SRamaswamy.Tummala@Sun.COM int32_t hca_pad; 48010094SRamaswamy.Tummala@Sun.COM } ibnex_ctl_hca_info_32_t; 48110094SRamaswamy.Tummala@Sun.COM 4829879SRamaswamy.Tummala@Sun.COM /* 4839879SRamaswamy.Tummala@Sun.COM * Data structure for IBNEX_CTL_QUERY_HCA 4849879SRamaswamy.Tummala@Sun.COM */ 4859879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_query_hca_s { 48610094SRamaswamy.Tummala@Sun.COM ib_guid_t hca_guid; /* in: HCA GUID */ 48710094SRamaswamy.Tummala@Sun.COM 48810094SRamaswamy.Tummala@Sun.COM /* 48910094SRamaswamy.Tummala@Sun.COM * in: user allocated memory pointer for hca device path and number of 49010094SRamaswamy.Tummala@Sun.COM * bytes allocated for the hca device path. 49110094SRamaswamy.Tummala@Sun.COM */ 49210094SRamaswamy.Tummala@Sun.COM char *hca_device_path; 49310094SRamaswamy.Tummala@Sun.COM uint_t hca_device_path_alloc_sz; 49410094SRamaswamy.Tummala@Sun.COM 4959879SRamaswamy.Tummala@Sun.COM ibnex_ctl_hca_info_t hca_info; /* out: HCA information */ 4969879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_query_hca_t; 4979879SRamaswamy.Tummala@Sun.COM 49810094SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_query_hca_32_s { 49910094SRamaswamy.Tummala@Sun.COM ib_guid_t hca_guid; /* in: HCA GUID */ 50010094SRamaswamy.Tummala@Sun.COM 50110094SRamaswamy.Tummala@Sun.COM /* 50210094SRamaswamy.Tummala@Sun.COM * in: user allocated memory pointer for hca device path and number of 50310094SRamaswamy.Tummala@Sun.COM * bytes allocated for the hca device path. 50410094SRamaswamy.Tummala@Sun.COM */ 50510094SRamaswamy.Tummala@Sun.COM caddr32_t hca_device_path; 50610094SRamaswamy.Tummala@Sun.COM uint_t hca_device_path_alloc_sz; 50710094SRamaswamy.Tummala@Sun.COM 50810094SRamaswamy.Tummala@Sun.COM ibnex_ctl_hca_info_32_t hca_info; /* out: HCA information */ 50910094SRamaswamy.Tummala@Sun.COM } ibnex_ctl_query_hca_32_t; 51010094SRamaswamy.Tummala@Sun.COM 5119879SRamaswamy.Tummala@Sun.COM /* 5129879SRamaswamy.Tummala@Sun.COM * HCA port information structure 5139879SRamaswamy.Tummala@Sun.COM */ 5149879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_hca_port_info_s { 5159879SRamaswamy.Tummala@Sun.COM ib_lid_t p_lid; /* Base LID of port */ 5169879SRamaswamy.Tummala@Sun.COM ib_qkey_cntr_t p_qkey_violations; /* Bad Q_Key cnt */ 5179879SRamaswamy.Tummala@Sun.COM ib_pkey_cntr_t p_pkey_violations; /* Optional bad P_Key cnt */ 5189879SRamaswamy.Tummala@Sun.COM uint8_t p_sm_sl; /* SM Service level */ 5199879SRamaswamy.Tummala@Sun.COM ib_port_phys_state_t p_phys_state; 5209879SRamaswamy.Tummala@Sun.COM ib_lid_t p_sm_lid; /* SM LID */ 5219879SRamaswamy.Tummala@Sun.COM ibt_port_state_t p_linkstate; /* Port state */ 5229879SRamaswamy.Tummala@Sun.COM uint8_t p_port_num; /* Port number */ 5239879SRamaswamy.Tummala@Sun.COM 5249879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_supported; 5259879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_enabled; 5269879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_active; 5279879SRamaswamy.Tummala@Sun.COM 5289879SRamaswamy.Tummala@Sun.COM ib_mtu_t p_mtu; /* Max transfer unit - pkt */ 5299879SRamaswamy.Tummala@Sun.COM uint8_t p_lmc; /* LID mask control */ 5309879SRamaswamy.Tummala@Sun.COM 5319879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_supported; 5329879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_enabled; 5339879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_active; 5349879SRamaswamy.Tummala@Sun.COM 5359879SRamaswamy.Tummala@Sun.COM ib_gid_t *p_sgid_tbl; /* SGID Table */ 5369879SRamaswamy.Tummala@Sun.COM uint_t p_sgid_tbl_sz; /* # of entries in SGID table */ 5379879SRamaswamy.Tummala@Sun.COM 5389879SRamaswamy.Tummala@Sun.COM ib_pkey_t *p_pkey_tbl; /* P_Key table */ 5399879SRamaswamy.Tummala@Sun.COM uint16_t p_pkey_tbl_sz; /* # of entries in P_Key tbl */ 5409879SRamaswamy.Tummala@Sun.COM uint16_t p_def_pkey_ix; /* default pkey index for TI */ 5419879SRamaswamy.Tummala@Sun.COM 5429879SRamaswamy.Tummala@Sun.COM uint8_t p_max_vl; /* Max num of virtual lanes */ 5439879SRamaswamy.Tummala@Sun.COM uint8_t p_init_type_reply; /* Optional InitTypeReply */ 5449879SRamaswamy.Tummala@Sun.COM ib_time_t p_subnet_timeout; /* Max Subnet Timeout */ 5459879SRamaswamy.Tummala@Sun.COM ibt_port_caps_t p_capabilities; /* Port Capabilities */ 5469879SRamaswamy.Tummala@Sun.COM uint32_t p_msg_sz; /* Max message size */ 5479879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_hca_port_info_t; 5489879SRamaswamy.Tummala@Sun.COM 5499879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_hca_port_info_32_s { 5509879SRamaswamy.Tummala@Sun.COM ib_lid_t p_lid; /* Base LID of port */ 5519879SRamaswamy.Tummala@Sun.COM ib_qkey_cntr_t p_qkey_violations; /* Bad Q_Key cnt */ 5529879SRamaswamy.Tummala@Sun.COM ib_pkey_cntr_t p_pkey_violations; /* Optional bad P_Key cnt */ 5539879SRamaswamy.Tummala@Sun.COM uint8_t p_sm_sl; /* SM Service level */ 5549879SRamaswamy.Tummala@Sun.COM ib_port_phys_state_t p_phys_state; 5559879SRamaswamy.Tummala@Sun.COM ib_lid_t p_sm_lid; /* SM LID */ 5569879SRamaswamy.Tummala@Sun.COM ibt_port_state_t p_linkstate; /* Port state */ 5579879SRamaswamy.Tummala@Sun.COM uint8_t p_port_num; /* Port number */ 5589879SRamaswamy.Tummala@Sun.COM 5599879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_supported; 5609879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_enabled; 5619879SRamaswamy.Tummala@Sun.COM ib_link_width_t p_width_active; 5629879SRamaswamy.Tummala@Sun.COM 5639879SRamaswamy.Tummala@Sun.COM ib_mtu_t p_mtu; /* Max transfer unit - pkt */ 5649879SRamaswamy.Tummala@Sun.COM uint8_t p_lmc; /* LID mask control */ 5659879SRamaswamy.Tummala@Sun.COM 5669879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_supported; 5679879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_enabled; 5689879SRamaswamy.Tummala@Sun.COM ib_link_speed_t p_speed_active; 5699879SRamaswamy.Tummala@Sun.COM 5709879SRamaswamy.Tummala@Sun.COM caddr32_t p_sgid_tbl; /* SGID Table */ 5719879SRamaswamy.Tummala@Sun.COM uint_t p_sgid_tbl_sz; /* # of entries in SGID table */ 5729879SRamaswamy.Tummala@Sun.COM 5739879SRamaswamy.Tummala@Sun.COM caddr32_t p_pkey_tbl; /* P_Key table */ 5749879SRamaswamy.Tummala@Sun.COM uint16_t p_pkey_tbl_sz; /* # of entries in P_Key tbl */ 5759879SRamaswamy.Tummala@Sun.COM uint16_t p_def_pkey_ix; /* default pkey index for TI */ 5769879SRamaswamy.Tummala@Sun.COM 5779879SRamaswamy.Tummala@Sun.COM uint8_t p_max_vl; /* Max num of virtual lanes */ 5789879SRamaswamy.Tummala@Sun.COM uint8_t p_init_type_reply; /* Optional InitTypeReply */ 5799879SRamaswamy.Tummala@Sun.COM ib_time_t p_subnet_timeout; /* Max Subnet Timeout */ 5809879SRamaswamy.Tummala@Sun.COM ibt_port_caps_t p_capabilities; /* Port Capabilities */ 5819879SRamaswamy.Tummala@Sun.COM uint32_t p_msg_sz; /* Max message size */ 5829879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_hca_port_info_32_t; 5839879SRamaswamy.Tummala@Sun.COM 5849879SRamaswamy.Tummala@Sun.COM /* 5859879SRamaswamy.Tummala@Sun.COM * Data structure for IBNEX_CTL_QUERY_HCA_PORT 5869879SRamaswamy.Tummala@Sun.COM */ 5879879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_query_hca_port_s { 5889879SRamaswamy.Tummala@Sun.COM ib_guid_t hca_guid; /* in: HCA GUID */ 5899879SRamaswamy.Tummala@Sun.COM uint_t port_num; /* in: port number */ 5909879SRamaswamy.Tummala@Sun.COM 5919879SRamaswamy.Tummala@Sun.COM ib_gid_t *sgid_tbl; /* in: SGID Table */ 5929879SRamaswamy.Tummala@Sun.COM uint_t sgid_tbl_alloc_sz; /* in: # of entries in SGID table */ 5939879SRamaswamy.Tummala@Sun.COM 5949879SRamaswamy.Tummala@Sun.COM ib_pkey_t *pkey_tbl; /* in: P_Key table */ 5959879SRamaswamy.Tummala@Sun.COM uint_t pkey_tbl_alloc_sz; /* in: # of entries in P_Key table */ 5969879SRamaswamy.Tummala@Sun.COM 5979879SRamaswamy.Tummala@Sun.COM uint32_t pad; 5989879SRamaswamy.Tummala@Sun.COM ibnex_ctl_hca_port_info_t port_info; /* out: port information */ 5999879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_query_hca_port_t; 6009879SRamaswamy.Tummala@Sun.COM 6019879SRamaswamy.Tummala@Sun.COM typedef struct ibnex_ctl_query_hca_port_32_s { 6029879SRamaswamy.Tummala@Sun.COM ib_guid_t hca_guid; /* in: HCA GUID */ 6039879SRamaswamy.Tummala@Sun.COM uint_t port_num; /* in: port number */ 6049879SRamaswamy.Tummala@Sun.COM 6059879SRamaswamy.Tummala@Sun.COM caddr32_t sgid_tbl; /* in: SGID Table */ 6069879SRamaswamy.Tummala@Sun.COM uint_t sgid_tbl_alloc_sz; /* in: # of entries in SGID table */ 6079879SRamaswamy.Tummala@Sun.COM 6089879SRamaswamy.Tummala@Sun.COM caddr32_t pkey_tbl; /* in: P_Key table */ 6099879SRamaswamy.Tummala@Sun.COM uint_t pkey_tbl_alloc_sz; /* in: # of entries in P_Key table */ 6109879SRamaswamy.Tummala@Sun.COM 6119879SRamaswamy.Tummala@Sun.COM uint32_t pad; 6129879SRamaswamy.Tummala@Sun.COM ibnex_ctl_hca_port_info_32_t port_info; /* out: port information */ 6139879SRamaswamy.Tummala@Sun.COM } ibnex_ctl_query_hca_port_32_t; 6149879SRamaswamy.Tummala@Sun.COM 6159879SRamaswamy.Tummala@Sun.COM #ifdef _KERNEL 6169879SRamaswamy.Tummala@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("", ibnex_ctl_hca_info_s)) 6179879SRamaswamy.Tummala@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("", ibnex_ctl_hca_port_info_s)) 6189879SRamaswamy.Tummala@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("", ibnex_ctl_hca_port_info_32_s)) 6199879SRamaswamy.Tummala@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("", ibnex_ctl_query_hca_port_s)) 6209879SRamaswamy.Tummala@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("", ibnex_ctl_query_hca_port_32_s)) 6219879SRamaswamy.Tummala@Sun.COM #endif 6229879SRamaswamy.Tummala@Sun.COM 6230Sstevel@tonic-gate 6240Sstevel@tonic-gate #ifdef __cplusplus 6250Sstevel@tonic-gate } 6260Sstevel@tonic-gate #endif 6270Sstevel@tonic-gate 6280Sstevel@tonic-gate #endif /* _SYS_IB_IBNEX_IBNEX_DEVCTL_H */ 629