summaryrefslogtreecommitdiffstats
path: root/src/vcl
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/vcl
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/vcl')
-rw-r--r--src/vcl/vcl_bapi.c4
-rw-r--r--src/vcl/vcl_private.c2
-rw-r--r--src/vcl/vcl_sapi.c5
3 files changed, 5 insertions, 6 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c
index 7d241624d01..48695a31a3e 100644
--- a/src/vcl/vcl_bapi.c
+++ b/src/vcl/vcl_bapi.c
@@ -121,7 +121,7 @@ vl_api_app_attach_reply_t_handler (vl_api_app_attach_reply_t * mp)
if (mp->fd_flags & SESSION_FD_F_MQ_EVENTFD)
{
- svm_msg_q_set_consumer_eventfd (wrk->app_event_queue, fds[n_fds]);
+ svm_msg_q_set_eventfd (wrk->app_event_queue, fds[n_fds]);
vcl_mq_epoll_add_evfd (wrk, wrk->app_event_queue);
n_fds++;
}
@@ -215,7 +215,7 @@ vl_api_app_worker_add_del_reply_t_handler (vl_api_app_worker_add_del_reply_t *
if (mp->fd_flags & SESSION_FD_F_MQ_EVENTFD)
{
- svm_msg_q_set_consumer_eventfd (wrk->app_event_queue, fds[n_fds]);
+ svm_msg_q_set_eventfd (wrk->app_event_queue, fds[n_fds]);
vcl_mq_epoll_add_evfd (wrk, wrk->app_event_queue);
n_fds++;
}
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index a140e5ea557..b9745d27e4e 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -46,7 +46,7 @@ vcl_mq_epoll_add_evfd (vcl_worker_t * wrk, svm_msg_q_t * mq)
u32 mqc_index;
int mq_fd;
- mq_fd = svm_msg_q_get_consumer_eventfd (mq);
+ mq_fd = svm_msg_q_get_eventfd (mq);
if (wrk->mqs_epfd < 0 || mq_fd == -1)
return -1;
diff --git a/src/vcl/vcl_sapi.c b/src/vcl/vcl_sapi.c
index bc44272a5c9..1bab7eaba13 100644
--- a/src/vcl/vcl_sapi.c
+++ b/src/vcl/vcl_sapi.c
@@ -89,8 +89,7 @@ vcl_api_attach_reply_handler (app_sapi_attach_reply_msg_t * mp, int *fds)
if (mp->fd_flags & SESSION_FD_F_MQ_EVENTFD)
{
- svm_msg_q_set_consumer_eventfd (wrk->app_event_queue,
- fds[n_fds_used++]);
+ svm_msg_q_set_eventfd (wrk->app_event_queue, fds[n_fds_used++]);
vcl_mq_epoll_add_evfd (wrk, wrk->app_event_queue);
}
@@ -236,7 +235,7 @@ vcl_api_add_del_worker_reply_handler (app_sapi_worker_add_del_reply_msg_t *
if (mp->fd_flags & SESSION_FD_F_MQ_EVENTFD)
{
- svm_msg_q_set_consumer_eventfd (wrk->app_event_queue, fds[n_fds]);
+ svm_msg_q_set_eventfd (wrk->app_event_queue, fds[n_fds]);
vcl_mq_epoll_add_evfd (wrk, wrk->app_event_queue);
n_fds++;
}