]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix bogus RTT on special retransmission
authorYuchung Cheng <ycheng@google.com>
Sat, 1 Mar 2014 00:42:26 +0000 (16:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Mar 2014 20:33:02 +0000 (15:33 -0500)
commitadfd0a1ae8e4193c777c0464b2a1099c4ee49abf
tree5177aed13e8ff6c94ceed13239d824a92e672f71
parentbf23c11d49522023dd2b14cc89b3bd5e73cb2724
tcp: fix bogus RTT on special retransmission

RTT may be bogus with tall loss probe (TLP) when a packet
is retransmitted and latter (s)acked without TCPCB_SACKED_RETRANS flag.

For example, TLP calls __tcp_retransmit_skb() instead of
tcp_retransmit_skb(). The skb timestamps are updated but the sacked
flag is not marked with TCPCB_SACKED_RETRANS. As a result we'll
get bogus RTT in tcp_clean_rtx_queue() or in tcp_sacktag_one() on
spurious retransmission.

The fix is to apply the sticky flag TCP_EVER_RETRANS to enforce Karn's
check on RTT sampling. However this will disable F-RTO if timeout occurs
after TLP, by resetting undo_marker in tcp_enter_loss(). We relax this
check to only if any pending retransmists are still in-flight.

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