summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-08-02 10:45:44 -0700
committerDave Barach <openvpp@barachs.net>2018-08-10 20:26:24 +0000
commit993683150202254c6ba8dd43e087a7229edd5d4c (patch)
tree141ce2cdfe546bfe2ad46e66ac9569a33a895072 /src/vnet/session/application_interface.c
parentf46663c65b0238311af93fcfa3030eefdb56e299 (diff)
vcl: support for eventfd mq signaling
- support eventfd based mq signaling. Based on configuration, vcl epoll/select can use either condvars or epoll on mq eventfds. - add vcl support for memfd segments - vpp explicitly registers cut-through segments with apps/vcl - if using eventfd, make ldp allow one call to libc_epoll_create. Needed for the message queue epfd - update svm_queue_t to allow blocking calls with eventfd signaling. Change-Id: I064151ac370bbe29bb16c968bf4e3659c8286bea Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_interface.c')
-rw-r--r--src/vnet/session/application_interface.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index c8fa37f0b9d..524e7b53663 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -475,7 +475,7 @@ vnet_application_attach (vnet_app_attach_args_t * a)
a->session_cb_vft)))
return clib_error_return_code (0, rv, 0, "app init: %d", rv);
- a->app_event_queue_address = pointer_to_uword (app->event_queue);
+ a->app_evt_q = app->event_queue;
sm = segment_manager_get (app->first_segment_manager);
fs = segment_manager_get_segment_w_lock (sm, 0);
@@ -569,7 +569,18 @@ vnet_disconnect_session (vnet_disconnect_args_t * a)
if (session_handle_is_local (a->handle))
{
local_session_t *ls;
- ls = application_get_local_session_from_handle (a->handle);
+
+ /* Disconnect reply came to worker 1 not main thread */
+ if (vlib_get_thread_index () == 1)
+ {
+ vlib_rpc_call_main_thread (vnet_disconnect_session, (u8 *) a,
+ sizeof (*a));
+ return 0;
+ }
+
+ if (!(ls = application_get_local_session_from_handle (a->handle)))
+ return 0;
+
if (ls->app_index != a->app_index && ls->client_index != a->app_index)
{
clib_warning ("app %u is neither client nor server for session %u",