aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl/tls_openssl.h
diff options
context:
space:
mode:
authorVarun Rapelly <vrapelly@marvell.com>2024-12-25 06:49:46 +0100
committerFlorin Coras <florin.coras@gmail.com>2025-01-20 22:58:02 +0000
commitbf49b4ae0834dc917300a4d74e17d3cf6c54093c (patch)
treed2410ce8ba028e557223213bbb48d1e6a00257bc /src/plugins/tlsopenssl/tls_openssl.h
parentbf3e683584fb114cb3effab96b578845feb467a8 (diff)
tls: async event handling enhancement
This patch updates async processing logic by adding async event handlers separately for handshake, read and write events. Type: improvement Change-Id: I6366689fec7e29fa9850cb22e20ab3659bf5245a Signed-off-by: Varun Rapelly <vrapelly@marvell.com>
Diffstat (limited to 'src/plugins/tlsopenssl/tls_openssl.h')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.h b/src/plugins/tlsopenssl/tls_openssl.h
index 8f6c6652a52..1a566f35fa6 100644
--- a/src/plugins/tlsopenssl/tls_openssl.h
+++ b/src/plugins/tlsopenssl/tls_openssl.h
@@ -40,6 +40,7 @@ typedef struct tls_ctx_openssl_
SSL_CTX *client_ssl_ctx;
SSL *ssl;
u32 evt_index[SSL_ASYNC_EVT_MAX];
+ bool evt_alloc_flag[SSL_ASYNC_EVT_MAX];
u32 total_async_write;
BIO *rbio;
BIO *wbio;
@@ -74,15 +75,14 @@ typedef struct openssl_main_
u32 max_pipelines;
} openssl_main_t;
-typedef int openssl_resume_handler (tls_ctx_t * ctx, session_t * tls_session);
+typedef int openssl_resume_handler (void *event, void *session);
+typedef int (*async_handlers) (void *event, void *session);
tls_ctx_t *openssl_ctx_get_w_thread (u32 ctx_index, u8 thread_index);
-int vpp_tls_async_init_events (tls_ctx_t *ctx, openssl_resume_handler *handler,
- session_t *session);
-int vpp_tls_async_update_event (tls_ctx_t *ctx, int eagain,
- ssl_async_evt_type_t type);
-int vpp_tls_async_enqueue_event (openssl_ctx_t *ctx, int evt_type,
- transport_send_params_t *sp, int size);
+int vpp_tls_async_init_event (tls_ctx_t *ctx, openssl_resume_handler *handler,
+ session_t *session,
+ ssl_async_evt_type_t evt_type,
+ transport_send_params_t *sp, int wr_size);
int tls_async_openssl_callback (SSL * s, void *evt);
int openssl_evt_free (int event_idx, u8 thread_index);
void openssl_polling_start (ENGINE * engine);
@@ -96,6 +96,9 @@ int openssl_read_from_ssl_into_fifo (svm_fifo_t *f, tls_ctx_t *ctx,
void openssl_handle_handshake_failure (tls_ctx_t *ctx);
void openssl_confirm_app_close (tls_ctx_t *ctx);
+int tls_async_write_event_handler (void *event, void *session);
+int tls_async_read_event_handler (void *event, void *session);
+int tls_async_handshake_event_handler (void *event, void *session);
#endif /* SRC_PLUGINS_TLSOPENSSL_TLS_OPENSSL_H_ */
/*