// ndis.h
void NDIS_MAKE_RID(
_Segment,
_Bus,
_Function
);
View the official Windows Driver Kit DDI referenceNo description available.
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).
_SegmentThe 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.
_BusThe PCIe bus number of the bus on which the network adapter is attached.
_FunctionThe function number of a logical device on the network adapter.
NDIS_MAKE_RID returns an NDIS_VF_RID value that is constructed from the parameters.
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.
NdisMGetVirtualFunctionLocation