summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-15 21:35:42 -0700
committerDave Barach <openvpp@barachs.net>2018-10-16 17:14:39 +0000
commiteb97e5f548b009ffa92efa3f778b4a7f6f40b7eb (patch)
tree4c0148896cce873cc1fe1c26546025eb832e9dea /src/vnet/tcp/tcp_output.c
parentf47e9b648aaab716c62bf004fa36176dbe8b21d7 (diff)
tls: fix multi threaded medium scale test (VPP-1457)
- ensure session enqueue epoch does not wrap between two enqueues - use 3 states for echo clients app, to distinguish between starting and closing phases - force tcp fin retransmit if out of buffers while sending a fin Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805 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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 0d5feb976f8..79d64cf2da3 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1078,7 +1078,15 @@ tcp_send_fin (tcp_connection_t * tc)
tcp_retransmit_timer_force_update (tc);
if (PREDICT_FALSE (tcp_get_free_buffer_index (tm, &bi)))
- return;
+ {
+ /* Out of buffers so program fin retransmit ASAP */
+ tcp_timer_update (tc, TCP_TIMER_RETRANSMIT, 1);
+ tc->flags |= TCP_CONN_FINSNT;
+ tc->snd_una_max += 1;
+ tc->snd_nxt = tc->snd_una_max;
+ return;
+ }
+
b = vlib_get_buffer (vm, bi);
tcp_init_buffer (vm, b);
fin_snt = tc->flags & TCP_CONN_FINSNT;