TdiReturnChainedReceives

VOID
    TdiReturnChainedReceives(
        IN PVOID  *TsduDescriptors,
        IN ULONG  NumberOfTsdus
        );

TdiReturnChainedReceives returns an array of TSDU descriptors for one or more chained receive indications previously forwarded to a transport's client, which returned STATUS_PENDING for each such chained receive indication.

Parameters

TsduDescriptors
Points to an array of descriptors of type NDIS_PACKET.
NumberOfTsdus
Specifies the number of elements in the array at TsduDescriptors.

Comments

For faster network throughput, a TDI transport can pass to its clients direct (but read-only) access to a chain of buffers containing a full received network packet, subject to the following conditions:

When such a transport's ProtocolReceivePacket function is called, it can forward the receive indication to the appropriate ClientEventReceive(Datagram) function, giving the client the opportunity to process the indicated TSDU without the overhead of double buffering such a received packet in the transport. If the ClientEventReceive(Datagram) callback returns STATUS_PENDING, the client retains exclusive read-only access to the indicated packet until that client calls TdiReturnChainedReceives with the TSDU descriptor. Its call to TdiReturnChainedReceives returns the indicated descriptor and all resources that it describes to the underlying NDIS driver that originally allocated the packet descriptor.

Any packets indicated by the underlying NDIS driver to the transport's ProtocolReceive function must be forwarded to such a client's ClientEventReceive, ClientEventReceiveExpedited, or ClientEventReceiveDatagram function. Calls to these client event handlers direct the client to make a copy of the indicated data as quickly as possible, and ClientEventReceive(Expedited/Datagram) relinquishes the client's access to the buffer(s) containing the indicated data when the event handler returns control.

Only kernel-mode clients with registered ClientEventChainedReceive, ClientEventChainedReceiveExpedited, and/or ClientEventChainedReceiveDatagram handlers call TdiReturnChainedReceives.

Callers of TdiReturnChainedReceives run at IRQL <= DISPATCH_LEVEL.

See Also

ClientEventChainedReceive, ClientEventChainedReceiveDatagram, ClientEventChainedReceiveExpedited, ClientEventReceive, ClientEventReceiveDatagram, ClientEventReceiveExpedited, NdisMIndicateReceivePacket, NDIS_PACKET, NdisReturnPackets, ProtocolReceive, ProtocolReceivePacket