summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-29 13:54:15 +0000
committerMohammed HAWARI <momohawari@gmail.com>2023-12-04 09:09:34 +0000
commit39e79fdf30c653ee814b79c914b46ebe9db40a8f (patch)
tree290265deb6f76694f678c773cef83bb34608a9cd /src
parent94a52d795d4cdf3ed326409247f4f30c0a6e4f2b (diff)
dev: mark API handlers as thread safe
Type: improvement Change-Id: I2acab04ddb6a46a637ed17c683fb37ed7bce3df6 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/dev/dev_api.c5
1 files changed, 3 insertions, 2 deletions
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;
}