次の方法で共有


Porting CoNDIS Miniport Driver Send Data Handling

In NDIS 6.0, the MiniportCoSendNetBufferLists function replaces the NDIS 5.x MiniportCoSendPackets function. MiniportCoSendNetBufferLists receives a pointer to a linked list of NET_BUFFER_LIST structures, each of which contains a linked list of NET_BUFFER structures. MiniportCoSendNetBufferLists does not return a completion status, so a miniport driver should always complete a send operation asynchronously by calling the NdisMCoSendNetBufferListsComplete function.

CoNDIS 5.x miniport drivers specify the completion status of a send operation as a parameter for the NdisMCoSendComplete function. CoNDIS 6.0 miniport drivers, however, specify the completion status in the NET_BUFFER_LIST structure by calling the NET_BUFFER_LIST_STATUS macro, as the following example shows:

NET_BUFFER_LIST_STATUS(pNetBufferList) = NDIS_STATUS_SUCCESS

The completion status applies to all of the NET_BUFFER structures that are associated with the NET_BUFFER_LIST structure. Therefore, a miniport driver should set the completion status to NDIS_STATUS_SUCCESS only if the data in all of the NET_BUFFER structures that are associated with the NET_BUFFER_LIST structure was transmitted successfully.

If a miniport driver uses scatter/gather direct memory access (SGDMA), the driver must call the NdisMAllocateNetBufferSGList function once for each NET_BUFFER structure for which it must obtain a scatter/gather DMA list. For more information about SGDMA, see Porting Miniport Driver DMA Operations to NDIS 6.0.

For more information about how CoNDIS miniport drivers handle send data, see Sending NET_BUFFER Structures from CoNDIS Drivers.