Rediger

Del via


OID_NIC_SWITCH_VPORT_PARAMETERS

An overlying driver can obtain the parameters for a virtual port (VPort) on a NIC switch that has been created on a network adapter that supports single root I/O virtualization (SR-IOV). The driver issues an object identifier (OID) method request of OID_NIC_SWITCH_VPORT_PARAMETERS to obtain these parameters.

Overlying drivers issue an OID set request of OID_NIC_SWITCH_VPORT_PARAMETERS to set the configuration parameters of a specified VPort that is attached to the network adapter's NIC switch. These OID set requests are issued to the miniport driver of the network adapter's PCI Express (PCIe) Physical Function (PF). These OID set requests are 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_VPORT_PARAMETERS structure.

The overlying driver specifies the VPort for the OID method or set request by setting the VPortId member of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure to the identifier associated with the VPort. The overlying driver obtains the VPort identifier through one of the following ways:

Remarks

OID_NIC_SWITCH_VPORT_PARAMETERS can be used in either OID method requests or OID set requests.

Handling OID Method Requests of OID_NIC_SWITCH_VPORT_PARAMETERS

Overlying drivers issue an OID method request of OID_NIC_SWITCH_VPORT_PARAMETERS to query the current configuration parameters of a VPort that is attached to the network adapter's NIC switch. Overlying drivers specify the VPort to query by setting the VPortId member of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure to the VPort identifier.

NDIS handles the OID method request of OID_NIC_SWITCH_VPORT_PARAMETERS for miniport drivers. NDIS returns information that it obtained from previous OID requests of OID_NIC_SWITCH_CREATE_VPORT and OID_NIC_SWITCH_ENUM_VPORTS.

After a successful return from the OID method request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_NIC_SWITCH_VPORT_PARAMETERS structure. This structure contains the configuration parameters for the specified switch.

For more information, see Querying the Parameters of a Virtual Port.

Handling OID Set Requests of OID_NIC_SWITCH_VPORT_PARAMETERS

Overlying drivers issue an OID set request of OID_NIC_SWITCH_VPORT_PARAMETERS to change the current configuration parameters of a VPort that is attached to a network adapter's NIC switch. This OID request can be used to update the parameters for default as well as nondefault VPorts.

Only a limited subset of configuration parameters for a VPort can be changed. The overlying driver specifies the parameter to change by setting the following members of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure:

  1. The VPortId member is set to the identifier of the VPort whose parameters will be changed.

  2. The appropriate NDIS_NIC_SWITCH_VPORT_PARAMETERS_Xxx_CHANGED flags are set in the Flags member. Members of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure can only be changed if a corresponding NDIS_NIC_SWITCH_PARAMETERS_Xxx_CHANGED flag is defined in Ntddndis.h.

  3. The corresponding members of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure are set with the VPort configuration parameters that are to be changed.

After the PF miniport driver receives the OID set request of OID_NIC_SWITCH_VPORT_PARAMETERS, the driver configures the hardware with the configuration parameters. The driver can only change those configuration parameters identified by NDIS_NIC_SWITCH_VPORT_PARAMETERS_Xxx_CHANGED flags in the Flags member of the NDIS_NIC_SWITCH_VPORT_PARAMETERS structure.

For more information, see Setting the Parameters of a Virtual Port.

Return Status Codes

NDIS or the PF miniport driver returns the following status code for set or method OID requests of OID_NIC_SWITCH_VPORT_PARAMETERS.

Status Code Description

NDIS_STATUS_SUCCESS

The request completed successfully. The InformationBuffer points to an NDIS_NIC_SWITCH_CAPABILITIES structure.

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

NDIS_STATUS_INVALID_LENGTH

The information buffer was too short. NDIS or the PF miniport driver sets the DATA.METHOD_INFORMATION.BytesNeeded member (for OID method requests) or DATA.SET_INFORMATION.BytesNeeded member (for OID set requests) 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_PARAMETERS

NDIS_OID_REQUEST

OID_NIC_SWITCH_CREATE_VPORT

OID_NIC_SWITCH_ENUM_VPORTS