diff options
Diffstat (limited to 'vlib/vlib/init.h')
-rw-r--r-- | vlib/vlib/init.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vlib/vlib/init.h b/vlib/vlib/init.h index 9d940d0745f..c2a4014fd5b 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); \ |