]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tcp: measure RTT from new SACK
authorYuchung Cheng <ycheng@google.com>
Mon, 22 Jul 2013 23:20:47 +0000 (16:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jul 2013 00:53:42 +0000 (17:53 -0700)
commit59c9af4234b0c21a1ed05cf65bf014d0c1a67bfd
tree04c219fec569b465394cd4c9497f74e74e4f802a
parent5b08e47caf1f2034a3a5b566bbccc8b0be3961ca
tcp: measure RTT from new SACK

Take RTT sample if an ACK selectively acks some sequences that
have never been retransmitted. The Karn's algorithm does not apply
even if that ACK (s)acks other retransmitted sequences, because it
must been generated by an original but perhaps out-of-order packet.
There is no ambiguity. In case when multiple blocks are newly
sacked because of ACK losses the earliest block is used to
measure RTT, similar to cummulative ACKs.

Such RTT samples allow the sender to estimate the RTO during loss
recovery and packet reordering events. It is still useful even with
TCP timestamps. That's because during these events the SND.UNA may
not advance preventing RTT samples from TS ECR (thus the FLAG_ACKED
check before calling tcp_ack_update_rtt()).  Therefore this new
RTT source is complementary to existing ACK and TS RTT mechanisms.

This patch does not update the RTO. It is done in the next patch.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c