From 39e79fdf30c653ee814b79c914b46ebe9db40a8f Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 29 Nov 2023 13:54:15 +0000 Subject: dev: mark API handlers as thread safe Type: improvement Change-Id: I2acab04ddb6a46a637ed17c683fb37ed7bce3df6 Signed-off-by: Damjan Marion --- src/vnet/dev/dev_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/vnet/dev') diff --git a/src/vnet/dev/dev_api.c b/src/vnet/dev/dev_api.c index db6d7b0b206..5e9ac502b5d 100644 --- a/src/vnet/dev/dev_api.c +++ b/src/vnet/dev/dev_api.c @@ -182,8 +182,9 @@ vnet_dev_api_hookup (vlib_main_t *vm) /* ask for a correctly-sized block of API message decode slots */ vnet_dev_api_msg_id_base = setup_message_id_table (); - vl_api_set_msg_thread_safe (am, vnet_dev_api_msg_id_base + VL_API_DEV_ATTACH, - 1); + foreach_int (i, VL_API_DEV_ATTACH, VL_API_DEV_DETACH, + VL_API_DEV_CREATE_PORT_IF, VL_API_DEV_REMOVE_PORT_IF) + vl_api_set_msg_thread_safe (am, vnet_dev_api_msg_id_base + i, 1); return 0; } -- cgit 1.2.3-korg