次の方法で共有


NdisMFreeNetBufferSGList (Compact 2013)

3/26/2014

Bus-master miniport drivers call the NdisMFreeNetBufferSGList function to free scatter/gather list resources that were allocated by calling the NdisMAllocateNetBufferSGList function.

Syntax

VOID
  NdisMFreeNetBufferSGList(
    IN NDIS_HANDLE  NdisMiniportDmaHandle,
    IN PSCATTER_GATHER_LIST  pSGL,
    IN PNET_BUFFER  NetBuffer
    ); 

Parameters

  • NdisMiniportDmaHandle
    A handle to a context area that NDIS uses to manage a DMA resource. The caller obtained this handle by calling the NdisMRegisterScatterGatherDma function.
  • pSGL
    A pointer to a miniport driver scatter/gather list buffer.
  • NetBuffer
    A pointer to the NET_BUFFER structure associated with the specified scatter/gather list buffer.

Return Value

None

Remarks

Bus-master miniport drivers must call the NdisMFreeNetBufferSGList function to free a scatter/gather list. A miniport driver typically calls NdisMFreeNetBufferSGList from its MiniportInterruptDPC function while it is handling a send complete interrupt or at any time that the driver no longer requires the scatter/gather list. Do not call NdisMFreeNetBufferSGList while the driver or hardware is still accessing the memory that is described by the NET_BUFFER structure that is associated with the scatter/gather list.

Miniport drivers can free the buffer that was specified in the ScatterGatherListBuffer parameter of the NdisMAllocateNetBufferSGList function after NdisMFreeNetBufferSGList returns. However, frequently, it is more efficient to reuse the buffer for subsequent DMA operations.

Requirements

Header

ndis.h

See Also

Reference

NDIS Scatter/Gather DMA Functions
NET_BUFFER
NdisMAllocateNetBufferSGList
NdisMRegisterScatterGatherDma