diff options
author | Damjan Marion <damarion@cisco.com> | 2021-03-10 14:35:28 +0100 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2021-03-11 17:30:34 +0000 |
commit | a31698bb7401f6e2389c0e805bf280ae52278524 (patch) | |
tree | 05d7940ef2e137cf885941f682a0b39402adb424 /src/vlib/node_funcs.h | |
parent | aa479bb91d0c75b603e6c8828e6fffa0c70c5a0c (diff) |
vlib: refactor node function variants
It allows default variant selection from startup.conf
Type: improvement
Change-Id: Idff95e12dd0c105dab7c905089548b05a6e974e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r-- | src/vlib/node_funcs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h index a12aea4e462..386e9168fa0 100644 --- a/src/vlib/node_funcs.h +++ b/src/vlib/node_funcs.h @@ -1189,6 +1189,9 @@ void vlib_node_rename (vlib_main_t * vm, u32 node_index, char *fmt, ...); macro. */ u32 vlib_register_node (vlib_main_t * vm, vlib_node_registration_t * r); +/* Register all node function variants */ +void vlib_register_all_node_march_variants (vlib_main_t *vm); + /* Register all static nodes registered via VLIB_REGISTER_NODE. */ void vlib_register_all_static_nodes (vlib_main_t * vm); @@ -1239,6 +1242,13 @@ vlib_node_set_dispatch_wrapper (vlib_main_t *vm, vlib_node_function_t *fn) return 0; } +int vlib_node_set_march_variant (vlib_main_t *vm, u32 node_index, + clib_march_variant_type_t march_variant); + +vlib_node_function_t * +vlib_node_get_preferred_node_fn_variant (vlib_main_t *vm, + vlib_node_fn_registration_t *regs); + #endif /* included_vlib_node_funcs_h */ /* |