tcp: avoid slow start during fast recovery on new losses
authorYuchung Cheng <ycheng@google.com>
Sat, 31 Oct 2020 01:34:12 +0000 (18:34 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Nov 2020 01:17:40 +0000 (17:17 -0800)
commit7e901ee7b6ab0b7c1a5e29b8513af23709285a29
tree5cbfde6801bc23707c370074c95c09b3b1013c58
parent51e4082c7cb3feef822552252136228979ada719
tcp: avoid slow start during fast recovery on new losses

During TCP fast recovery, the congestion control in charge is by
default the Proportional Rate Reduction (PRR) unless the congestion
control module specified otherwise (e.g. BBR).

Previously when tcp_packets_in_flight() is below snd_ssthresh PRR
would slow start upon receiving an ACK that
   1) cumulatively acknowledges retransmitted data
   and
   2) does not detect further lost retransmission

Such conditions indicate the repair is in good steady progress
after the first round trip of recovery. Otherwise PRR adopts the
packet conservation principle to send only the amount that was
newly delivered (indicated by this ACK).

This patch generalizes the previous design principle to include
also the newly sent data beside retransmission: as long as
the delivery is making good progress, both retransmission and
new data should be accounted to make PRR more cautious in slow
starting.

Suggested-by: Matt Mathis <mattmathis@google.com>
Suggested-by: Neal Cardwell <ncardwell@google.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>
Link: https://lore.kernel.org/r/20201031013412.1973112-1-ycheng@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_recovery.c