summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-01-22 15:05:14 -0800
committerDave Barach <openvpp@barachs.net>2021-01-25 15:34:21 +0000
commit86f1232ddee5b1751c6ff683892072111d0e2dee (patch)
treebfa213f887f6c4142531b7585df7b6707a40feb9 /src/plugins
parent15036ad0bc0b41e42d924e6b1cd897cca8f98c3c (diff)
svm: add custom q implementation for mq
Add separate queue implementation for the message queue as it's custom tailored for fifo segments as opposed to binary api. Also move eventfds to the private data structures. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6df0c824ecd94c7904516373f92a9fffc6b04736
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo_bapi.c2
-rw-r--r--src/plugins/unittest/session_test.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
index 807ec62d951..915448a0be4 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo_bapi.c
@@ -437,7 +437,7 @@ vl_api_app_attach_reply_t_handler (vl_api_app_attach_reply_t * mp)
echo_segment_attach_mq (segment_handle, mp->app_mq, 0, &em->app_mq);
if (mp->fd_flags & SESSION_FD_F_MQ_EVENTFD)
- svm_msg_q_set_consumer_eventfd (em->app_mq, fds[n_fds++]);
+ svm_msg_q_set_eventfd (em->app_mq, fds[n_fds++]);
vec_free (fds);
}
diff --git a/src/plugins/unittest/session_test.c b/src/plugins/unittest/session_test.c
index 68605b2cbd7..6496a99ba2c 100644
--- a/src/plugins/unittest/session_test.c
+++ b/src/plugins/unittest/session_test.c
@@ -1839,9 +1839,8 @@ session_test_mq_speed (vlib_main_t * vm, unformat_input_t * input)
mq = app_wrk->event_queue;
if (use_eventfd)
{
- svm_msg_q_alloc_producer_eventfd (mq);
- svm_msg_q_alloc_consumer_eventfd (mq);
- prod_fd = svm_msg_q_get_producer_eventfd (mq);
+ svm_msg_q_alloc_eventfd (mq);
+ prod_fd = svm_msg_q_get_eventfd (mq);
SESSION_TEST (prod_fd != -1, "mq producer eventd valid %u", prod_fd);
}