aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-07-31 14:11:05 -0700
committerDave Barach <openvpp@barachs.net>2019-08-01 11:52:51 +0000
commit635acbf4b76038023b0b5a9bdae0dc87e13fd308 (patch)
tree5ab354a3ba4a95601cda075dff705c843c4c30a9 /src
parent0bff37f74e2e4359b94a31a64a518cbf25ec1acd (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')
-rw-r--r--src/vnet/tcp/tcp_output.c5
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);