NDIS_MAKE_RID macro

The NDIS_MAKE_RID macro builds an NDIS_VF_RID value from PCI Express (PCIe) segment, bus, device, and function numbers. The miniport driver uses this value as a PCIe Requestor ID (RID) for a network adapter's PCIe Virtual Function (VF).

Syntax

void NDIS_MAKE_RID(
   _Segment,
   _Bus,
   _Function
);

Parameters

_Segment

The PCIe segment number for the group of PCIe buses on which the device is attached. A PCIe segment is a set of PCIe buses that share configuration space.

_Bus

The PCIe bus number of the bus on which the network adapter is attached.

_Function

The function number of a logical device on the network adapter.

Return Value

NDIS_MAKE_RID returns an NDIS_VF_RID value that is constructed from the parameters.

Remarks

When it handles an OID request of OID_NIC_SWITCH_ALLOCATE_VF, the miniport driver for the PCIe Physical Function (PF) uses the NDIS_MAKE_RID macro to create a PCIe Requestor ID (RID) value for the VF. The driver retrieves the PCIe segment, bus, device, and function numbers for the VF by calling NdisMGetVirtualFunctionLocation.

Note

If an independent hardware vendor (IHV) provides a virtual bus driver (VBD) as part of its SR-IOV driver package, its PF miniport driver must not call NdisMGetVirtualFunctionLocation. Instead, the driver must interface with the VBD through a private communication channel, and request that the VBD call GetLocation. This function is exposed from the GUID_PCI_VIRTUALIZATION_INTERFACE interface supported by the underlying PCI bus driver.

Requirements

   
Minimum supported client Supported in NDIS 6.30 and later.
Target Platform Desktop
Header ndis.h

See Also

NdisMGetVirtualFunctionLocation

OID_NIC_SWITCH_ALLOCATE_VF