api: refactor api data storage
single struct to hold all api handler, flags, etc.
Provide functions to toggle flags instead of writing directly to
internal data.
Type: refactor
Change-Id: I4730d7290e57489de8eda34a72211527e015b721
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index ae4ee0c..e03b010 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -2119,10 +2119,10 @@
/*
* Mark the route add/del API as MP safe
*/
- am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL] = 1;
- am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_REPLY] = 1;
- am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_V2] = 1;
- am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_V2_REPLY] = 1;
+ 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);
/*
* Set up the (msg_name, crc, message-id) table