X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fldp.c;h=a4b66feedfc96c122978b9fbd8383c2aa38dd3b2;hb=ff40d8f1b2f4efcf05f21934b423dce8aba8b652;hp=fddf45cd502296cf86c2da5aa452ade5db4377af;hpb=a3a489691d7f2813702fae2d915120743b860d62;p=vpp.git 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)