aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/quic/quic.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-10-16 15:29:36 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-10-25 15:50:51 +0000
commit10c016c055c3900bf5a52f30a67f3aff20a37492 (patch)
tree194b8714c3e2b7b61d33d5ee6d9febc580069b40 /src/plugins/quic/quic.c
parent75f4960d12a37d0b6ad2cd003e2a10ddb2527db6 (diff)
session: support of multiple extended configs
This allow configuration for each transport protocol when combined, e.g. HTTPS=HTTP+TLS. Extended config of session endpoint config is now chunk of memory, which allow seamless integration with VCL, and internal representation is hidden behind APIs, which is better for future improvements. By default chunk is allocated to 512B if the app doesn't do so before. Type: improvement Change-Id: I323f19ec255eba31c58c06b8b83af45aab7f5bb1 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/quic/quic.c')
-rw-r--r--src/plugins/quic/quic.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/quic/quic.c b/src/plugins/quic/quic.c
index 3f7a3426069..3797cd2b4ea 100644
--- a/src/plugins/quic/quic.c
+++ b/src/plugins/quic/quic.c
@@ -1332,14 +1332,16 @@ quic_connect_connection (session_endpoint_cfg_t * sep)
quic_ctx_t *ctx;
app_worker_t *app_wrk;
application_t *app;
+ transport_endpt_ext_cfg_t *ext_cfg;
int error;
- if (!sep->ext_cfg)
+ ext_cfg = session_endpoint_get_ext_cfg (sep, TRANSPORT_ENDPT_EXT_CFG_CRYPTO);
+ if (!ext_cfg)
return SESSION_E_NOEXTCFG;
/* Use pool on thread 1 if we have workers because of UDP */
thread_index = transport_cl_thread ();
- ccfg = &sep->ext_cfg->crypto;
+ ccfg = &ext_cfg->crypto;
clib_memset (cargs, 0, sizeof (*cargs));
ctx_index = quic_ctx_alloc (thread_index);
@@ -1475,13 +1477,15 @@ quic_start_listen (u32 quic_listen_session_index,
quic_ctx_t *lctx;
u32 lctx_index;
app_listener_t *app_listener;
+ transport_endpt_ext_cfg_t *ext_cfg;
int rv;
sep = (session_endpoint_cfg_t *) tep;
- if (!sep->ext_cfg)
+ ext_cfg = session_endpoint_get_ext_cfg (sep, TRANSPORT_ENDPT_EXT_CFG_CRYPTO);
+ if (!ext_cfg)
return SESSION_E_NOEXTCFG;
- ccfg = &sep->ext_cfg->crypto;
+ ccfg = &ext_cfg->crypto;
app_wrk = app_worker_get (sep->app_wrk_index);
app = application_get (app_wrk->app_index);
QUIC_DBG (2, "Called quic_start_listen for app %d", app_wrk->app_index);