summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-30 09:22:14 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-02-06 12:19:12 +0000
commit04b4204d9c58c2a68f0d3993e7b73c9040907846 (patch)
tree3da8d8f22e59c752ab9ba8975c018cbaea12199c /src/vnet/tcp/tcp_output.c
parentc58ef62713a18497e7c56b4cc49699f5e5e57923 (diff)
tcp: improve lost rxt heuristic
Type: feature - retransmit first unacked segment if newer retransmitted packets are acked - avoid spurious retransmits if recovery ends with sacked bytes Change-Id: Ic1b56d22e025822edb7609afb136e47440ea6032 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit b3dce89a768aaffa2a830ba6579cd3d9c8cd967a)
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index c1ecaba1fb3..4ba127cbd67 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1848,6 +1848,9 @@ tcp_retransmit_should_retry_head (tcp_connection_t * tc,
u32 tx_adv_sack = sb->high_sacked - tc->snd_congestion;
f64 rr = (f64) tc->ssthresh / tc->prev_cwnd;
+ if (tcp_fastrecovery_first (tc))
+ return 1;
+
return (tx_adv_sack > (tc->snd_una - tc->prr_start) * rr);
}
@@ -1926,6 +1929,8 @@ tcp_retransmit_sack (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
ASSERT (tc->rxt_delivered <= tc->snd_rxt_bytes);
}
+ tcp_fastrecovery_first_off (tc);
+
TCP_EVT (TCP_EVT_CC_EVT, tc, 0);
hole = scoreboard_get_hole (sb, sb->cur_rxt_hole);