]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: improve undo on timeout
authorYuchung Cheng <ycheng@google.com>
Fri, 22 Aug 2014 21:15:22 +0000 (14:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Aug 2014 04:28:02 +0000 (21:28 -0700)
commit9437a28676c62ea61900b82e494689611c14211c
treef9e12506a3e88dd1a74088d2137c4126108d5efd
parent9c40e8ab7059ea75ce5edddf65a46714a10b62ee
tcp: improve undo on timeout

Upon timeout, undo (via both timestamps/Eifel and DSACKs) was
disabled if any retransmits were still in flight.  The concern was
perhaps that spurious retransmission sent in a previous recovery
episode may trigger DSACKs to falsely undo the current recovery.

However, this inadvertently misses undo opportunities (using either
TCP timestamps or DSACKs) when timeout occurs during a loss episode,
i.e.  recurring timeouts or timeout during fast recovery. In these
cases some retransmissions will be in flight but we should allow
undo. Furthermore, we should only reset undo_marker and undo_retrans
upon timeout if we are starting a new recovery episode. Finally,
when we do reset our undo state, we now do so in a manner similar
to tcp_enter_recovery(), so that we require a DSACK for each of
the outstsanding retransmissions. This will achieve the original
goal by requiring that we receive the same number of DSACKs as
retransmissions.

This patch increases the undo events by 50% on Google servers.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
net/ipv4/tcp_input.c