OID_SRIOV_READ_VF_CONFIG_BLOCK

An overlying driver issues an object identifier (OID) method request of OID_SRIOV_READ_VF_CONFIG_BLOCK to read data from a specified PCI Express (PCIe) Virtual Function (VF) configuration block.

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 a caller-allocated buffer. This buffer is formatted to contain the following:

  • An NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS structure that contains the offset, in units of bytes, from the beginning of this structure to a location within the buffer that contains the data that is read from the VF configuration block.

  • Additional buffer space for the data to be read from the specified VF configuration block.

Remarks

A VF configuration block is used for backchannel communication between the PF and VF miniport drivers. The IHV can define one or more VF configuration blocks for the miniport drivers. Each VF configuration block has an IHV-defined format, length, and block ID.

Note  Data from each VF configuration block is used only by the PF and VF miniport drivers.

Before it issues the OID method request of OID_SRIOV_READ_VF_CONFIG_BLOCK, the overlying driver must set the members of NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS structure in the following way:

  • Set the VFId member to the identifier of the VF from which the information is to be read.

  • Set the BlockId member to the identifier of the VF configuration block from which the information is to be read.

  • Set the Length member to the number of bytes to read from the configuration block.

  • Set the BufferOffset member to the offset within the buffer (referenced by InformationBuffer member) that will contain the data that is read from the specified VF configuration block. This offset is specified in units of bytes from the beginning of the NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS structure.

When it handles the OID method request of OID_SRIOV_READ_VF_CONFIG_BLOCK, the PF miniport driver must follow these guidelines:

  • The PF miniport driver must verify that the VF, specified by the VFId member of the NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS structure, has resources that have been previously allocated. The PF miniport driver allocates resources for a VF during an OID method request of OID_NIC_SWITCH_ALLOCATE_VF. If resources for the specified VF have not been allocated, the driver must fail the OID request.

  • The PF miniport driver must verify that the BlockId member of the NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS structure specifies a valid VF configuration block. If not, the driver must fail the OID request.

For more information about backchannel communication within the single root I/O virtualization (SR-IOV) interface, see SR-IOV PF/VF Backchannel Communication.

Return Status Codes

The PF miniport driver returns one of the following status codes for the method request of OID_SRIOV_READ_VF_CONFIG_BLOCK.

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

NDIS_STATUS_INVALID_LENGTH

The information buffer was too short. The 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_OID_REQUEST

NDIS_SRIOV_READ_VF_CONFIG_BLOCK_PARAMETERS

OID_NIC_SWITCH_ALLOCATE_VF

OID_SRIOV_READ_VF_CONFIG_SPACE