OID_NIC_SWITCH_FREE_VF

An overlying driver issues an object identifier (OID) set request of OID_NIC_SWITCH_FREE_VF to free the resources for a network adapter's PCI Express (PCIe) Virtual Function (VF).

Overlying drivers issue this OID set request to the miniport driver for the network adapter's PCIe Physical Function (PF). This OID set request is required for PF miniport drivers that support the single root I/O virtualization (SR-IOV) interface.

The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_NIC_SWITCH_FREE_VF_PARAMETERS structure.

The overlying driver specifies the identifier of the VF to be freed through the VFId member of this structure. The driver obtained this identifier from an earlier OID method request of OID_NIC_SWITCH_ALLOCATE_VF.

Remarks

An overlying driver issues an OID set request of OID_NIC_SWITCH_FREE_VF to free the resources for a VF. These resources were previously allocated through an OID method request of OID_NIC_SWITCH_ALLOCATE_VF.

For more information about how to free VF resources, see Freeing Resources for a Virtual Function.

Note  Once an overlying driver requests resource allocation for a VF, that driver is the only component that can request the freeing of the resources for the same VF. The overlying driver must issue an OID set request of OID_NIC_SWITCH_FREE_VF to free the VF resources. Before the overlying driver can be halted, it must free the resources for each VF that was allocated by the driver's OID_NIC_SWITCH_ALLOCATE_VF request.

Return status codes

The miniport driver's MiniportOidRequest function returns one of the following values for this request:

Term Description

NDIS_STATUS_SUCCESS

The miniport driver completed the request successfully.

NDIS_STATUS_PENDING

The miniport driver will complete the request asynchronously. After the miniport driver has completed all processing, it must succeed the request by calling the NdisMOidRequestComplete function, passing NDIS_STATUS_SUCCESS for the Status parameter.

NDIS_STATUS_NOT_ACCEPTED

The miniport driver is resetting.

NDIS_STATUS_REQUEST_ABORTED

The miniport driver stopped processing the request. For example, NDIS called the MiniportResetEx function.

NDIS returns one of the following status codes for this request:

Term Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_NOT_SUPPORTED

The PF miniport driver either does not support the SR-IOV interface or is not enabled to use the interface.

NDIS_STATUS_FILE_NOT_FOUND

One or more of the members of the NDIS_NIC_SWITCH_FREE_VF_PARAMETERS structure have invalid values. For example, the VFId member might specify a VF that either has not been allocated or that has VPorts that have not been deleted.

NDIS_STATUS_INVALID_LENGTH

The information buffer is too small. NDIS sets the DATA.SET_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


NDIS_NIC_SWITCH_FREE_VF_PARAMETERS

NDIS_OID_REQUEST

NdisCloseAdapterEx

OID_NIC_SWITCH_ALLOCATE_VF

OID_NIC_SWITCH_CREATE_VPORT

OID_NIC_SWITCH_DELETE_VPORT

OID_NIC_SWITCH_DELETE_SWITCH