This function flushes the memory region described by a specified buffer descriptor from all processor caches.
Header file: | Ndis.h |
Windows CE versions: | 2.0 and later |
VOID NdisFlushBuffer( IN PNDIS_BUFFER Buffer,
IN BOOLEAN WriteToDevice );
If the NIC driver specifies FALSE, it must ensure the buffer begins and ends on a cache-line boundary.
Drivers of busmaster DMA NICs call this function to maintain data integrity in shared memory. Flushing the buffer ensures coherency between the host memory cache and processor physical memory before a DMA transfer to or from the network interface card.
The driver flushes such a buffer when data that it shares with its NIC might be cached. For any transfer between host memory and a busmaster DMA NIC, the miniport must flush the buffer before the transfer starts. Such a driver also must ensure that host memory is not accessed until the transfer completes.
A driver that calls this function runs at IRQL <= DISPATCH_LEVEL.