summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-12 13:09:36 -0700
committerDave Barach <openvpp@barachs.net>2018-10-14 10:48:51 +0000
commita4878ed07801cd95e2a46372aa41e162ad170b68 (patch)
treeb0994ba03eb2f0e72841298626ee6d0a6e29621a /src/vcl/vppcom.c
parent83ea669b2193a112ff1e3440efb9df78085b4616 (diff)
vcl: fix empty epoll returns (VPP-1453)
Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 3f12b86df42..df4ebde72eb 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2508,6 +2508,7 @@ vppcom_epoll_wait_eventfd (vcl_worker_t * wrk, struct epoll_event *events,
u64 buf;
vec_validate (wrk->mq_events, pool_elts (wrk->mq_evt_conns));
+again:
n_mq_evts = epoll_wait (wrk->mqs_epfd, wrk->mq_events,
vec_len (wrk->mq_events), wait_for_time);
for (i = 0; i < n_mq_evts; i++)
@@ -2516,6 +2517,8 @@ vppcom_epoll_wait_eventfd (vcl_worker_t * wrk, struct epoll_event *events,
n_read = read (mqc->mq_fd, &buf, sizeof (buf));
vcl_epoll_wait_handle_mq (wrk, mqc->mq, events, maxevents, 0, &n_evts);
}
+ if (!n_evts && n_mq_evts > 0)
+ goto again;
return (int) n_evts;
}