An overlying driver issues an object identifier (OID) method request of OID_NIC_SWITCH_ALLOCATE_VF to allocate resources for a PCI Express (PCIe) Virtual Function (VF). The VF is exposed on a network adapter that supports the single root I/O virtualization (SR-IOV) interface.

Overlying drivers issue this OID method request to the miniport driver for the network adapter's PCIe Physical Function (PF). This OID method 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_VF_PARAMETERS structure.


The PF miniport driver allocates software resources for a VF when the driver handles an object identifier (OID) method request of OID_NIC_SWITCH_ALLOCATE_VF. Even though the hardware resources have been allocated for a VF, it is considered to be nonoperational until the PF miniport driver successfully completes the OID_NIC_SWITCH_ALLOCATE_VF.

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

Note  After 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 PF miniport driver returns one of the following status codes for the OID method request of OID_NIC_SWITCH_ALLOCATE_VF.

Status CodeDescription


The OID request completed successfully.


The PF miniport driver either does not support the single root I/O virtualization (SR-IOV) interface or is not enabled to use the interface.


One or more of the members of the NDIS_NIC_SWITCH_VF_PARAMETERS structure have invalid values.


The length of the information buffer is less than sizeof(NDIS_NIC_SWITCH_VF_PARAMETERS). The PF miniport driver must set the DATA.METHOD_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.


The request failed for other reasons.




Supported in NDIS 6.30 and later.


Ntddndis.h (include Ndis.h)

See also




Send comments about this topic to Microsoft

© 2015 Microsoft