summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-11 16:33:36 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-09-12 09:13:16 +0000
commit2cba8533cc4444c4615903add9a8f20c7c87079c (patch)
tree3a35e400cd081c34ae5801d71f5fec51c02611df /src/vcl/vppcom.h
parent41c9e04be0ca3a081926045e78dc969dab563532 (diff)
vcl: add apis that expos fifo as buffer
Change-Id: I4bd9c9f73499711e04b38d53daa5c917a4285bf5 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vppcom.h')
-rw-r--r--src/vcl/vppcom.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index b5e753292ec..63466844a3f 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -147,6 +147,14 @@ typedef struct _vcl_poll
short *revents;
} vcl_poll_t;
+typedef struct vppcom_data_segment_
+{
+ unsigned char *data;
+ uint32_t len;
+} vppcom_data_segment_t;
+
+typedef vppcom_data_segment_t vppcom_data_segments_t[2];
+
/*
* VPPCOM Public API Functions
*/
@@ -255,6 +263,13 @@ extern int vppcom_poll (vcl_poll_t * vp, uint32_t n_sids,
extern int vppcom_mq_epoll_fd (void);
extern int vppcom_session_index (uint32_t session_handle);
+extern int vppcom_session_read_segments (uint32_t session_handle,
+ vppcom_data_segments_t ds);
+extern void vppcom_session_free_segments (uint32_t session_handle,
+ vppcom_data_segments_t ds);
+extern int vppcom_data_segment_copy (void *buf, vppcom_data_segments_t ds,
+ uint32_t max_bytes);
+
/**
* Request from application to register a new worker
*