aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/init.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-06-01 00:45:18 +0200
committerBeno�t Ganne <bganne@cisco.com>2022-06-01 11:34:03 +0000
commit321bd106a64bdd6c051579f58e111f71c2c7e7d6 (patch)
tree4e5cb606b19a533d404f8dc60325c620ff6d1951 /src/vlib/init.h
parentdd2f12ba6ab952d9d66f4d9ba89ffde6309b1ff2 (diff)
vlib: add VLIB_NUM_WORKERS_CHANGE_FN() handler
Allows features to update their data structures after change in number of worker threads. Type: improvement Change-Id: Icd4d197e28608f5bbb1edd13eb624cd98e33cafe Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/init.h')
-rw-r--r--src/vlib/init.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/init.h b/src/vlib/init.h
index e6235652ad1..364989eafe0 100644
--- a/src/vlib/init.h
+++ b/src/vlib/init.h
@@ -171,6 +171,8 @@ static __clib_unused void * __clib_unused_##tag##_##x = x
#define VLIB_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,init)
#define VLIB_WORKER_INIT_FUNCTION(x) VLIB_DECLARE_INIT_FUNCTION(x,worker_init)
+#define VLIB_NUM_WORKERS_CHANGE_FN(x) \
+ VLIB_DECLARE_INIT_FUNCTION (x, num_workers_change)
#define VLIB_MAIN_LOOP_ENTER_FUNCTION(x) \
VLIB_DECLARE_INIT_FUNCTION(x,main_loop_enter)