diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/vhost/vhost_user_api.c | 9 | ||||
-rw-r--r-- | src/vlibmemory/memclnt_api.c | 3 | ||||
-rw-r--r-- | src/vlibmemory/vlib_api.c | 5 | ||||
-rw-r--r-- | src/vnet/ip/ip_api.c | 18 | ||||
-rw-r--r-- | src/vnet/l2/l2_api.c | 7 | ||||
-rw-r--r-- | src/vpp/api/api.c | 7 |
6 files changed, 35 insertions, 14 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; } diff --git a/src/vlibmemory/memclnt_api.c b/src/vlibmemory/memclnt_api.c index 728edf7804a..7eb61fe7875 100644 --- a/src/vlibmemory/memclnt_api.c +++ b/src/vlibmemory/memclnt_api.c @@ -190,6 +190,9 @@ vlib_api_init (void) foreach_vlib_api_msg; #undef _ + /* Mark messages as mp safe */ + vl_api_set_msg_thread_safe (am, VL_API_GET_FIRST_MSG_ID, 1); + vl_api_set_msg_thread_safe (am, VL_API_API_VERSIONS, 1); vl_api_set_msg_thread_safe (am, VL_API_CONTROL_PING, 1); vl_api_set_msg_thread_safe (am, VL_API_CONTROL_PING_REPLY, 1); diff --git a/src/vlibmemory/vlib_api.c b/src/vlibmemory/vlib_api.c index 3d4f8829d9a..705e9c241a6 100644 --- a/src/vlibmemory/vlib_api.c +++ b/src/vlibmemory/vlib_api.c @@ -340,7 +340,10 @@ vlib_apis_hookup (vlib_main_t *vm) */ msg_id_base = setup_message_id_table (); - vl_api_set_msg_thread_safe (am, VL_API_GET_NODE_GRAPH, 1); + /* Mark messages as mp safe */ + vl_api_set_msg_thread_safe (am, msg_id_base + VL_API_GET_NODE_GRAPH, 1); + vl_api_set_msg_thread_safe (am, msg_id_base + VL_API_SHOW_THREADS, 1); + return 0; } diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 667ea4c45b4..2c9589741b7 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -2133,17 +2133,21 @@ ip_api_hookup (vlib_main_t * vm) api_main_t *am = vlibapi_get_main (); /* - * Mark the route add/del API as MP safe + * Set up the (msg_name, crc, message-id) table */ - vl_api_set_msg_thread_safe (am, VL_API_IP_ROUTE_ADD_DEL, 1); - vl_api_set_msg_thread_safe (am, VL_API_IP_ROUTE_ADD_DEL_REPLY, 1); - vl_api_set_msg_thread_safe (am, VL_API_IP_ROUTE_ADD_DEL_V2, 1); - vl_api_set_msg_thread_safe (am, VL_API_IP_ROUTE_ADD_DEL_V2_REPLY, 1); + REPLY_MSG_ID_BASE = setup_message_id_table (); /* - * Set up the (msg_name, crc, message-id) table + * Mark the route add/del API as MP safe */ - REPLY_MSG_ID_BASE = setup_message_id_table (); + vl_api_set_msg_thread_safe (am, REPLY_MSG_ID_BASE + VL_API_IP_ROUTE_ADD_DEL, + 1); + vl_api_set_msg_thread_safe ( + am, REPLY_MSG_ID_BASE + VL_API_IP_ROUTE_ADD_DEL_REPLY, 1); + vl_api_set_msg_thread_safe ( + am, REPLY_MSG_ID_BASE + VL_API_IP_ROUTE_ADD_DEL_V2, 1); + vl_api_set_msg_thread_safe ( + am, REPLY_MSG_ID_BASE + VL_API_IP_ROUTE_ADD_DEL_V2_REPLY, 1); return 0; } diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c index cb22547f940..a06f7ff1088 100644 --- a/src/vnet/l2/l2_api.c +++ b/src/vnet/l2/l2_api.c @@ -1312,14 +1312,15 @@ l2_api_hookup (vlib_main_t * vm) { api_main_t *am = vlibapi_get_main (); - /* Mark VL_API_BRIDGE_DOMAIN_DUMP as mp safe */ - vl_api_set_msg_thread_safe (am, VL_API_BRIDGE_DOMAIN_DUMP, 1); - /* * Set up the (msg_name, crc, message-id) table */ REPLY_MSG_ID_BASE = setup_message_id_table (); + /* Mark VL_API_BRIDGE_DOMAIN_DUMP as mp safe */ + vl_api_set_msg_thread_safe ( + am, REPLY_MSG_ID_BASE + VL_API_BRIDGE_DOMAIN_DUMP, 1); + return 0; } diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index 7b1b7902680..d14906aff2f 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -241,11 +241,18 @@ static void vl_api_##nn##_t_handler ( \ static clib_error_t * vpe_api_hookup (vlib_main_t * vm) { + api_main_t *am = vlibapi_get_main (); + /* * Set up the (msg_name, crc, message-id) table */ msg_id_base = setup_message_id_table (); + /* Mark messages as mp safe */ + vl_api_set_msg_thread_safe (am, msg_id_base + VL_API_SHOW_VERSION, 1); + vl_api_set_msg_thread_safe (am, msg_id_base + VL_API_SHOW_VPE_SYSTEM_TIME, + 1); + return 0; } |