Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
NdisGetCacheFillSize returns the microprocessor's data cache-line boundary in bytes.
This function has no parameters.
If NdisGetCacheFillSize succeeds, it returns the host cache fill size.
Drivers of DMA NICs can use the information returned by this function to avoid cache-line tearing during DMA transfers.
For example, a NIC driver might use the value returned by NdisGetCacheFillSize in any (or all) of the following ways:
Allocate cache-aligned buffers for DMA operations.
Transfer data from aligned buffers that are sized as an integral of the value returned by this function.
Subtract one from the returned value and use the result as a mask to determine whether a "physical" address in shared memory is aligned on a cache-line boundary.
Windows XP and later versions support the NdisMGetDmaAlignment function for retrieving the microprocessor's data cache-line boundary.
Callers of NdisGetCacheFillSize must run at IRQL = PASSIVE_LEVEL. Usually, miniport drivers call this function during initialization and save the value it returns.
|Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.Windows XP supports this function for legacy drivers. However, the Windows XP DDK will not build an NDIS driver that calls this function. Instead of using NdisGetCacheFillSize, use NdisMGetDmaAlignment.|
|PASSIVE_LEVEL (See Remarks section)|
Build date: 11/16/2013