aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/memif/private.h')
-rw-r--r--src/plugins/memif/private.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/plugins/memif/private.h b/src/plugins/memif/private.h
index b7c18c93e2a..f4ace4cee5d 100644
--- a/src/plugins/memif/private.h
+++ b/src/plugins/memif/private.h
@@ -176,6 +176,35 @@ typedef struct
typedef struct
{
+ u32 packet_len;
+ u16 first_buffer_vec_index;
+} memif_packet_op_t;
+
+typedef struct
+{
+ void *data;
+ u32 data_len;
+ i16 buffer_offset;
+ u16 buffer_vec_index;
+} memif_copy_op_t;
+
+#define MEMIF_RX_VECTOR_SZ VLIB_FRAME_SIZE
+
+typedef struct
+{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
+ /* copy vector */
+ memif_packet_op_t packet_ops[MEMIF_RX_VECTOR_SZ];
+ memif_copy_op_t *copy_ops;
+ u32 *buffers;
+
+ /* buffer template */
+ vlib_buffer_t buffer_template;
+} memif_per_thread_data_t;
+
+typedef struct
+{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
/** API message ID base */
@@ -188,8 +217,8 @@ typedef struct
memif_socket_file_t *socket_files;
uword *socket_file_index_by_sock_id; /* map user socket id to pool idx */
- /* rx buffer cache */
- u32 **rx_buffers;
+ /* per thread data */
+ memif_per_thread_data_t *per_thread_data;
} memif_main_t;