dev: mark API handlers as thread safe

Type: improvement
Change-Id: I2acab04ddb6a46a637ed17c683fb37ed7bce3df6
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/dev/dev_api.c b/src/vnet/dev/dev_api.c
index db6d7b0..5e9ac50 100644
--- a/src/vnet/dev/dev_api.c
+++ b/src/vnet/dev/dev_api.c
@@ -182,8 +182,9 @@
   /* 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;
 }