NdisMSendResourcesAvailable

VOID
    NdisMSendResourcesAvailable(
        IN
 NDIS_HANDLE MiniportAdapterHandle
        );

NdisMSendResourcesAvailable notifies NDIS that a miniport has sufficient internal resources to accept another send request, even though one or more outstanding send packets are pending within the miniport.

Parameters

MiniportAdapterHandle
Specifies the handle originally input to MiniportInitialize.

Comments

The NDIS library queues send requests on behalf of miniports so each NIC driver can deal with one device transmit operation at a time, although a miniport can transmit several packets per operation, depending on the capabilities of its NIC. NDIS serializes the submission of incoming packet arrays to each miniport’s MiniportSendPackets function, and it serializes the submission of packets to each miniport’s MiniportSend function. NDIS queues incoming send requests in FIFO order.

Any miniport can retains ownership of such a send packet in one of the following ways:

In either of these circumstances, the NIC driver eventually must call NdisMSendComplete or NdisMWanSendComplete to indicate that it has released ownership of the packet and that the driver has sufficient resources available to accept the next transmit request.

However, before miniport calls NdisMSendComplete for a pending packet, it can call NdisMSendResourcesAvailable if the driver and its NIC are capable of accepting another send request immediately, assuming NDIS has one in its queue to submit to that driver. Such a call allows the driver of a high-capacity NIC to optimize transmissions over the network by sending more data at a time.

NdisMSendResourcesAvailable can be called only in the window between the return of NDIS_STATUS_PENDING for a given packet and the miniport’s call to NdisMSendComplete with that packet.

If a miniport returns any value except NDIS_STATUS_PENDING for a particular packet from MiniportSendPackets or from MiniportSend, it should neither call NdisMSendResourcesAvailable nor NdisMSendComplete. Any send packet for which a NIC driver returns something other than NDIS_STATUS_PENDING should be considered inaccessible by that miniport on return from its MiniportSendPackets or MiniportSend function.

A WAN miniport cannot call NdisMSendResourcesAvailable.

Callers of NdisMSendResourcesAvailable run at IRQL DISPATCH_LEVEL.

See Also

MiniportInitialize, MiniportSend, MiniportSendPackets, NdisMSendComplete, NdisMWanSendComplete, NDIS_PACKET, NDIS_PACKET_OOB_DATA, NdisSend, NdisSendPackets, NDIS_SET_PACKET_STATUS