summaryrefslogtreecommitdiffstats
path: root/src/vnet/tls/tls.c
diff options
context:
space:
mode:
authorPing Yu <ping.yu@intel.com>2018-08-13 06:20:00 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-08-17 14:48:10 +0000
commitdecda5b466843b3164ba13f248f9e0bb93111782 (patch)
tree3a33e53c4e42e36e2d37209ab954cddad900bc2c /src/vnet/tls/tls.c
parent38b99d06ad00d09f406998e23c1d6cf44e11b86e (diff)
optimize init_server to reduce session overhead
move un-necessary session based operation to listener split orignal openssl ctx to be session based ctx and listen ctx Change-Id: Id6c54f47b0e2171fd8924a45efcd5266ce5402d5 Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src/vnet/tls/tls.c')
-rw-r--r--src/vnet/tls/tls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 88b4548c3aa..4b12248a051 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -541,6 +541,8 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep)
lctx->tcp_is_ip4 = sep->is_ip4;
lctx->tls_ctx_engine = engine_type;
+ tls_vfts[engine_type].ctx_start_listen (lctx);
+
TLS_DBG (1, "Started listening %d, engine type %d", lctx_index,
engine_type);
return lctx_index;
@@ -552,9 +554,15 @@ tls_stop_listen (u32 lctx_index)
tls_main_t *tm = &tls_main;
application_t *tls_app;
tls_ctx_t *lctx;
+ tls_engine_type_t engine_type;
+
lctx = tls_listener_ctx_get (lctx_index);
tls_app = application_get (tm->app_index);
application_stop_listen (tls_app, lctx->tls_session_handle);
+
+ engine_type = lctx->tls_ctx_engine;
+ tls_vfts[engine_type].ctx_stop_listen (lctx);
+
tls_listener_ctx_free (lctx);
return 0;
}