NdisMGetDmaAlignment function

The NdisMGetDmaAlignment function returns the alignment requirements of the DMA system for a NIC.

Syntax


ULONG NdisMGetDmaAlignment(
  _In_  NDIS_HANDLE MiniportAdapterHandle
);

Parameters

MiniportAdapterHandle [in]

An NDIS handle that identifies the miniport adapter for the NIC. This handle was originally passed to the MiniportInitializeEx function.

Return value

Returns a value that specifies the alignment requirements of the DMA system. The miniport driver uses this value to round up the size of a receive buffer to a cache-line size or a multiple of that size when it allocates such a buffer.

Remarks

Note  A miniport driver must have already called NdisMRegisterScatterGatherDma or NdisMRegisterDmaChannel to initialize a scatter/gather DMA channel before calling NdisMGetDmaAlignment.

A miniport driver can call the NdisMGetDmaAlignment function to determine alignment requirements for DMA buffers that it allocates. A miniport driver might require increasing the returned value because of additional hardware device restrictions.

Requirements

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

IRQL

= PASSIVE_LEVEL

DDI compliance rules

Irql_Miniport_Driver_Function

See also

MiniportInitializeEx
NdisMRegisterScatterGatherDma

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft