aboutsummaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-05-31 14:05:46 -0400
committerKeith Burns <alagalah@gmail.com>2016-06-01 19:21:58 +0000
commitdb0cf7963b971ebb393d105a0a29fa7bd926521c (patch)
tree054988a44b4a68ad0e1b4470dfc566dc3e6dfd8a /vlib
parent8d9e80583fbb8ffb30e63153ef5b2b21c6b336fa (diff)
VPP-83 Allow non-privileged clients to use the vpp binary API.
Use the command line argument "api-segment { uid <nnn> gid <nnn> }" to configure shared memory segment file ownership. Defaults to uid = gid = 0. Shared-memory segments are explicitly set to 0770 mode, aka "rwxrwx---". Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/vlib/vlib/main.c b/vlib/vlib/main.c
index 18273bf6586..24504e74080 100644
--- a/vlib/vlib/main.c
+++ b/vlib/vlib/main.c
@@ -1414,9 +1414,8 @@ static void vlib_main_loop (vlib_main_t * vm)
/* frame */ 0,
cpu_time_now);
- if (PREDICT_FALSE(vm->queue_signal_pending))
- if (vm->queue_signal_callback)
- vm->queue_signal_callback (vm);
+ if (PREDICT_TRUE (vm->queue_signal_pending == 0))
+ vm->queue_signal_callback (vm);
/* Next handle interrupts. */
{
@@ -1533,11 +1532,15 @@ vlib_main_configure (vlib_main_t * vm, unformat_input_t * input)
VLIB_EARLY_CONFIG_FUNCTION (vlib_main_configure, "vlib");
+static void dummy_queue_signal_callback (vlib_main_t * vm) { }
+
/* Main function. */
int vlib_main (vlib_main_t * vm, unformat_input_t * input)
{
clib_error_t * error;
+ vm->queue_signal_callback = dummy_queue_signal_callback;
+
clib_time_init (&vm->clib_time);
/* Turn on event log. */