16 #ifndef SRC_SVM_FIFO_TYPES_H_ 17 #define SRC_SVM_FIFO_TYPES_H_ 24 #define FS_MIN_LOG2_CHUNK_SZ 12 25 #define FS_MAX_LOG2_CHUNK_SZ 22 26 #define FS_CHUNK_VEC_LEN 11 30 "update chunk sizes");
32 #define SVM_FIFO_TRACE (0) 33 #define SVM_FIFO_MAX_EVT_SUBSCRIBERS 7 89 typedef struct _svm_fifo
103 u8 master_thread_index;
104 u8 client_thread_index;
109 struct _svm_fifo *
next;
110 struct _svm_fifo *prev;
163 return sp ? (
void *) ((
u8 *) fsh + sp) : 0;
u32 length
length of chunk in bytes
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
vl_api_wireguard_peer_flags_t flags
volatile u32 want_deq_ntf
producer wants nudge
#define FS_CHUNK_VEC_LEN
number of chunk sizes
u32 min_alloc
min chunk alloc if space available
u32 prev
Previous linked-list element pool index.
uword virtual_mem
Slice sum of all fifo sizes.
struct fifo_segment_slice_ fifo_segment_slice_t
fs_sptr_t end_chunk
end chunk in fifo chunk list
fs_sptr_t head_chunk
tracks chunk where head lands
u32 size
size of the fifo in bytes
volatile u32 has_event
non-zero if deq event exists
u32 tail
fifo tail position/byte
fs_sptr_t tail_chunk
tracks chunk where tail lands
uword virtual_mem
Slice sum of all fifo sizes.
void * clib_mem_bulk_handle_t
uword n_fl_chunk_bytes
Chunk bytes on freelist.
u32 client_session_index
app session index
struct fifo_slice_private_ fifo_slice_private_t
fs_sptr_t next
next in freelist
#define SVM_FIFO_MAX_EVT_SUBSCRIBERS
static svm_fifo_chunk_t * fs_chunk_ptr(fifo_segment_header_t *fsh, fs_sptr_t cp)
static void * fs_ptr(fifo_segment_header_t *fsh, fs_sptr_t sp)
#define FS_MAX_LOG2_CHUNK_SZ
4MB max chunk size
fs_sptr_t free_fifos
Freelists of fifo shared hdrs.
fs_sptr_t start_chunk
first chunk in fifo chunk list
fs_sptr_t next
pointer to next chunk in linked-lists
u32 start_byte
chunk start byte
void fsh_virtual_mem_update(fifo_segment_header_t *fsh, u32 slice_index, int n_bytes)
static fs_sptr_t fs_chunk_sptr(fifo_segment_header_t *fsh, svm_fifo_chunk_t *c)
rb_node_index_t deq_rb_index
deq node index if chunk in rbtree
struct svm_fifo_shr_ svm_fifo_shared_t
u8 data[0]
start of chunk data
u32 length
Length of segment.
u32 next
Next linked-list element pool index.
volatile u8 n_subscribers
Number of subscribers for io events.
rb_node_index_t enq_rb_index
enq node index if chunk in rbtree
u32 master_session_index
session layer session index
STATIC_ASSERT((FS_MAX_LOG2_CHUNK_SZ - FS_MIN_LOG2_CHUNK_SZ)==FS_CHUNK_VEC_LEN - 1, "update chunk sizes")
clib_mem_bulk_handle_t fifos
Bulk fifo allocator.
u32 head
fifo head position/byte
svm_fifo_t * active_fifos
Linked list of active RX fifos.
static fs_sptr_t fs_sptr(fifo_segment_header_t *fsh, void *p)
struct _svm_fifo svm_fifo_t
#define FS_MIN_LOG2_CHUNK_SZ
also min fifo size
u32 start
Start of segment, normalized.
u8 slice_index
segment slice for fifo
struct svm_fifo_chunk_ svm_fifo_chunk_t