summaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-02-24 11:29:06 -0500
committerDave Barach <dave@barachs.net>2016-02-24 11:30:44 -0500
commit1f49ed666af8b9cb889f9ea61f084341d0b6c4f4 (patch)
tree0e951e3cc6a21f7320084a6b5f0e213f1852b634 /vlib
parent9f50b0b5b12c0e1b01f36cf84070549911197584 (diff)
Link the vpp application against libvnet.so, not libvnet.a
Turn of srp, mainly as an example of how to restructure a featurette for selective disablement. Change-Id: Id3364c58a8711b103939f4434adfa67177380f67 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/init.h8
-rw-r--r--vlib/vlib/unix/main.c3
2 files changed, 10 insertions, 1 deletions
diff --git a/vlib/vlib/init.h b/vlib/vlib/init.h
index 9d940d07..c2a4014f 100644
--- a/vlib/vlib/init.h
+++ b/vlib/vlib/init.h
@@ -169,6 +169,14 @@ static void __vlib_add_config_function_##x (void) \
_error; \
})
+/* Don't call given init function: used to suppress parts of the netstack */
+#define vlib_mark_init_function_complete(vm, x) \
+ ({ \
+ extern vlib_init_function_t * VLIB_INIT_FUNCTION_SYMBOL (x); \
+ vlib_init_function_t * _f = VLIB_INIT_FUNCTION_SYMBOL (x); \
+ hash_set1 (vm->init_functions_called, _f); \
+ })
+
#define vlib_call_post_graph_init_function(vm, x) \
({ \
extern vlib_init_function_t * VLIB_POST_GRAPH_INIT_FUNCTION_SYMBOL (x); \
diff --git a/vlib/vlib/unix/main.c b/vlib/vlib/unix/main.c
index 6ff63f84..d6976b10 100644
--- a/vlib/vlib/unix/main.c
+++ b/vlib/vlib/unix/main.c
@@ -431,7 +431,8 @@ int vlib_unix_main (int argc, char * argv[])
return i;
unformat_init_command_line (&input, (char **)vm->argv);
- vm->init_functions_called = hash_create (0, /* value bytes */ 0);
+ if (vm->init_functions_called == 0)
+ vm->init_functions_called = hash_create (0, /* value bytes */ 0);
e = vlib_call_all_config_functions (vm, &input, 1 /* early */);
if (e != 0)
{