aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/node_funcs.h
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2024-08-29 14:01:06 +0200
committerDamjan Marion <dmarion@0xa5.net>2024-09-12 10:11:30 +0000
commit3b5a013103f0eff44afbdc4937407a82931edd00 (patch)
treedcace32773735e02fb26835f277d85b06b0f5313 /src/vlib/node_funcs.h
parent47968438dc42931952d39300fcc7b5e36239857b (diff)
vlib: introduce lazy next node initialization
This change allow a node registration A to name a next node B that does not exist yet at registration time. When node B is effectively created, vlib_node_main_lazy_next_update need to be called so that the vlib graph is updated accordingly. To enable this behavior, node A needs to bear the new VLIB_NODE_FLAG_ALLOW_LAZY_NEXT_NODES. Change-Id: I561d3a0de19a0b7bd1045760a2ba8e27d27caa9a Type: improvement Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Diffstat (limited to 'src/vlib/node_funcs.h')
-rw-r--r--src/vlib/node_funcs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h
index 1beac33cf9b..4c7020d6a42 100644
--- a/src/vlib/node_funcs.h
+++ b/src/vlib/node_funcs.h
@@ -1338,6 +1338,10 @@ void vlib_node_runtime_sync_stats_node (vlib_node_t *n, vlib_node_runtime_t *r,
/* Node graph initialization function. */
clib_error_t *vlib_node_main_init (vlib_main_t * vm);
+/* Refresh graph after the creation of a node that was potentially mentionned
+ * as a named next for a node with VLIB_NODE_FLAG_ALLOW_LAZY_NEXT_NODES */
+clib_error_t *vlib_node_main_lazy_next_update (vlib_main_t *vm);
+
format_function_t format_vlib_node_graph;
format_function_t format_vlib_node_name;
format_function_t format_vlib_next_node_name;