net: tcp better handling of reordering then loss cases
authorYuchung Cheng <ycheng@google.com>
Thu, 3 Jun 2021 00:51:21 +0000 (17:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 21:20:44 +0000 (14:20 -0700)
commita29cb6914681a55667436a9eb7a42e28da8cf387
treeb68d1c0877ce3f4e3e36c15996ed4642f825c453
parent43902070fb7b73a0148eef63f5ece3a100e821ae
net: tcp better handling of reordering then loss cases

This patch aims to improve the situation when reordering and loss are
ocurring in the same flight of packets.

Previously the reordering would first induce a spurious recovery, then
the subsequent ACK may undo the cwnd (based on the timestamps e.g.).
However the current loss recovery does not proceed to invoke
RACK to install a reordering timer. If some packets are also lost, this
may lead to a long RTO-based recovery. An example is
https://groups.google.com/g/bbr-dev/c/OFHADvJbTEI

The solution is to after reverting the recovery, always invoke RACK
to either mount the RACK timer to fast retransmit after the reordering
window, or restarts the recovery if new loss is identified. Hence
it is possible the sender may go from Recovery to Disorder/Open to
Recovery again in one ACK.

Reported-by: mingkun bian <bianmingkun@gmail.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c