OID_NIC_SWITCH_ENUM_VPORTS

An overlying driver or user-mode application issues an object identifier (OID) method request of OID_NIC_SWITCH_ENUM_VPORTS to obtain an array. Each element in the array specifies the attributes of a virtual port (VPort) that has been created 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 query requests of OID_NIC_SWITCH_ENUM_VPORTS to enumerate the VPorts that are allocated on a network adapter's NIC switch.

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

  • If the NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_SWITCH flag is set in the Flags member, information is retuned for all VPorts created on a specified NIC switch. The NIC switch is specified by the SwitchId member of that structure.

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

  • If the NDIS_NIC_SWITCH_VPORT_INFO_ARRAY_ENUM_ON_SPECIFIC_FUNCTION flag is set in the Flags member, information is retuned for all VPorts attached to a specified PCI Express (PCIe) Physical Function (PF) or Virtual Function (VF) on the network adapter. The PF or VF is specified by the AttachedFunctionId member of that structure.

    If the AttachedFunctionId member is set to NDIS_PF_FUNCTION_ID, information is returned for all VPorts, including the default VPort, that are attached to the network adapter's PF. If the AttachedFunctionId member is set to a valid VF identifier, information is returned for all VPorts to the specified VF.

    Note  Starting with Windows Server 2012, only one nondefault VPort can be attached to a VF. However, multiple VPorts (including the default VPort) can be attached to the PF.

  • If the Flags member is set to zero, information is returned for all VPorts attached to the PF or VF on the network adapter. In this case, the values of the SwitchId and AttachedFunctionId are ignored.

For more information, see Enumerating Virtual Ports on a Network Adapter.

Return Status Codes

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

When NDIS handles the OID_NIC_SWITCH_ENUM_VPORTS request, it returns one of the following status codes:

Status CodeDescription

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_VPORT_INFO
NDIS_NIC_SWITCH_VPORT_INFO_ARRAY
NDIS_OID_REQUEST
OID_NIC_SWITCH_CREATE_SWITCH
OID_NIC_SWITCH_PARAMETERS

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft