summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-05 19:54:45 -0800
committerDave Barach <openvpp@barachs.net>2022-01-06 23:08:09 +0000
commit8e76dfa7582ddc0396fa4c4fb0c61fed0a02c890 (patch)
tree67fa0a3e6121da049f6c5bf2dea456fcbcfb63e3 /src/vnet/tcp/tcp_input.c
parentb56f24bbc474e2d5350b63268877ec713f903e70 (diff)
tcp: always exit recovery if not in fastrecovery
Stay in fast recovery only if it's already on. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idcdbbacfed3e5f3c991fa293c532be1c671f5217
Diffstat (limited to 'src/vnet/tcp/tcp_input.c')
-rw-r--r--src/vnet/tcp/tcp_input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 058b1c0517e..11491a68257 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -757,10 +757,11 @@ tcp_cc_try_recover (tcp_connection_t *tc)
tcp_connection_tx_pacer_reset (tc, tc->cwnd, 0 /* start bucket */ );
tc->rcv_dupacks = 0;
+ tcp_recovery_off (tc);
/* Previous recovery left us congested. Continue sending as part
* of the current recovery event with an updated snd_congestion */
- if (tc->sack_sb.sacked_bytes)
+ if (tc->sack_sb.sacked_bytes && tcp_in_fastrecovery (tc))
{
tc->snd_congestion = tc->snd_nxt;
return -1;
@@ -777,12 +778,11 @@ tcp_cc_try_recover (tcp_connection_t *tc)
if (hole && hole->start == tc->snd_una && hole->end == tc->snd_nxt)
scoreboard_clear (&tc->sack_sb);
- if (!tcp_in_recovery (tc) && !is_spurious)
+ if (tcp_in_fastrecovery (tc) && !is_spurious)
tcp_cc_recovered (tc);
tcp_fastrecovery_off (tc);
tcp_fastrecovery_first_off (tc);
- tcp_recovery_off (tc);
TCP_EVT (TCP_EVT_CC_EVT, tc, 3);
ASSERT (tc->rto_boff == 0);