diff options
author | Florin Coras <fcoras@cisco.com> | 2020-12-11 13:58:12 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2020-12-29 12:11:07 -0800 |
commit | b462418890240b2e38dbf522f9dd0196b79e0fa8 (patch) | |
tree | 3ae26a22edb23da8d40f2c2b54eb96b056bca565 /src/plugins/hs_apps/sapi/vpp_echo_common.c | |
parent | 04943b4c42db300d0d895644f32da79a6d411c51 (diff) |
svm: allow mq attachments at random offsets
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic373cd2c11272da539eb4b0db27227f36f2f9688
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo_common.c')
-rw-r--r-- | src/plugins/hs_apps/sapi/vpp_echo_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_common.c b/src/plugins/hs_apps/sapi/vpp_echo_common.c index 497f56c3e1e..e24629b783e 100644 --- a/src/plugins/hs_apps/sapi/vpp_echo_common.c +++ b/src/plugins/hs_apps/sapi/vpp_echo_common.c @@ -543,23 +543,23 @@ echo_send_rpc (echo_main_t * em, void *fp, echo_rpc_args_t * args) { svm_msg_q_msg_t msg; echo_rpc_msg_t *evt; - if (PREDICT_FALSE (svm_msg_q_lock (em->rpc_msq_queue))) + if (PREDICT_FALSE (svm_msg_q_lock (&em->rpc_msq_queue))) { ECHO_FAIL (ECHO_FAIL_RPC_SIZE, "RPC lock failed"); return -1; } - if (PREDICT_FALSE (svm_msg_q_ring_is_full (em->rpc_msq_queue, 0))) + if (PREDICT_FALSE (svm_msg_q_ring_is_full (&em->rpc_msq_queue, 0))) { - svm_msg_q_unlock (em->rpc_msq_queue); + svm_msg_q_unlock (&em->rpc_msq_queue); ECHO_FAIL (ECHO_FAIL_RPC_SIZE, "RPC ring is full"); return -2; } - msg = svm_msg_q_alloc_msg_w_ring (em->rpc_msq_queue, 0); - evt = (echo_rpc_msg_t *) svm_msg_q_msg_data (em->rpc_msq_queue, &msg); + msg = svm_msg_q_alloc_msg_w_ring (&em->rpc_msq_queue, 0); + evt = (echo_rpc_msg_t *) svm_msg_q_msg_data (&em->rpc_msq_queue, &msg); evt->fp = fp; clib_memcpy (&evt->args, args, sizeof (evt->args)); - svm_msg_q_add_and_unlock (em->rpc_msq_queue, &msg); + svm_msg_q_add_and_unlock (&em->rpc_msq_queue, &msg); return 0; } |