tcp: Balance aggressiveness of SACK rescue retransmission
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 26 Apr 2012 08:09:51 +0000 (16:09 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 26 Apr 2012 08:39:12 +0000 (16:39 +0800)
commita098966f5a899988149ce42ce48446d59a94dd23
treea794f73102513fb027565795b296358d3cc6aeb1
parent6c7e9c08229efc22d835db84c5a22437f83c818f
tcp: Balance aggressiveness of SACK rescue retransmission

This commit is following the idea of sustain ACK clocking whenever
possible to avoid timeout transmission during fast recovery, which
is mentioned in both in RFC3517 and "Rescue Retransmission for SACK"
draft.

- Be a little bit more aggressive in NextSeg()

  The main problem of "Rescue Retransmission for SACK" draft is its
  conservativeness of how many rescue retransmission could happen
  during fast recovery, which under some situation is not enough to
  sustain ACK clock.

  Our aggressive SACK rescue retransmission variant tries to tick out
  one rescue segment if there are no other segments could be sent according
  to the RFC3517, thus ACK clock is kept ticking.

- Be consertive in sending out rescue segment.

  The idea of SACK rescue retransmission is just to sustain ACK clock.
  As long as there are segments sent (either new segments or retransmission)
  during SACK base fast recovery, the ACK clock will be sustained.  So
  rescue segment will not be sent in this situation.

SACK rescue retransmission statistics are updated more accurately to
reflect what had happened.

The aggressive variant of SACK rescue retransmission could be disabled
by setting sysctl net.inet.tcp.rescuesack_agg to 0; it is enabled by
default.
sys/netinet/tcp_input.c
sys/netinet/tcp_sack.c
sys/netinet/tcp_var.h
usr.bin/netstat/inet.c