Files
@ d6b9b2ac5869
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public-bincomp/vmkernel64/release/net/vmkapi_net_portset.h
d6b9b2ac5869
7.5 KiB
text/x-chdr
ESXi-5.5-U2
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 |
/* **********************************************************
* Copyright 2013 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
***********************************************************************
* Portset */ /**
* \addtogroup Network
* @{
* \defgroup Portset Interface
*
* Portsets are groups of ports which, together with policies for frame
* routing, form virtual networks. Virtual nics connected to the ports
* may forward packets to each other. The analogy is to a box (like a
* a hub or a switch) containing some type of backplane for connecting
* multiple ports in the physical world.
*
* @{
***********************************************************************
*/
#ifndef _VMKAPI_NET_PORTSET_H_
#define _VMKAPI_NET_PORTSET_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 */
#include "net/vmkapi_net_types.h"
#include "net/vmkapi_net_uplink.h"
/*
***********************************************************************
* vmk_PortsetAddUplink -- */ /**
*
* \brief Request to add an uplink to a portset.
*
* An vswitch implementation can use this API to add a named uplink to a
* named portset.
*
* Vmkernel will connect the uplink to the relevant portset and enable
* the port if connection is successful.
*
* \note This API is not to be used for VDS based vswitch. The operation
* will be triggered automatically from user space for VDS vswitch.
*
* \note If the uplink is already associated with a vSwitch, the operation
* may fail.
*
* \note The portset must be activated.
*
* \note Shouldn't be holding any handles to the portset.
*
* \note This function will not block.
*
* \param[in] psName portset name.
* \param[in] uplinkDevName uplink device name (vmnic*)
* \param[out] portID This is optional, the portID the uplink
* connect to.
*
* \retval VMK_BAD_PARAM psName or uplinkDevName is NULL.
* \retval VMK_NOT_FOUND uplinkDevName not found
* \retval VMK_BUSY the uplink already connected to a portset
* \retval VMK_LIMIT_EXCEEDED no more port for the uplink.
* \retval VMK_NO_MEMORY memory allocation failure
* \retval VMK_OK Successfully add the uplink to the
* portset.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetAddUplink(char *psName,
char *uplinkDevName,
vmk_SwitchPortID *portID);
/*
***********************************************************************
* vmk_PortsetRemoveUplink -- */ /**
*
* \brief Request to remove an uplink from a portset.
*
* An vswitch implementation can use this API to remove a named uplink
* from a named portset.
*
* Vmkernel will disable the uplink and disconnect from the relevant
* portset.
*
* \note This API is not to be used for VDS based vswitch. The operation
* will be triggered automatically from user space.
*
* \note Shouldn't be holding any handles to the portset.
*
* \note The portset must be activated.
*
* \note This function will not block.
*
* \param[in] psName portset name.
* \param[in] uplinkDevName uplink device name (vmnic*)
*
* \retval VMK_BAD_PARAM psName or uplinkDevName is NULL.
* \retval VMK_NOT_FOUND named portset not found
* \retval VMK_FAILURE other errors.
* \retval VMK_OK The relevant uplink is removed from the
* portset.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetRemoveUplink(char *psName,
char *uplinkDevName);
/*
***********************************************************************
* vmk_PortsetCreate -- */ /**
*
* \brief Request to create a portset
*
* External module can use this API to create a portset with a specific
* calass.
*
* Vmkernel will create and activate a portset
*
* \note This API is not to be used for VDS based vswitch. The operation
* will be triggered automatically from user space.
*
* \note Shouldn't be holding any handles to the portset.
*
* \note This function will not block.
*
* \param[in] psName portset name.
* \param[in] className portset class name.
* \param[in] numPorts number of ports the new portset supports.
* \param[in] flags reserved, set to zero
*
* \retval VMK_BAD_PARAM psName or className is NULL or className
* is null string
* \retval VMK_NOT_SUPPORTED The request portset class not found
* \retval VMK_EXIST portset with the request psName exists.
* \retval VMK_NO_RESOURCES no free portset available.
* \retval VMK_LIMIT_EXCEEDED the request numPort exceed the supported
* limit.
* \retval VMK_NO_MEMORY memory allocation failure
* \retval VMK_OK Successfully create a portset.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetCreate(char *psName,
char *className,
vmk_uint32 numPorts,
vmk_uint32 flags);
/*
***********************************************************************
* vmk_PortsetDestroy -- */ /**
*
* \brief Request to destroy a portset
*
* External module can use this API to destroy a named portset.
*
* VMKernel will try to first disconnect all ports and deactivate the
* portset.
*
* \note This API is not to be used for VDS based vswitch. The operation
* will be triggered automatically from user space.
*
* \note Shouldn't be holding any handles to the portset.
*
* \note This function will not block.
*
* \note All connected port will be disconnected. Normally the caller
* shoild make sure all clients are disabled and disconnected.
*
* \param[in] psName portset name.
*
* \retval VMK_BAD_PARAM psName is NULL or length is too large.
* \retval VMK_NOT_FOUND named portset not found
* \retval VMK_OK Successfully destroyed the portset.
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetDestroy(char *psName);
/*
***********************************************************************
* vmk_PortsetGetMTU -- */ /**
*
* \brief Get MTU setting on a portset
*
* \nativedriversdisallowed
*
* \note This function will not block.
*
* \note The caller should hold at least an immutable portset handle
*
* \param[in] ps Handle to a portset
* \param[out] mtu MTU setting on the portset
*
* \retval VMK_OK Success.
* \retval VMK_BAD_PARAM An argument is NULL.
* \retval VMK_FAILURE Improper portset handle is held
*
***********************************************************************
*/
VMK_ReturnStatus vmk_PortsetGetMTU(vmk_Portset *ps,
vmk_uint32 *mtu);
#endif /* _VMKAPI_NET_PORTSET_H_ */
/** @} */
/** @} */
|