aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/ldp.c3
-rw-r--r--src/vcl/vppcom.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index a10d4d02fb4..64a4e7c77db 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -2516,7 +2516,8 @@ ldp_epoll_pwait_eventfd (int epfd, struct epoll_event *events,
ldpw->mq_epfd_added = 1;
}
- rv = vls_epoll_wait (ep_vlsh, events, maxevents, 0);
+ /* Request to only drain unhandled to prevent libc_epoll_wait starved */
+ rv = vls_epoll_wait (ep_vlsh, events, maxevents, -2);
if (rv > 0)
goto done;
else if (PREDICT_FALSE (rv < 0))
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index cc4464b162e..3e4ba2fb953 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3042,6 +3042,9 @@ vppcom_epoll_wait (uint32_t vep_handle, struct epoll_event *events,
}
vec_reset_length (wrk->unhandled_evts_vector);
}
+ /* Request to only drain unhandled */
+ if ((int) wait_for_time == -2)
+ return n_evts;
if (vcm->cfg.use_mq_eventfd)
return vppcom_epoll_wait_eventfd (wrk, events, maxevents, n_evts,