From 7428eaa4a1ae55052825cdc6c0a9ae6c4f8748ac Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 11 Dec 2023 16:04:57 -0800 Subject: session: support for cl port reuse Adds support for connectionless listener port reuse. Until now, cl listeners had fifos allocated to them and therefore only one app worker could ever listen, i.e., a session cannot have multiple fifos. To circumvent the limitation, this separates the fifos from the listener by allocating new cl sessions for each app worker that reuses the app listener. Flows are hashed to app worker cl sessions but, for now, this is not a consistent/fixed hash. Type: improvement Signed-off-by: Florin Coras Change-Id: Ic6533cd47f2765903669f88c288bd592fb17a19e --- src/vcl/vcl_locked.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/vcl') diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c index 563d97ef804..412db8def3b 100644 --- a/src/vcl/vcl_locked.c +++ b/src/vcl/vcl_locked.c @@ -847,13 +847,14 @@ vls_share_session (vls_worker_t * vls_wrk, vcl_locked_session_t * vls) vls_shared_data_pool_runlock (); - if (s->rx_fifo) + if (s->session_state == VCL_STATE_LISTEN) { - vcl_session_share_fifos (s, s->rx_fifo, s->tx_fifo); + s->session_state = VCL_STATE_LISTEN_NO_MQ; + s->rx_fifo = s->tx_fifo = 0; } - else if (s->session_state == VCL_STATE_LISTEN) + else if (s->rx_fifo) { - s->session_state = VCL_STATE_LISTEN_NO_MQ; + vcl_session_share_fifos (s, s->rx_fifo, s->tx_fifo); } } -- cgit