OID_NIC_SWITCH_ENUM_VFS

An overlying driver or user-mode application issues an object identifier (OID) method request of OID_NIC_SWITCH_ENUM_VFS to obtain an array. Each element in the array specifies the attributes of a PCI Express (PCIe) Virtual Function (VF) that are attached to a NIC switch on a network adapter's NIC switch.

After a successful return from this OID query request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer that contains the following:

Remarks

Overlying drivers and user-mode applications issue OID method requests of OID_NIC_SWITCH_ENUM_VFS to enumerate the VFs attached to a network adapter's NIC switch.

Before the driver or application issues the OID request, it must initialize an NDIS_NIC_SWITCH_VF_INFO_ARRAY structure that is passed along with the request. The driver or application must follow these guidelines when initializing the NDIS_NIC_SWITCH_VF_INFO_ARRAY structure:

  • If the NDIS_NIC_SWITCH_VF_INFO_ARRAY_ENUM_ON_SPECIFIC_SWITCH flag is set in the Flags member, the driver or application must set the SwitchId member to the NIC switch identifier on the SR-IOV network adapter. By setting these members in this way, VF information is returned only for the specified NIC switch on the SR-IOV network adapter.

    Note  The overlying driver and user-mode application can obtain the NIC switch identifiers by issuing an OID query request of OID_NIC_SWITCH_ENUM_SWITCHES.

  • If the Flags member is set to zero, the driver or application must set the SwitchId member to zero. By setting these members in this way, VF information is returned for all NIC switch on the SR-IOV network adapter.

Note  Starting with Windows Server 2012, Windows supports only the default NIC switch on the network adapter. Regardless of the flags set in the Flags member, the SwitchId member must be set to NDIS_DEFAULT_SWITCH_ID.

For more information about NIC switches, see NIC Switches.

Return Status Codes

NDIS handles the OID method request of the OID_NIC_SWITCH_ENUM_VFS request for miniport drivers. The drivers will not be issued this OID request.

When NDIS handles the OID_NIC_SWITCH_ENUM_VFS request, it returns one of the following status codes.

Status Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_NOT_SUPPORTED

The 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_INFO_ARRAY structure have invalid values.

NDIS_STATUS_INVALID_LENGTH

The information buffer was too short. NDIS sets 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_NIC_SWITCH_VF_INFO

NDIS_NIC_SWITCH_VF_INFO_ARRAY

NDIS_OID_REQUEST

OID_NIC_SWITCH_ALLOCATE_VF

OID_NIC_SWITCH_CREATE_SWITCH

OID_NIC_SWITCH_VF_PARAMETERS