When receiving data, the miniport driver, NDIS, and TCP/IP must all look at each PDU’s header information separately. When large amounts of data are being received, this creates a large amount of overhead. Receive segment coalescing (RSC) reduces this overhead by coalescing a sequence of received segments and passing them to the host TCP/IP stack in one operation, so that NDIS and TCP/IP need only look at one header for the entire sequence.

RSC is intended to support coalescing in a way that:

  • Doesn’t interfere with the normal operation of TCP’s congestion and flow control mechanisms.

  • Coalesces packets without discarding information that is used by the TCP stack.

RSC-capable miniport drivers for network cards must:

  • Follow a standard set of rules when coalescing segments.

  • Provide certain out-of-band information to the host TCP/IP stack.

At a high level, the NIC and miniport driver must handle the receipt of a TCP segment over the wire as follows:

  • Check the incoming segment for an exception as follows:

    1. If no exception was encountered, check whether the segment can be coalesced with the last segment that was received for the same TCP connection per the rules.

    2. If the segment triggered an exception, or if coalescing it with the previously received segment is not possible, then indicate the segment individually.

  • The NIC and miniport driver must not indicate coalesced segments until the protocol driver enables RSC.

  • For a given TCP connection, a data indication from the miniport adapter to the host TCP/IP stack may consist of one or more coalesced segments, separated by one or more individual segments that could not be coalesced.

  • The NIC and miniport driver must not delay the indication of TCP segments, whether coalesced or not. Specifically, the NIC and miniport driver must not delay the indication of segments from one deferred procedure call (DPC) to the next in order to attempt to coalesce the segments.

  • The NIC and miniport driver may use timers to determine the end of coalescing. However, the handling of latency sensitive workloads must be as effective as the DPC boundary requirement.

References