X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvcl%2Fldp.c;fp=src%2Fvcl%2Fldp.c;h=71ce94bdd1896a30c0744ec60b643d8153d6aa76;hb=7c7231fc30d9da81bc1311966fe8b9d8720c1623;hp=ade19a73a94e2396f90f90e2120aca8114586c61;hpb=2ddb2fdaaf1233248c236cbe3d617c90f7fae20e;p=vpp.git diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index ade19a73a94..71ce94bdd18 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -2385,7 +2385,7 @@ static inline int ldp_epoll_pwait (int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t * sigmask) { - ldp_worker_ctx_t *ldpw = ldp_worker_get_current (); + ldp_worker_ctx_t *ldpw; double time_to_wait = (double) 0, max_time; int libc_epfd, rv = 0; vls_handle_t ep_vlsh; @@ -2398,6 +2398,10 @@ ldp_epoll_pwait (int epfd, struct epoll_event *events, int maxevents, return -1; } + if (PREDICT_FALSE (vppcom_worker_index () == ~0)) + vls_register_vcl_worker (); + + ldpw = ldp_worker_get_current (); if (epfd == ldpw->vcl_mq_epfd) return libc_epoll_pwait (epfd, events, maxevents, timeout, sigmask);