summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-19 16:26:24 -0700
committerDamjan Marion <dmarion@me.com>2018-10-23 19:35:51 +0000
commitbf4d5ce58435d3f424749ff69650ea67ce778f04 (patch)
tree35470ff4780c23a60ff0bf8c2680c73be7f6978f /src/vnet/tcp/tcp.c
parentf87eb9b3722f38112de6bc823527438e2a521bc0 (diff)
tcp: fast retransmit improvements
Patch is too large to be ported to 18.10 just days before release. - handle fast retransmits outside of established node and limit the retransmit burst size to avoid tx losses and worsening congestion. - in the absance of a tx pacer, use slow start after fast retransmit exists - add fast retransmit heuristic that re-retries sending the first segment if everything else fails - fine tuning Change-Id: I84a2ab8fbba8b97f1d2b26584dc11a1e2c33c8d2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index e32b5c417ae..cb05b8c0533 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -950,7 +950,8 @@ format_tcp_scoreboard (u8 * s, va_list * args)
hole = scoreboard_first_hole (sb);
if (hole)
- s = format (s, "\n head %u tail %u holes:\n", sb->head, sb->tail);
+ s = format (s, "\n head %u tail %u %u holes:\n", sb->head, sb->tail,
+ pool_elts (sb->holes));
while (hole)
{
@@ -1027,7 +1028,7 @@ tcp_snd_space_inline (tcp_connection_t * tc)
{
int snd_space, snt_limited;
- if (PREDICT_TRUE (tcp_in_cong_recovery (tc) == 0))
+ if (PREDICT_TRUE (!tcp_in_fastrecovery (tc)))
{
snd_space = tcp_available_output_snd_space (tc);
@@ -1047,16 +1048,6 @@ tcp_snd_space_inline (tcp_connection_t * tc)
return tcp_round_snd_space (tc, snd_space);
}
- if (tcp_in_recovery (tc))
- {
- tc->snd_nxt = tc->snd_una_max;
- snd_space = tcp_available_snd_wnd (tc) - tc->snd_rxt_bytes
- - (tc->snd_una_max - tc->snd_congestion);
- if (snd_space <= 0 || (tc->snd_una_max - tc->snd_una) >= tc->snd_wnd)
- return 0;
- return tcp_round_snd_space (tc, snd_space);
- }
-
/* RFC 5681: When previously unsent data is available and the new value of
* cwnd and the receiver's advertised window allow, a TCP SHOULD send 1*SMSS
* bytes of previously unsent data. */
@@ -1103,6 +1094,7 @@ tcp_update_time (f64 now, u8 thread_index)
tw_timer_expire_timers_16t_2w_512sl (&tcp_main.
wrk_ctx[thread_index].timer_wheel,
now);
+ tcp_do_fastretransmits (thread_index);
tcp_flush_frames_to_output (thread_index);
}