Upravit

Sdílet prostřednictvím


OID_NIC_SWITCH_ALLOCATE_VF

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.

Remarks

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 Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_NOT_SUPPORTED

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.

NDIS_STATUS_INVALID_PARAMETER

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

NDIS_STATUS_INVALID_LENGTH

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.

NDIS_STATUS_FAILURE

The request failed for other reasons.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


NDIS_MAKE_RID

OID_NIC_SWITCH_CREATE_SWITCH

OID_NIC_SWITCH_CREATE_VPORT

NDIS_NIC_SWITCH_VF_PARAMETERS

OID_NIC_SWITCH_FREE_VF