diff options
author | Florin Coras <fcoras@cisco.com> | 2019-07-31 14:11:05 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-08-01 11:52:51 +0000 |
commit | 635acbf4b76038023b0b5a9bdae0dc87e13fd308 (patch) | |
tree | 5ab354a3ba4a95601cda075dff705c843c4c30a9 /src/vnet/tcp/tcp_output.c | |
parent | 0bff37f74e2e4359b94a31a64a518cbf25ec1acd (diff) |
tcp: honor snd_wnd in fast rxt
Type:fix
Change-Id: I2f4224a53360f533c086ebde6a3056e60431da87
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, 4 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 58d2167deb2..010397b9e04 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -1769,11 +1769,14 @@ static int tcp_fast_retransmit_unsent (tcp_worker_ctx_t * wrk, tcp_connection_t * tc, u32 burst_size) { - u32 offset, n_segs = 0, n_written, bi; + u32 offset, n_segs = 0, n_written, bi, available_wnd; vlib_main_t *vm = wrk->vm; vlib_buffer_t *b = 0; offset = tc->snd_nxt - tc->snd_una; + available_wnd = tc->snd_wnd - offset; + burst_size = clib_min (burst_size, available_wnd / tc->snd_mss); + while (n_segs < burst_size) { n_written = tcp_prepare_segment (wrk, tc, offset, tc->snd_mss, &b); |