aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memclnt_api.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-05-18 22:16:11 +0200
committerDamjan Marion <damarion@cisco.com>2022-05-19 18:32:23 +0200
commitcada9eb7894117db898f7c4def92cba5511baa4f (patch)
tree4cf552e2ad9e67b8bbc144eb5c6cb9aad0a8424b /src/vlibmemory/memclnt_api.c
parentbf95e3efde3402cf2f7beaf6d70433646cc68280 (diff)
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>
Diffstat (limited to 'src/vlibmemory/memclnt_api.c')
-rw-r--r--src/vlibmemory/memclnt_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vlibmemory/memclnt_api.c b/src/vlibmemory/memclnt_api.c
index 289a4c5d947..9e2971a9d04 100644
--- a/src/vlibmemory/memclnt_api.c
+++ b/src/vlibmemory/memclnt_api.c
@@ -193,8 +193,8 @@ vlib_api_init (void)
foreach_vlib_api_msg;
#undef _
- am->is_mp_safe[VL_API_CONTROL_PING] = 1;
- am->is_mp_safe[VL_API_CONTROL_PING_REPLY] = 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);
return 0;
}
@@ -727,10 +727,10 @@ rpc_api_hookup (vlib_main_t *vm)
foreach_plugin_trace_msg;
#undef _
- am->api_trace_cfg[VL_API_TRACE_PLUGIN_MSG_IDS].replay_enable = 0;
+ vl_api_allow_msg_replay (am, VL_API_TRACE_PLUGIN_MSG_IDS, 0);
/* No reason to halt the parade to create a trace record... */
- am->is_mp_safe[VL_API_TRACE_PLUGIN_MSG_IDS] = 1;
+ vl_api_set_msg_thread_safe (am, VL_API_TRACE_PLUGIN_MSG_IDS, 1);
rpc_call_main_thread_cb_fn = vl_api_rpc_call_main_thread;
return 0;
}