tcp: Add XMITNOW which bypasses the Nagle algorithm temporarily
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 15 Jun 2012 09:54:59 +0000 (17:54 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 27 Jun 2012 08:13:04 +0000 (16:13 +0800)
commitc1fabe8562a4226eed3605179909e4cf398eb6df
treebebb515fa63cc70813e569dd808a0bfe9b6acddc
parent8aee317705f10405bcac661c7d88e111a197abca
tcp: Add XMITNOW which bypasses the Nagle algorithm temporarily

This flag acts differently from ACKNOW that no pure ACK will be sent.
It is currently used by the (extended) limited transmit and the SACK
based fast recovery.

This flag is intended to fix the following bug in the SACK based fast
recovery:
The NextSeg() requires that if the unACKed segments could not pass
IsLost(), previously unsent segment should be selected.  In the
application limited period, the size of the previously unsent segment
could be less than the MSS, thus it could not be sent immediately
according to the Nagle algorithm.  In our SACK based fast recovery
implementation, if the tcp_output() sends no segments, the current
recovery transmit process will stop immediately.  This could stop ACK
clock and cause timeout retransmit, which could be avoided, if the
Nagle algorithm is bypassed temporarily for the small unsent segment
selected by NextSeg().

When this flag is used with (extended) limited transmit, certain amount
of spurious early retranmits could be avoided.
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_var.h