NDIS_BUFFER_TO_SPAN_PAGES

ULONG
NDIS_BUFFER_TO_SPAN_PAGES(
IN PNDIS_BUFFER Buffer
);

NDIS_BUFFER_TO_SPAN_PAGES determines how many physical pages of memory are being used to back a given buffer.

Parameters

Buffer

Specifies the buffer descriptor mapping the buffer.

Return Value

NDIS_BUFFER_TO_SPAN_PAGES returns the number of pages backing the virtual range for the buffer.

Comments

This macro can be used by DMA drivers to determine how many physical discontiguities exist in a given virtual buffer.

Callers of NDIS_BUFFER_TO_SPAN_PAGES can be running at any IRQL.

See Also

NdisMSetupDmaTransfer, NdisMStartBufferPhysicalMapping