summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-08-11 22:05:28 -0700
committerFlorin Coras <fcoras@cisco.com>2020-08-12 07:52:17 -0700
commitff40d8f1b2f4efcf05f21934b423dce8aba8b652 (patch)
tree401f4f9df5f7ea6963456c53e4d03aaf58943d9b /src/vcl/ldp.c
parenta3a489691d7f2813702fae2d915120743b860d62 (diff)
vcl: mt detection and cleanup
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I521c110fd4d7445bd585c96d4c768f16a0a7d3b8
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index fddf45cd502..a4b66feedfc 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -2438,9 +2438,10 @@ ldp_epoll_pwait_eventfd (int epfd, struct epoll_event *events,
return -1;
}
- if (vls_mt_wrk_supported ())
- if (PREDICT_FALSE (vppcom_worker_index () == ~0))
- vls_register_vcl_worker ();
+ /* Make sure the vcl worker is valid. Could be that epoll fd was created on
+ * one thread but it is now used on another */
+ if (PREDICT_FALSE (vppcom_worker_index () == ~0))
+ vls_register_vcl_worker ();
ldpw = ldp_worker_get_current ();
if (epfd == ldpw->vcl_mq_epfd)