Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/vds/vmkapi_vds_prop.h
d0a14f973771
10.2 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 | /***********************************************************
* Copyright 2008 - 2009 VMware, Inc. All rights reserved.
***********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* Portset */ /**
* \addtogroup VDS
* @{
* \defgroup VDSProp VDS Property
*
* This file defines VDS property names and data structures for
* communication between management apps and data plan (portset
* implementation). There are three types of properties:
* - VDS global properties
* - VDS host properties
* - VDS port properties.
*
* VDS global properties are global to a VDS instance. The properties
* are present on every host member of VDS and the property values are
* identical on every host. Such properties are set/cleared by vCenter
* are read-only from host's perspective.
*
* Host properties are associated with portset on each host. The property
* value may vary from host to host. Some host properties are set by
* VDS framework to describe the host implementation. Other host properties
* are set by implementation to report the status.
*
* Port properties are associated with individual VDS ports. Some port
* properties are set by vCenter to communicate the configuration setting.
* Other properties are set by the switch data plane report port status
* and statistics.
*
* An implementation registers portset clients to handle VDS global and
* host properties. It registers port client callbacks to handle port
* property changes.
*
* Property names follow conventions defined here
* - Common Properties ("com.vmware.common...") are shared across all
* vendors, as well as by VMware VDS.
* - Vendors Properties ("com.<vendor>....") are controlled by the
* VDS provider. Such properties are not interpreted by ESX.
* Vendor properties are accessed from VMOL interfaces as opaque properties.
*
* @{
***********************************************************************
*/
#ifndef _VMKAPI_VDS_PROP_H_
#define _VMKAPI_VDS_PROP_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 */
/**
* \brief Global property for DVS name.
*
* It is typically set when a host joins a VDS.
*/
#define VMK_VDSPROP_SWITCH_ALIAS "com.vmware.common.alias"
/**
* \brief Global property for VDS version.
*
* It is set when a host joins a vDS and is tied to the lowest version of
* the ESX on which the switch can be enabled.
*/
#define VMK_VDSPROP_SWITCH_VERSION "com.vmware.common.version"
/**
* \brief Property for associating uplink ports to DVS.
*
* This property will be deprecated. Do not use.
*/
#define VMK_VDSPROP_SWITCH_UPLINKPORTS "com.vmware.common.uplinkPorts"
/**
* \brief Property of Overlay.
*
* This property will be deprecated. Do not use.
*/
#define VMK_VDSPROP_SWITCH_OVERLAY "com.vmware.common.overlay"
/**
* \brief Property of resource pools.
*
* This property will be deprecated. Do not use.
*/
#define VMK_VDSPROP_SWITCH_RESPOOLS_LIST "com.vmware.common.respools.list"
/**
* \brief Property of resource pool scheduler.
*
* This property will be deprecated. Do not use.
*/
#define VMK_VDSPROP_SWITCH_RESPOOLS_SCHED "com.vmware.common.respools.sched"
/**
* \brief VDS host dataplane properties.
*
* Volatile properties are not persisted in vCenter.
*/
#define VMK_VDSPROP_HOST_STATUS "com.vmware.common.host.volatile.status"
/**
* \brief Property of VDS host dataplane states.
*
* Vendor should register portset client callbacks for this property to receive
* notification of portset state change. Supported states for notification are
* defined in vmk_VDSPropPortsetState. The write callback of this property can
* be blockable, which means vmkernel will wait for the return of callbacks
* before changing state.
*
* Volatile property is not persisted in vCenter
*/
#define VMK_VDSPROP_HOST_PROXY_STATE \
"com.vmware.common.host.portset.volatile.state"
/**
* \brief VDS host dataplane portset name
*/
#define VMK_VDSPROP_HOST_PROXY "com.vmware.common.host.portset"
/**
* \brief Property describing uplink ports on a DVS.
*
* This property will be deprecated. Do not use.
*/
#define VMK_VDSPROP_HOST_UPLINKPORTS "com.vmware.common.host.uplinkPorts"
/**
* \brief Volatile port properties are not persisted
*/
#define VMK_VDSPROP_PORT_STATUS "com.vmware.common.port.volatile.status"
#define VMK_VDSPROP_PORT_TYPE "com.vmware.common.port.volatile.type"
#define VMK_VDSPROP_PORT_VLAN "com.vmware.common.port.volatile.vlan"
#define VMK_VDSPROP_PORT_PERSIST "com.vmware.common.port.volatile.persist"
/**
* \brief Port properties, configured/persisted from vCenter
*/
#define VMK_VDSPROP_PORT_PTALLOWED "com.vmware.common.port.ptAllowed"
#define VMK_VDSPROP_PORT_PTALLOWEDRT "com.vmware.common.port.ptAllowedRT"
#define VMK_VDSPROP_PORT_STATISTICS "com.vmware.common.port.statistics"
#define VMK_VDSPROP_PORT_ALIAS "com.vmware.common.port.alias"
#define VMK_VDSPROP_PORT_CONNECTID "com.vmware.common.port.connectid"
#define VMK_VDSPROP_PORT_PORTGROUP "com.vmware.common.port.portgroupid"
#define VMK_VDSPROP_PORT_BLOCK "com.vmware.common.port.block"
#define VMK_VDSPROP_PORT_LINK_STATUS "com.vmware.common.port.linkstatus"
#define VMK_VDSPROP_PORT_RESPOOLS_CFG "com.vmware.common.port.respools.cfg"
#define VMK_VDSPROP_PORT_RESPOOL_ASSOC "com.vmware.common.port.respool.assoc"
/**
* \brief Port properties for shaper, overlay, dvfilter modules.
*
* These properties will be deprecated.
*/
#define VMK_VDSPROP_PORT_SHAPER_INPUT "com.vmware.common.port.shaper.input"
#define VMK_VDSPROP_PORT_SHAPER_BROADCAST "com.vmware.common.port.shaper.broadcast"
#define VMK_VDSPROP_PORT_SHAPER_OUTPUT "com.vmware.common.port.shaper.output"
#define VMK_VDSPROP_PORT_OVERLAY "com.vmware.common.port.overlay"
#define VMK_VDSPROP_PORT_DVFILTER "com.vmware.common.port.dvfilter"
/**
* \brief For Cisco to show CDP info on the UI. It should be removed later.
*/
#define VMK_CISCO_PROP_SWITCH_CDP "com.cisco.svs.switch.cdp"
/**
* \brief Event notification about portset state changes.
*
* This is used with VMK_VDSPROP_HOST_PROXY_STATE property
*/
typedef enum {
/* Portset is going to be deactivated */
VMK_VDSPORTSET_STATE_DEACTIVE = 0x1,
/** Portset is going to be hotswapped to a different switch class */
VMK_VDSPORTSET_STATE_HOTSWAP = 0x2,
} vmk_VDSPropPortsetState;
/**
* \brief Maximum buffer length required for a vDS ID string.
*
* This buffer length includes the NULL terminator.
*/
#define VMK_VDS_ID_MAX_LEN 64
/**
* \brief Maximum buffer length required for a vDS name string.
*
* This buffer length includes the NULL terminator.
*/
#define VMK_VDS_NAME_MAX_LEN 81
/**
* \brief Maximum buffer length required for a vDS class name string.
*
* This buffer length includes the NULL terminator.
*/
#define VMK_VDS_CLASS_NAME_MAX_LEN 128
/**
* \brief Maximum buffer length required for a vDS port ID string.
*
* This buffer length includes the NULL terminator.
*/
#define VMK_VDS_PORT_ID_MAX_LEN 16
/**
* \brief Maximum buffer length required for a vDS port alias string.
*
* This buffer length includes the NULL terminator.
*/
#define VMK_VDS_PORT_ALIAS_MAX_LEN 81
/**
* \brief Port status flag.
*
* A port can have multiple status bits set
* (i.e. VMK_VDSPORT_STATUS_INUSE | VMK_VDSPORT_STATUS_LINKUP).
*/
typedef enum {
VMK_VDSPORT_STATUS_INUSE = 0x1,
VMK_VDSPORT_STATUS_LINKUP = 0x2,
VMK_VDSPORT_STATUS_BLOCKED = 0x4,
/**
* This flag should be ignored when the solution
* doesn't support vNIC passthrough
*/
VMK_VDSPORT_STATUS_PASSTHRU = 0x8
} vmk_VDSPortStatusFlag;
/**
* \brief Type of data item.
*
* It is passed in to callback registered for VMK_VDSPROP_PORT_STATUS property.
*/
typedef struct vmk_VDSPortStatus {
/** Port status flags defined in vmk_VDSPortStatusFlag */
vmk_uint64 flags;
/**
* Flag indicating why vNIC passthrough is disabled. This flag should be
* ignored when 3rd party solution doesn't support vNIC passthrough.
*/
vmk_uint64 noPassthruReason;
/** Ephemeral port ID of the port */
vmk_uint32 portID;
/**
* Display string to report port state, for example "Port blocked by
* admin"
*/
char displayStr[80];
} VMK_ATTRIBUTE_PACKED vmk_VDSPortStatus;
/**
* \brief Port statistics structure.
*
* This is the type of data item passed in to callback registered
* for VMK_VDSPROP_PORT_STATISTICS property and vmk_PortGetStats
* portset callback.
*/
typedef struct vmk_VDSPortStatistics {
vmk_uint64 pktsInUnicast;
vmk_uint64 bytesInUnicast;
vmk_uint64 pktsInMulticast;
vmk_uint64 bytesInMulticast;
vmk_uint64 pktsInBroadcast;
vmk_uint64 bytesInBroadcast;
vmk_uint64 pktsOutUnicast;
vmk_uint64 bytesOutUnicast;
vmk_uint64 pktsOutMulticast;
vmk_uint64 bytesOutMulticast;
vmk_uint64 pktsOutBroadcast;
vmk_uint64 bytesOutBroadcast;
vmk_uint64 pktsInDropped;
vmk_uint64 pktsOutDropped;
vmk_uint64 pktsInException;
vmk_uint64 pktsOutException;
} VMK_ATTRIBUTE_PACKED vmk_VDSPortStatistics;
/**
* \brief Type of VlanID range.
*/
typedef struct vmk_VDSPortVIDRange {
vmk_uint16 minVID;
vmk_uint16 maxVID;
} VMK_ATTRIBUTE_PACKED vmk_VDSPortVIDRange;
/**
* \brief Port VLAN info structure
*
* This is the type of data item passed in to callback registered for
* VMK_VDSPROP_PORT_VLAN property.
*/
typedef struct vmk_VDSPortVlanInfo {
vmk_uint16 vlanID;
vmk_uint16 numRanges;
vmk_VDSPortVIDRange vidRanges[0];
} VMK_ATTRIBUTE_PACKED vmk_VDSPortVlanInfo;
/**
* \brief Virtual distributed switch host status.
*
* It reflects whether VDS is functional on a particular host. vSphere
* looks at the host status when making VM placement decisions.
*/
typedef enum {
/** VDS is in full service. */
VMK_VDS_STATUS_OK = 0x0,
/** VDS is at reduced service. */
VMK_VDS_STATUS_DEGRADED = 0x1,
/** VDS is out of service. */
VMK_VDS_STATUS_DOWN = 0x2
} vmk_VDSHostStatus;
#endif
/** @} */
/** @} */
|