lacp: mark is_mp_safe for show and dump binary API 43/21343/5
authorSteven Luong <sluong@cisco.com>
Fri, 16 Aug 2019 03:30:23 +0000 (20:30 -0700)
committerDamjan Marion <dmarion@me.com>
Wed, 28 Aug 2019 15:06:31 +0000 (15:06 +0000)
show and dump binary APIs for lacp neighbors are running in the same thread
as the create and delete interface. There is no need for barrier lock.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Id584bd7408210fcc23b464ef2084f11f88bca58b

src/plugins/lacp/cli.c
src/plugins/lacp/lacp_api.c

index 92a890d..36a6f9b 100644 (file)
@@ -315,6 +315,7 @@ VLIB_CLI_COMMAND (show_lacp_command, static) = {
   .path = "show lacp",
   .short_help = "show lacp [<interface>] [details]",
   .function = show_lacp_fn,
+  .is_mp_safe = 1,
 };
 /* *INDENT-ON* */
 
index ed3ead6..f28f06c 100644 (file)
@@ -190,6 +190,10 @@ lacp_plugin_api_hookup (vlib_main_t * vm)
   foreach_lacp_plugin_api_msg;
 #undef _
 
+  /* Mark these APIs as mp safe */
+  am->is_mp_safe[VL_API_SW_INTERFACE_LACP_DUMP] = 1;
+  am->is_mp_safe[VL_API_SW_INTERFACE_LACP_DETAILS] = 1;
+
   /*
    * Set up the (msg_name, crc, message-id) table
    */