summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.h
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.h
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.h')
-rw-r--r--src/vnet/session/application_interface.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index daba169a297..ba6d2660d7f 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -42,7 +42,7 @@ typedef struct _vnet_app_attach_args_t
* Results
*/
ssvm_private_t *segment;
- u64 app_event_queue_address;
+ svm_msg_q_t *app_evt_q;
u32 app_index;
} vnet_app_attach_args_t;
@@ -138,6 +138,7 @@ typedef enum
_(USE_GLOBAL_SCOPE, "App can use global session scope") \
_(USE_LOCAL_SCOPE, "App can use local session scope") \
_(USE_MQ_FOR_CTRL_MSGS, "Use message queue for ctr msgs") \
+ _(EVT_MQ_USE_EVENTFD, "Use eventfds for signaling") \
typedef enum _app_options
{
@@ -153,6 +154,27 @@ typedef enum _app_options_flags
#undef _
} app_options_flags_t;
+#define foreach_fd_type \
+ _(VPP_MQ_SEGMENT, "Fd for vpp's event mq segment") \
+ _(MEMFD_SEGMENT, "Fd for memfd segment") \
+ _(MQ_EVENTFD, "Event fd used by message queue") \
+ _(VPP_MQ_EVENTFD, "Event fd used by vpp's message queue") \
+
+typedef enum session_fd_type_
+{
+#define _(sym, str) SESSION_FD_##sym,
+ foreach_fd_type
+#undef _
+ SESSION_N_FD_TYPE
+} session_fd_type_t;
+
+typedef enum session_fd_flag_
+{
+#define _(sym, str) SESSION_FD_F_##sym = 1 << SESSION_FD_##sym,
+ foreach_fd_type
+#undef _
+} session_fd_flag_t;
+
int vnet_bind_uri (vnet_bind_args_t *);
int vnet_unbind_uri (vnet_unbind_args_t * a);
clib_error_t *vnet_connect_uri (vnet_connect_args_t * a);