]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: do not rearm RTO when future data are sacked
authorYuchung Cheng <ycheng@google.com>
Thu, 24 Oct 2013 15:59:27 +0000 (08:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Oct 2013 20:50:06 +0000 (16:50 -0400)
commit9a3e44cdd4ca54a1ed84b449fa66ee26a90beb25
treeb77474cc9f3e97000404dab09bde3429d62192ff
parent7c227536026fe3460d69e037c1f22cc7c55d7de0
tcp: do not rearm RTO when future data are sacked

Patch 863bffc2d "tcp: use RTT from SACK for RTO" always re-arms RTO upon
obtaining a RTT sample from newly sacked data.

But technically RTO should only be re-armed when the data sent before
the last (re)transmission of write queue head are (s)acked. Otherwise
the RTO may continue to extend during loss recovery on data sent
in the future.

Note that RTTs from ACK or timestamps do not have this problem, as the RTT
source must be from data sent before.

The new RTO re-arm policy is
1) Always re-arm RTO if SND.UNA is advanced
2) Re-arm RTO if sack RTT is available, provided the sacked data was
   sent before the last time write_queue_head was sent.

Signed-off-by: Larry Brakmo <brakmo@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c