DMA_CHANNELS_CPU_AFFINITY_HANDLER callback function (netdma.h)
in Windows 8 and later.
Syntax
DMA_CHANNELS_CPU_AFFINITY_HANDLER DmaChannelsCpuAffinityHandler;
NTSTATUS DmaChannelsCpuAffinityHandler(
[in] PVOID ProviderContext,
[in] PNET_DMA_CHANNEL_CPU_AFFINITY CpuAffinityArray,
[in] ULONG CpuAffinityArraySize
)
{...}
Parameters
[in] ProviderContext
A pointer that identifies a DMA provider's context area. The DMA provider driver passed this pointer to NetDMA in a call to the NetDmaRegisterProvider function.
[in] CpuAffinityArray
A pointer to an array of NET_DMA_CHANNEL_CPU_AFFINITY structures that specify the CPU affinities for the DMA channels that are associated with the DMA provider.
[in] CpuAffinityArraySize
The length, in bytes, of the buffer at CpuAffinityArray .
Return value
ProviderSetDmaChannelCpuAffinity returns one of the following status values:
Return code | Description |
---|---|
|
The operation completed successfully. |
|
The operation failed because of insufficient resources. |
|
The operation failed for unspecified reasons. |
Remarks
The NetDMA interface calls a DMA provider driver's ProviderSetDmaChannelCpuAffinity function to specify the CPU affinities of a DMA provider's DMA channels. NetDMA calls ProviderSetDmaChannelCpuAffinity while in the context of the NetDmaRegisterProvider function.
Because the actual number of DMA channels is not known before a DMA provider is started, the NetDMA interface specifies the CPU affinities for the maximum number of channels. The DMA provider supplies the maximum number of channels in the MaxDmaChannelCount member of the NET_DMA_PROVIDER_CHARACTERISTICS structure that it passes to the NetDmaRegisterProvider function.
On computers that do not support MSI-X platforms, CPU affinities can be specified for the interrupt DPCs but not for the interrupts. In this case, the NetDMA interface specifies a list of possible CPUs for the interrupt DPC in the ProcessorAffinityMask member of the NET_DMA_CHANNEL_PARAMETERS structure.
On computers that do support MSI-X, the DMA provider driver can specify interrupt affinities while handling the IRP_MN_FILTER_RESOURCE_REQUIREMENTS IRP.
NetDMA calls ProviderSetDmaChannelCpuAffinity at IRQL = PASSIVE_LEVEL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported for NetDMA 1.0 drivers in Windows Vista. |
Target Platform | Windows |
Header | netdma.h (include Netdma.h) |
IRQL | PASSIVE_LEVEL |