ibnex_devctl.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_IBNEX_IBNEX_DEVCTL_H
#define _SYS_IB_IBNEX_IBNEX_DEVCTL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* This file contains info for devctls issued by IB cfgadm plugin.
* The only devctl of interest is DEVCTL_AP_CONTROL which uses
* these defines and data structures.
*/
#define IBNEX_HCAGUID_STRSZ 17
/*
* types of attachment point Identifiers (APID)s supported
*/
/* defines for dynamic APID handling */
#define DYN_SEP "::"
#define IBNEX_FABRIC "fabric"
#define IBNEX_VPPA_STR "vppa"
#define IBNEX_PORT_STR "port"
#define IBNEX_HCASVC_STR "hca-svc"
/* Enums while reading ib.conf file */
typedef enum ib_service_type_e {
IB_NAME, /* name = */
IB_CLASS, /* class = */
IB_PORT_SERVICE, /* port-svc-list = */
IB_VPPA_SERVICE, /* vppa-svc-list = */
IB_HCASVC_SERVICE, /* hca-svc-list = */
/*
* defines for nvlist types: (for PORT devices and IOCs)
* The first 6 are common to both IOC and PORT devices.
* The last 9 are used only for IOC devices.
*/
#define IBNEX_NODE_INFO_NVL "node_info"
#define IBNEX_NODE_APID_NVL "node_apid"
#define IBNEX_NODE_TYPE_NVL "node_type"
#define IBNEX_NODE_RSTATE_NVL "node_rstate"
#define IBNEX_NODE_OSTATE_NVL "node_ostate"
#define IBNEX_NODE_COND_NVL "node_condition"
/*
* This flag is passed from cfgadm to ib(7d) to convey that it
* need not attempt to probe the fabric.
*
* The value of these flags should be same as flags in enum
* ibdm_ibnex_get_ioclist_mtd_t.
*/
#define IBNEX_DONOT_PROBE_FLAG 1
#define IBNEX_NORMAL_PROBE 0 /* flag used by ib(7d) only */
/*
* The following are sub-commands to DEVCTL_AP_CONTROL.
* NOTE: IBNEX_NUM_DEVICE_NODES and IBNEX_NUM_HCA_NODES need to be
* separate. The former is used to figure out the dynamic ap_ids for
* the IB fabric. The latter is used for a HCA count on a given host only.
*/
/*
* devctl. Note that these are separate structures as some fields are pointers.
*/
typedef struct ibnex_ioctl_data {
/* For 32-bit app/64-bit kernel */
typedef struct ibnex_ioctl_data_32 {
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_IBNEX_IBNEX_DEVCTL_H */