-typedef struct _svm_fifo
-{
- CLIB_CACHE_LINE_ALIGN_MARK (shared_first);
- u32 size; /**< size of the fifo in bytes */
- u32 nitems; /**< usable size (size-1) */
- svm_fifo_chunk_t *start_chunk;/**< first chunk in fifo chunk list */
- svm_fifo_chunk_t *end_chunk; /**< end chunk in fifo chunk list */
- svm_fifo_chunk_t *new_chunks; /**< chunks yet to be added to list */
- rb_tree_t chunk_lookup; /**< rbtree for chunk lookup */
- u8 flags; /**< fifo flags */
- u8 slice_index; /**< segment slice for fifo */
-
- CLIB_CACHE_LINE_ALIGN_MARK (shared_second);
- volatile u32 has_event; /**< non-zero if deq event exists */
- u32 master_session_index; /**< session layer session index */
- u32 client_session_index; /**< app session index */
- u8 master_thread_index; /**< session layer thread index */
- u8 client_thread_index; /**< app worker index */
- i8 refcnt; /**< reference count */
- u32 segment_manager; /**< session layer segment manager index */
- u32 segment_index; /**< segment index in segment manager */
- struct _svm_fifo *next; /**< next in freelist/active chain */
- struct _svm_fifo *prev; /**< prev in active chain */
- u32 size_decrement; /**< bytes to remove from fifo */
-
- CLIB_CACHE_LINE_ALIGN_MARK (consumer);
- u32 head; /**< fifo head position/byte */
- svm_fifo_chunk_t *head_chunk; /**< tracks chunk where head lands */
- svm_fifo_chunk_t *ooo_deq; /**< last chunk used for ooo dequeue */
- volatile u32 want_deq_ntf; /**< producer wants nudge */
- volatile u32 has_deq_ntf;
-
- CLIB_CACHE_LINE_ALIGN_MARK (producer);
- u32 tail; /**< fifo tail position/byte */
- u32 ooos_list_head; /**< Head of out-of-order linked-list */
- svm_fifo_chunk_t *tail_chunk; /**< tracks chunk where tail lands */
- svm_fifo_chunk_t *ooo_enq; /**< last chunk used for ooo enqueue */
- ooo_segment_t *ooo_segments; /**< Pool of ooo segments */
- u32 ooos_newest; /**< Last segment to have been updated */
- volatile u8 n_subscribers; /**< Number of subscribers for io events */
- u8 subscribers[SVM_FIFO_MAX_EVT_SUBSCRIBERS];
-
-#if SVM_FIFO_TRACE
- svm_fifo_trace_elem_t *trace;
-#endif
-
-} svm_fifo_t;
-