diff options
author | Florin Coras <fcoras@cisco.com> | 2019-10-30 09:22:14 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-11-11 18:45:14 +0000 |
commit | b3dce89a768aaffa2a830ba6579cd3d9c8cd967a (patch) | |
tree | 1b4d603d40f95fe56ef9c77a90468afb2c337240 /src/vnet/tcp/tcp_output.c | |
parent | eb284a1f8f10d752285a0a59e75bc54acae50779 (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>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r-- | src/vnet/tcp/tcp_output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 42986112053..7be3de8e26b 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -1850,6 +1850,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); } @@ -1928,6 +1931,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); |