summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_locked.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-02-06 13:30:13 -0800
committerDave Barach <vpp@barachs.net>2023-02-27 20:58:09 +0000
commit32881935bb82b009528ba5a930b4399bad26abfd (patch)
tree750a2b44e4057eb7fffb88997d3ce49e46976b2a /src/vcl/vcl_locked.c
parent40cba405c5c06a3dc086a55143cb3ffd1094597e (diff)
vcl: improve vls handling of shared listeners
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1970408de52e53d24cea06b3ae0cc68a38cbc97a
Diffstat (limited to 'src/vcl/vcl_locked.c')
-rw-r--r--src/vcl/vcl_locked.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index f6df0fbd5b7..8b0c66d4bdd 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -670,8 +670,19 @@ vls_listener_wrk_is_active (vcl_locked_session_t * vls, u32 wrk_index)
static void
vls_listener_wrk_start_listen (vcl_locked_session_t * vls, u32 wrk_index)
{
- vppcom_session_listen (vls_to_sh (vls), ~0);
- vls_listener_wrk_set (vls, wrk_index, 1 /* is_active */ );
+ vcl_worker_t *wrk;
+ vcl_session_t *ls;
+
+ wrk = vcl_worker_get (wrk_index);
+ ls = vcl_session_get (wrk, vls->session_index);
+
+ /* Listen request already sent */
+ if (ls->flags & VCL_SESSION_F_PENDING_LISTEN)
+ return;
+
+ vcl_send_session_listen (wrk, ls);
+
+ vls_listener_wrk_set (vls, wrk_index, 1 /* is_active */);
}
static void