summaryrefslogtreecommitdiffstats
path: root/src/plugins/vhost
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@yandex-team.ru>2023-03-19 02:57:01 +0500
committerOle Tr�an <otroan@employees.org>2023-09-06 08:34:33 +0000
commite7c57c45aa981cee0b3376d63125c80c5c79e104 (patch)
tree9d5e3f15ecda2af85f780fa7dfbbb2f76c283a23 /src/plugins/vhost
parentdb8c2850812b210efde447b29bcd93a695ed4ed8 (diff)
api: fix mp-safe mark for some messages and add more
Several api messages were not mp-safe although marked as such because non-zero base id was not taken into account, and therefore some other (from zero base id) were falsely mp-safe instead. Keep messages as mp-safe, as they falsely were before: 10 get_first_msg_id 0 1 12 api_versions 0 1 Messages that are no longer mp-safe as they weren't marked: 15 sockclnt_create 0 1 33 proxy_arp_intfc_dump 0 1 Fix messages to be really mp-safe: 809 bridge_domain_dump 0 1 920 ip_route_add_del 0 1 921 ip_route_add_del_v2 0 1 1362 get_node_graph 0 1 1671 create_vhost_user_if 0 1 1675 create_vhost_user_if_v2 0 1 Additionally mark messages as mp-safe, seems they need no barrier: 1360 show_threads 0 1 1370 show_version 0 1 1372 show_vpe_system_time 0 1 Type: fix Change-Id: Ie6c1e3aa89f26bf51bfbcb7e7c4d9fee885487b7 Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Diffstat (limited to 'src/plugins/vhost')
-rw-r--r--src/plugins/vhost/vhost_user_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/vhost/vhost_user_api.c b/src/plugins/vhost/vhost_user_api.c
index d522803a011..3b0840a1b1b 100644
--- a/src/plugins/vhost/vhost_user_api.c
+++ b/src/plugins/vhost/vhost_user_api.c
@@ -335,15 +335,18 @@ static clib_error_t *
vhost_user_api_hookup (vlib_main_t * vm)
{
api_main_t *am = vlibapi_get_main ();
- /* Mark CREATE_VHOST_USER_IF as mp safe */
- vl_api_set_msg_thread_safe (am, VL_API_CREATE_VHOST_USER_IF, 1);
- vl_api_set_msg_thread_safe (am, VL_API_CREATE_VHOST_USER_IF_V2, 1);
/*
* Set up the (msg_name, crc, message-id) table
*/
REPLY_MSG_ID_BASE = setup_message_id_table ();
+ /* Mark CREATE_VHOST_USER_IF as mp safe */
+ vl_api_set_msg_thread_safe (
+ am, REPLY_MSG_ID_BASE + VL_API_CREATE_VHOST_USER_IF, 1);
+ vl_api_set_msg_thread_safe (
+ am, REPLY_MSG_ID_BASE + VL_API_CREATE_VHOST_USER_IF_V2, 1);
+
return 0;
}