From 58a93e8ef288b0bae75ec7186ba96bdcaf85d0d4 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 14 Jan 2019 23:33:46 -0800 Subject: tls: preallocate app sessions on connect/accept Avoid allocating session and possibly reallocating thread session pool on builtin session rx. Change-Id: I70e7c604678b44ce8d22603489e247a2c5faa439 Signed-off-by: Florin Coras --- src/vnet/tls/tls.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/vnet/tls/tls.h') diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h index 09f1bdc7b07..c4f04673f2e 100644 --- a/src/vnet/tls/tls.h +++ b/src/vnet/tls/tls.h @@ -39,7 +39,10 @@ typedef CLIB_PACKED (struct tls_cxt_id_ { u32 parent_app_index; - session_handle_t app_session_handle; + union { + session_handle_t app_session_handle; + u32 parent_app_api_ctx; + }; session_handle_t tls_session_handle; u32 ssl_ctx; u32 listener_ctx_index; @@ -67,7 +70,7 @@ typedef struct tls_ctx_ #define tls_ctx_handle c_c_index /* Temporary storage for session open opaque. Overwritten once * underlying tcp connection is established */ -#define parent_app_api_context c_s_index +#define parent_app_api_context c_tls_ctx_id.parent_app_api_ctx u8 is_passive_close; u8 resume; -- cgit 1.2.3-korg