From c8144356338995a277593bc08315d3b1ddcc8cb3 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Thu, 6 Jan 2022 11:58:24 -0800 Subject: tcp: update snd_congestion only during congestion If running without sacks, if snd_una does not cover snd_congestion fast recovery can be missed but the two heuristics from RFC6582 should avoid that. Also snd_congestion was used as a means of inferring if the connection recently exited congestion while setting the persist timer but that does not always work correctly if not congested. Type: fix Signed-off-by: Florin Coras Change-Id: I94d4ac738cdd4f7f23f62e97dd63059de1cd4af9 --- src/vnet/tcp/tcp_input.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/vnet/tcp/tcp_input.c') diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index 11491a68257..64b9334cbea 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -802,15 +802,6 @@ tcp_cc_update (tcp_connection_t * tc, tcp_rate_sample_t * rs) /* If a cumulative ack, make sure dupacks is 0 */ tc->rcv_dupacks = 0; - - /* When dupacks hits the threshold we only enter fast retransmit if - * cumulative ack covers more than snd_congestion. Should snd_una - * wrap this test may fail under otherwise valid circumstances. - * Therefore, proactively update snd_congestion when wrap detected. */ - if (PREDICT_FALSE - (seq_leq (tc->snd_congestion, tc->snd_una - tc->bytes_acked) - && seq_gt (tc->snd_congestion, tc->snd_una))) - tc->snd_congestion = tc->snd_una - 1; } /** -- cgit 1.2.3-korg