Registering a NetDMA Provider
Note The NetDMA interface is not supported in Windows 8 and later.
After a NetDMA provider driver successfully completes driver initialization and returns from its DriverEntry routine, the Plug and Play (PnP) manager calls the NetDMA provider driver's AddDevice routine to add dynamic memory access (DMA) engines. The PnP manager calls AddDevice once for each DMA engine that it detected. For more information about the NetDMA provider driver's DriverEntry routine, see Initializing a NetDMA Provider Driver.
The AddDevice routine calls the IoCreateDevice function to create a functional device object (FDO) and inserts the FDO at the top of the device stack. The NetDMA provider driver then calls the NetDmaRegisterProvider function to register the associated NetDMA provider.
The NetDMA provider driver supplies a NET_DMA_PROVIDER_CHARACTERISTICS structure in the ProviderCharacteristics parameter of NetDmaRegisterProvider. The characteristics structure contains:
The driver major and minor version numbers.
The physical device object (PDO) that is associated with the NetDMA provider. The PnP manager supplies a pointer to the PDO in the PhysicalDeviceObject parameter of AddDevice.
The maximum number of the DMA channels that the DMA engine can support.
The NetDMA provider driver reports other capabilities of the DMA engine (such as the actual number of DMA channels that are available, maximum address space, and maximum transfer size) while handling the IRP_MN_START_DEVICE IRP. For more information about handling this start IRP, see Starting a NetDMA Provider.
The NetDMA provider driver provides a pointer to a block of driver-allocated context information in the ProviderContext parameter of NetDmaRegisterProvider. This context area stores information about the NetDMA provider. The NetDMA interface passes the context information in subsequent calls to ProviderXxx functions that require a NetDMA provider context.
When NetDmaRegisterProvider returns, it provides a handle in the location that the pNetDmaProviderHandle parameter specifies. The NetDMA interface assigns this handle to identify the NetDMA provider. The NetDMA provider driver then uses this handle in all subsequent calls to NetDmaXxx functions that are associated with the NetDMA provider.
If a computer supports MSI-X, the NetDMA interface, while in the context of the NetDmaRegisterProvider function, can call the NetDMA provider driver's ProviderSetDmaChannelCpuAffinity function to specify the CPU affinity of the interrupt for each DMA channel. For more information about setting interrupt CPU affinities, see Setting the NetDMA Interrupt CPU Affinities.