aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vppcom.c9
-rw-r--r--src/vcl/vppcom.h8
2 files changed, 17 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
*
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 4db3d980099..053abc97781 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -308,6 +308,14 @@ extern int vppcom_worker_register (void);
*/
extern int vppcom_worker_index (void);
+/**
+ * Returns the current worker's message queues epoll fd
+ *
+ * This only works if vcl is configured to do eventfd based message queue
+ * notifications.
+ */
+extern int vppcom_worker_mqs_epfd (void);
+
/* *INDENT-OFF* */
#ifdef __cplusplus
}