diff options
author | Varun Rapelly <vrapelly@marvell.com> | 2024-08-17 16:19:29 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-12-07 21:18:54 +0000 |
commit | b8af24b26d3e1cd2240a9c2ee11340ba9b696f6c (patch) | |
tree | f9c7f031fd56b593efdc9fbf0a59dd5342a326af /src/vnet | |
parent | 0ec906694d9675f6e2319fb8d8422bc59349b418 (diff) |
tls: add async processing support
Adds support for tls async processing using OpenSSL.
Adds new CLI command to configure OpenSSL TLS configurations used by
OpenSSL context and session. New CLI format is:
tls openssl set-tls [record-size <size>]
[record-split-size <size>]
[max-pipelines <size>]
Sets default values to below TLS configuration parameters:
- first_seg_size: 32MB
- add_seg_size: 256MB
Type: feature
Signed-off-by: Varun Rapelly <vrapelly@marvell.com>
Change-Id: I990be31fced9e258fdb036f5751cd67594b0bce7
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/tls/tls.c | 4 | ||||
-rw-r--r-- | src/vnet/tls/tls.h | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c index 12dcbb449e8..b9ff30ba6a6 100644 --- a/src/vnet/tls/tls.c +++ b/src/vnet/tls/tls.c @@ -1258,6 +1258,10 @@ tls_init (vlib_main_t * vm) vec_validate (tm->rx_bufs, num_threads - 1); vec_validate (tm->tx_bufs, num_threads - 1); + /* + * first_seg_size default value 32MB + * add_seg_size default value 256 MB + */ tm->first_seg_size = 32 << 20; tm->add_seg_size = 256 << 20; diff --git a/src/vnet/tls/tls.h b/src/vnet/tls/tls.h index e56c4c079ac..244e2042f11 100644 --- a/src/vnet/tls/tls.h +++ b/src/vnet/tls/tls.h @@ -40,6 +40,19 @@ #define TLS_DBG(_lvl, _fmt, _args...) #endif +#define foreach_ssl_async_evt_type \ + _ (INIT, "SSL_in_init async event") \ + _ (RD, "Read async event") \ + _ (WR, "Write async event") \ + _ (MAX, "Maximum async event") + +typedef enum ssl_async_evt_type_ +{ +#define _(sym, str) SSL_ASYNC_EVT_##sym, + foreach_ssl_async_evt_type +#undef _ +} ssl_async_evt_type_t; + typedef struct tls_cxt_id_ { session_handle_t app_session_handle; @@ -66,7 +79,8 @@ STATIC_ASSERT (sizeof (tls_ctx_id_t) <= TRANSPORT_CONN_ID_LEN, _ (MIGRATED, "migrated") \ _ (NO_APP_SESSION, "no-app-session") \ _ (RESUME, "resume") \ - _ (HS_DONE, "handshake-done") + _ (HS_DONE, "handshake-done") \ + _ (ASYNC_RD, "async-read") typedef enum tls_conn_flags_bit_ { @@ -105,7 +119,6 @@ typedef struct tls_ctx_ u32 ts_app_index; tls_conn_flags_t flags; u8 *srv_hostname; - u32 evt_index; u32 ckpair_index; transport_proto_t tls_type; } tls_ctx_t; |