Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/scsi/vmkapi_scsi_mgmt_types.h
d0a14f973771
12.7 KiB
text/x-chdr
ESXi-5.0-U1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | /***************************************************************************
* Copyright 2004 - 2009 VMware, Inc. All rights reserved.
***************************************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* SCSI Device management types and constants */ /**
* \addtogroup SCSI
* @{
*
* \defgroup SCSImgmt SCSI Device Management Interfaces
* @{
***********************************************************************
*/
#ifndef _VMKAPI_SCSI_MGMT_TYPES_H_
#define _VMKAPI_SCSI_MGMT_TYPES_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
#define VMKDRIVER_DEV_NAME_LENGTH 64
#define VMK_MAX_IP_STRING_LENGTH 64
#define VMK_MAX_PORT_STRING_LENGTH 16
#define VMK_MAX_ISCSI_IQN_LENGTH 224
#define VMK_MAX_ISCSI_ISID_STRING_LENGTH 13
#define VMK_MAX_ISCSI_TPGT_STRING_LENGTH 16
#define VMK_MAX_ETHERNET_MAC_LENGTH 6
#define VMK_MAX_ISCSI_PARAM_LENGTH 256
#define VMK_MAX_ISCSI_UID_LENGTH 256
/* Session related Parameters */
#define VMK_ISCSI_ADAPTER_IQN 0x00000001
#define VMK_ISCSI_PARAM_DATAPDU_ORDER 0x00000002
#define VMK_ISCSI_PARAM_DATASEQ_ORDER 0x00000004
#define VMK_ISCSI_PARAM_R2T 0x00000008
#define VMK_ISCSI_PARAM_IMMDATA 0x00000010
#define VMK_ISCSI_PARAM_ERL 0x00000020
#define VMK_ISCSI_PARAM_TIME2WAIT 0x00000040
#define VMK_ISCSI_PARAM_TIME2RETAIN 0x00000080
#define VMK_ISCSI_PARAM_MAXCONNECTIONS 0x00000100
#define VMK_ISCSI_PARAM_MAXR2T 0x00000200
#define VMK_ISCSI_PARAM_FBL 0x00000400
#define VMK_ISCSI_PARAM_MBL 0x00000800
#define VMK_ISCSI_PARAM_HDRDIGEST 0x00001000
#define VMK_ISCSI_PARAM_DATADIGEST 0x00002000
#define VMK_ISCSI_PARAM_RCVDATASEGMENT 0x00004000
#define VMK_ISCSI_PARAM_ICHAPNAME 0x00008000
#define VMK_ISCSI_PARAM_TCHAPNAME 0x00010000
#define VMK_ISCSI_PARAM_ICHAPSECRET 0x00020000
#define VMK_ISCSI_PARAM_TCHAPSECRET 0x00040000
#define VMK_ISCSI_PARAM_ISID 0x00080000
/* Target Information */
#define VMK_ISCSI_IQN_TARGET_NAME 0x00100000
#define VMK_ISCSI_TARGET_IP 0x00200000
#define VMK_ISCSI_TARGET_PORT 0x00400000
#define VMK_ISCSI_TARGET_TPGT 0x00800000
/* Adapter TCP/IP Properties */
#define VMK_ISCSI_ADAPTER_IP 0x01000000
#define VMK_ISCSI_ADAPTER_SUBNET 0x02000000
#define VMK_ISCSI_ADAPTER_GATEWAY 0x04000000
#define VMK_ISCSI_ADAPTER_PRIMARY_DNS 0x08000000
#define VMK_ISCSI_ADAPTER_SECONDARY_DNS 0x10000000
/* iscsi_trans max channels, target mask 0-15: channel, 16-31: target */
#define ISCSI_MAX_CHANNEL_TARGET_MASK 0x0000FFFF
/* max iscsi parm string length */
#define ISCSI_MAX_PARM_STRING_LENGTH 4096
/* iscsi parm types */
typedef enum vmk_IscsiParmType {
VMK_ISCSI_SESSION_PARM,
VMK_ISCSI_CONN_PARM,
} vmk_IscsiParmType;
/* FC Port State */
typedef enum vmk_FcPortState {
VMK_FC_PORTSTATE_UNKNOWN = 0x0,
VMK_FC_PORTSTATE_NOTPRESENT,
VMK_FC_PORTSTATE_ONLINE,
VMK_FC_PORTSTATE_OFFLINE,
VMK_FC_PORTSTATE_BLOCKED,
VMK_FC_PORTSTATE_BYPASSED,
VMK_FC_PORTSTATE_DIAGNOSTICS,
VMK_FC_PORTSTATE_LINKDOWN,
VMK_FC_PORTSTATE_ERROR,
VMK_FC_PORTSTATE_LOOPBACK,
VMK_FC_PORTSTATE_DELETED,
} vmk_FcPortState;
/* FC Port Speed */
typedef enum vmk_FcLinkSpeed {
VMK_FC_SPEED_UNKNOWN = 0x0,
VMK_FC_SPEED_1GBIT,
VMK_FC_SPEED_2GBIT,
VMK_FC_SPEED_4GBIT,
VMK_FC_SPEED_8GBIT,
VMK_FC_SPEED_10GBIT,
VMK_FC_SPEED_16GBIT,
} vmk_FcLinkSpeed;
/* FC Port TYPE */
typedef enum vmk_FcPortType {
VMK_FC_PORTTYPE_UNKNOWN = 0x0,
VMK_FC_PORTTYPE_OTHER,
VMK_FC_PORTTYPE_NOTPRESENT,
VMK_FC_PORTTYPE_NPORT,
VMK_FC_PORTTYPE_NLPORT,
VMK_FC_PORTTYPE_LPORT,
VMK_FC_PORTTYPE_PTP,
VMK_FC_PORTTYPE_NPIV,
VMK_FC_PORTTYPE_VNPORT,
} vmk_FcPortType;
/* Adapter Status */
typedef enum vmk_AdapterStatus {
VMK_ADAPTER_STATUS_UNKNOWN = 0x0,
VMK_ADAPTER_STATUS_ONLINE,
VMK_ADAPTER_STATUS_OFFLINE,
} vmk_AdapterStatus;
/* Link Rescan Status */
typedef enum vmk_RescanLinkStatus {
VMK_RESCAN_LINK_UNSUPPORTED = 0x0,
VMK_RESCAN_LINK_SUCCEEDED,
VMK_RESCAN_LINK_FAILED,
} vmk_RescanLinkStatus;
/**
* \brief fc target attributes
*/
typedef struct vmk_FcTargetAttrs {
/** \brief target node WWN */
vmk_uint64 nodeName;
/** \brief target port WWN */
vmk_uint64 portName;
/** \brief target port id */
vmk_uint32 portId;
} vmk_FcTargetAttrs;
/**
* \brief fc adapter
*/
typedef struct vmk_FcAdapter
{
/** \brief Get FC Node Name */
vmk_uint64 (*getFcNodeName) (
void *clientData);
/** \brief Get FC Port Name */
vmk_uint64 (*getFcPortName) (
void *clientData);
/** \brief Get FC Port Id */
vmk_uint32 (*getFcPortId) (
void *clientData);
/** \brief Get FC Link Speed */
vmk_FcLinkSpeed (*getFcLinkSpeed) (
void *clientData);
/** \brief Get FC Port Type */
vmk_FcPortType (*getFcPortType) (
void *clientData);
/** \brief Get FC Port State */
vmk_FcPortState (*getFcPortState) (
void *clientData);
/** \brief Get FC Target Attributes */
VMK_ReturnStatus (*getFcTargetAttributes) (
void *pSCSI_Adapter, vmk_FcTargetAttrs *fcAttrib,
vmk_uint32 channelNo, vmk_uint32 targetNo);
/** \brief Get FC Adapter Status */
vmk_AdapterStatus (*getFcAdapterStatus) (
void *clientData);
/** \brief rescan FC Link Status */
vmk_RescanLinkStatus (*rescanFcLink) (
void *clientData);
/**
* \brief link timeout
* This is the user provided Link Time out value.
* If this is not set, default timeout set by
* the underlying layer(driver layer/driver) is used
*/
vmk_uint64 linkTimeout;
/**
* \brief i/o timeout
* This is the user provided I/O Time out value.
* If this is not set, default timeout set by
* the underlying layer(driver layer/driver) is used
*/
vmk_uint64 ioTimeout;
/** \brief reserved */
vmk_uint32 reserved1[4];
/** \brief reserved */
vmk_VA reserved2[4];
} vmk_FcAdapter;
/**
* \brief FIP mode used for FCoE discovery
*/
typedef enum vmk_FIPType {
VMK_FIP_TYPE_UNKNOWN = 0x0,
VMK_FIP_TYPE_FPMA,
VMK_FIP_TYPE_SPMA,
} vmk_FIPType;
/**
* \brief FCoE Adapter attributes
*/
typedef struct vmk_FcoeAdapterAttrs {
/** \brief FCoE Controller MAC Address */
vmk_uint8 fcoeContlrMacAddr[VMK_MAX_ETHERNET_MAC_LENGTH];
/** \brief FCF MAC Address */
vmk_uint8 fcfMacAddr[VMK_MAX_ETHERNET_MAC_LENGTH];
/** \brief VN Port MAC Address*/
vmk_uint8 vnPortMacAddr[VMK_MAX_ETHERNET_MAC_LENGTH];
/** \brief FIP Type */
vmk_FIPType fip;
/** \brief VLAN ID */
vmk_uint16 vlanId;
/** \brief Bandwidth Percentage */
vmk_uint16 bwPercentage;
/** \brief FCoE MTU */
vmk_uint32 frameSize;
/** \brief Underlying vmnic Name in case of CNA */
char vmnicName[VMK_DEVICE_NAME_MAX_LENGTH];
} vmk_FcoeAdapterAttrs;
/**
* \brief fcoe adapter
*/
typedef struct vmk_FcoeAdapter
{
/** \brief Get FCoE adapter Details */
VMK_ReturnStatus (*getFCoEAdapterAttributes) (
void *clientData, vmk_FcoeAdapterAttrs *fcoeAttrs);
/** \brief Get FC Details */
vmk_FcAdapter fc;
/** \brief reserved */
vmk_uint32 reserved1[4];
/** \brief reserved */
vmk_VA reserved2[4];
} vmk_FcoeAdapter;
/**
* \brief SAS target attributes
*/
typedef struct vmk_SasTargetAttrs {
/** \brief SAS address */
vmk_uint64 sasAddress;
} vmk_SasTargetAttrs;
/**
* \brief SAS adapter
*/
typedef struct vmk_SasAdapter
{
/** \brief get the adapter's SAS address */
vmk_uint64 (*getInitiatorSasAddress) (
void *clientData);
/** \brief get the target's attributes */
VMK_ReturnStatus (*getSasTargetAttributes) (
void *pSCSI_Adapter, vmk_SasTargetAttrs *sasAttrib,
vmk_uint32 channelNo, vmk_uint32 targetNo);
/** \brief reserved */
vmk_uint32 reserved1[4];
/** \brief reserved */
vmk_VA reserved2[4];
} vmk_SasAdapter;
/**
* \brief Block adapter
*/
typedef struct vmk_BlockAdapter {
/** \brief device name */
char devName[VMKDRIVER_DEV_NAME_LENGTH];
/** \brief controller instance number */
vmk_uint32 controllerInstance;
/** \brief reserved */
vmk_uint32 reserved1[4];
/** \brief reserved */
vmk_VA reserved2[4];
} vmk_BlockAdapter;
/**
* \brief Identifier for generic SAN initiator/target
*/
typedef struct vmk_XsanID {
/** \brief generic SAN ID lower 64bit */
vmk_uint64 L;
/** \brief generic SAN ID higher 64bit */
vmk_uint64 H;
} vmk_XsanID;
/**
* \brief generic SAN target attributes
*/
typedef struct vmk_XsanTargetAttrs {
/** \brief generic SAN target ID */
vmk_XsanID id;
} vmk_XsanTargetAttrs;
/**
* \brief generic SAN adapter
*/
typedef struct vmk_XsanAdapter {
/** \brief get the generic SAN initiator's ID */
VMK_ReturnStatus (*getXsanInitiatorID)(void *clientData, vmk_XsanID *xsanID);
/** \brief get the target's attributes on generic SAN */
VMK_ReturnStatus (*getXsanTargetAttributes) (
void *pSCSI_Adapter, vmk_XsanTargetAttrs *xsanAttrib,
vmk_uint32 channelNo, vmk_uint32 targetNo);
} vmk_XsanAdapter;
/* Return types for iSCSI Adapter param settings */
typedef enum vmk_IscsiAdapterParamStatus {
VMK_ISCSI_ADAPTER_PARAM_UNSUPPORTED = 0x0,
VMK_ISCSI_ADAPTER_PARAM_CONFIG_SUCCEEDED,
VMK_ISCSI_ADAPTER_PARAM_CONFIG_FAILED,
} vmk_IscsiAdapterParamStatus;
/* Return types for iSCSI Session/Connection Param settings */
typedef enum vmk_IscsiParamStatus {
VMK_ISCSI_PARAM_CONFIG_UNSUPPORTED = 0x0,
VMK_ISCSI_PARAM_CONFIG_SUCCEEDED,
VMK_ISCSI_PARAM_CONFIG_FAILED,
} vmk_IscsiParamStatus;
/* iSCSI Adapter Structure */
typedef struct vmk_IscsiAdapter
{
char reserved[5048]; /* not used */
void *transport; /* For use by Annex iSCSI */
vmk_IscsiAdapterParamStatus (*getAdapterParams)
(void *clientData, vmk_uint32 param, char *pBuf, vmk_uint32 bufLength);
/* Configure Iscsi Session/Connection Parameters */
vmk_IscsiParamStatus (*getIscsiAttributes)
(void *clientData, vmk_uint32 sessionId, vmk_uint32 param, char *pBuf, vmk_uint32 bufLength);
/* Get iSCSI Target Uid */
VMK_ReturnStatus (*getIscsiTargetUid)
(void *pSCSI_Adapter, char *pTargetUid, vmk_uint32 uidLength,
vmk_uint32 channelNo, vmk_uint32 targetNo);
} vmk_IscsiAdapter;
/**
* \brief Managed storage adapter types.
*/
typedef enum vmk_StorageTransport {
VMK_STORAGE_ADAPTER_TRANSPORT_UNKNOWN = 0x00,
VMK_STORAGE_ADAPTER_BLOCK = 0x01,
VMK_STORAGE_ADAPTER_FC = 0x02,
VMK_STORAGE_ADAPTER_ISCSI_RESERVED = 0x03, /* not used */
VMK_STORAGE_ADAPTER_IDE = 0x04,
VMK_STORAGE_ADAPTER_ISCSI_VENDOR_SUPPLIED_IMA = 0x05,
VMK_STORAGE_ADAPTER_SAS = 0x06,
VMK_STORAGE_ADAPTER_SATA = 0x07,
VMK_STORAGE_ADAPTER_USB = 0x08,
VMK_STORAGE_ADAPTER_PSCSI = 0x09,
/**
* VMK_STORAGE_ADAPTER_XSAN generically represents any type of SAN
* transport not explicitly encoded elsewhere in this list. It is
* intended mainly to support novel SAN transports that aren't yet
* fully integrated and supported in the way other transports are.
* This type of SAN adapters generally masquerade as
* locally-attached storage, except that:
* - They respond to SCSI "Inquiry" commands, yielding unique target IDs.
* - RDMs are allowed.
* - Periodic rescanning for new LUNs is performed.
*/
VMK_STORAGE_ADAPTER_XSAN = 0x0a,
VMK_STORAGE_ADAPTER_FCOE = 0x0b,
VMK_STORAGE_ADAPTER_TRANSPORT_LAST = 0x0c
} vmk_StorageTransport;
/**
* \brief Transport specific info required for management.
*/
typedef struct vmk_SCSITransportMgmt {
/** \brief Storage transport type. */
vmk_StorageTransport transport;
/** \brief Reserved */
vmk_uint8 reserved[4];
/** \brief Driver transport specific data */
void *transportData;
/** \brief Transport-specifics */
union {
/** \brief Block transport specific data. */
vmk_BlockAdapter *block;
/** \brief Fibre Channel transport specific data. */
vmk_FcAdapter *fc;
/** \brief ISCSI transport specific data. */
vmk_IscsiAdapter *iscsi;
/** \brief SAS transport specific data. */
vmk_SasAdapter *sas;
/** \brief Generic SAN transport specific data. */
vmk_XsanAdapter *xsan;
/** \brief FCoE specific data */
vmk_FcoeAdapter *fcoe;
} t;
} vmk_SCSITransportMgmt;
#endif /* _VMKAPI_SCSI_MGMT_TYPES_H_ */
/** @} */
/** @} */
|