summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-04-26 00:08:42 -0700
committerFlorin Coras <fcoras@cisco.com>2017-05-01 10:41:44 -0700
commitc28764fd356632763614ea579f678d8f55eca4c7 (patch)
tree2c46999bc9474a5604f057812e6c25a821621b2c /src/vnet/tcp/tcp_output.c
parent63c7e14f2e62caa1246349cfe341a93176ec4a43 (diff)
TCP ooo reception fixes
- Improve svm fifo handling of out-of-order segments - Ensure tsval_recent is updated only if rcv_las falls withing the segments's sequence space - Avoid directly dropping old ACKs - Improve debugging Change-Id: I88dbe2394a0ad7eb389a4cc12d013a13733953aa 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 4e1a7aa5ef4..a85d30daddb 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -359,7 +359,8 @@ tcp_make_established_options (tcp_connection_t * tc, tcp_options_t * opts)
{
opts->flags |= TCP_OPTS_FLAG_SACK;
opts->sacks = tc->snd_sacks;
- opts->n_sack_blocks = vec_len (tc->snd_sacks);
+ opts->n_sack_blocks = clib_min (vec_len (tc->snd_sacks),
+ TCP_OPTS_MAX_SACK_BLOCKS);
len += 2 + TCP_OPTION_LEN_SACK_BLOCK * opts->n_sack_blocks;
}
}
@@ -917,6 +918,7 @@ tcp_push_hdr_i (tcp_connection_t * tc, vlib_buffer_t * b,
vnet_buffer (b)->tcp.connection_index = tc->c_c_index;
tc->snd_nxt += data_len;
+ tc->rcv_las = tc->rcv_nxt;
/* TODO this is updated in output as well ... */
if (tc->snd_nxt > tc->snd_una_max)