diff options
author | Florin Coras <fcoras@cisco.com> | 2018-10-15 21:35:42 -0700 |
---|---|---|
committer | Marco Varlese <marco.varlese@suse.de> | 2018-10-17 07:33:24 +0000 |
commit | 7d76878ab3eea9d233d569d9b714a40924fbaa8b (patch) | |
tree | 19a2a0a1d9bc7f64bc508b908b3e75098fa08b92 /src/vnet/tls/tls.c | |
parent | 84112dd4f98e5a31a8c7340a741f89e77fd03363 (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/tls/tls.c')
-rw-r--r-- | src/vnet/tls/tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index aba7919927c..9a82360610b 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -119,6 +119,7 @@ tls_ctx_half_open_alloc (void) { clib_rwlock_writer_lock (&tm->half_open_rwlock); pool_get (tm->half_open_ctx_pool, ctx); + ctx_index = ctx - tm->half_open_ctx_pool; clib_rwlock_writer_unlock (&tm->half_open_rwlock); } else @@ -126,10 +127,10 @@ tls_ctx_half_open_alloc (void) /* reader lock assumption: only main thread will call pool_get */ clib_rwlock_reader_lock (&tm->half_open_rwlock); pool_get (tm->half_open_ctx_pool, ctx); + ctx_index = ctx - tm->half_open_ctx_pool; clib_rwlock_reader_unlock (&tm->half_open_rwlock); } memset (ctx, 0, sizeof (*ctx)); - ctx_index = ctx - tm->half_open_ctx_pool; return ctx_index; } @@ -254,6 +255,8 @@ tls_notify_app_connected (tls_ctx_t * ctx, u8 is_failed) { TLS_DBG (1, "failed to notify app"); tls_disconnect (ctx->tls_ctx_handle, vlib_get_thread_index ()); + session_free_w_fifos (app_session); + return -1; } session_lookup_add_connection (&ctx->connection, |