aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-01-25 13:19:56 -0800
committerDave Barach <openvpp@barachs.net>2019-01-26 14:51:55 +0000
commite0982e56f0b644fbec429fa8639ddb1b3403bea8 (patch)
tree71649701e22137424e3d579ed00f091ebe44691a /src/vcl/vppcom.c
parentff426930051664aee1638ccff23c3345b4c129e7 (diff)
vcl: add api to expose worker message queues epfd
This only works if vcl is configured to do eventd based message queue notifications, instead of condvars. For that, add "use-mq-eventfd" to vcl startup conf. Change-Id: Id0f0288a40ec7d3daef7370f8b88420425867ab6 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index d9012cdaed6..317351d7612 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3594,6 +3594,15 @@ vppcom_worker_index (void)
return vcl_get_worker_index ();
}
+int
+vppcom_worker_mqs_epfd (void)
+{
+ vcl_worker_t *wrk = vcl_worker_get_current ();
+ if (!vcm->cfg.use_mq_eventfd)
+ return -1;
+ return wrk->mqs_epfd;
+}
+
/*
* fd.io coding-style-patch-verification: ON
*