summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vcl/vcl_locked.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index 69dd15b0ef4..93ece0027ff 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -374,6 +374,12 @@ vls_worker_get_current (void)
return pool_elt_at_index (vlsm->workers, vls_get_worker_index ());
}
+static inline u8
+vls_n_workers (void)
+{
+ return pool_elts (vlsm->workers);
+}
+
static void
vls_worker_alloc (void)
{
@@ -1298,7 +1304,7 @@ vls_mp_checks (vcl_locked_session_t * vls, int is_add)
vcl_session_t *s;
u32 owner_wrk;
- if (vls_mt_wrk_supported ())
+ if (vls_mt_wrk_supported () && vls_n_workers () <= 1)
return;
ASSERT (wrk->wrk_index == vls->vcl_wrk_index);