|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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;
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
u32 master_session_index
session layer session index
volatile u32 want_deq_ntf
producer wants nudge
static fs_sptr_t fs_sptr(fifo_segment_header_t *fsh, void *p)
u32 head
fifo head position/byte
u32 size
size of the fifo in bytes
void fsh_virtual_mem_update(fifo_segment_header_t *fsh, u32 slice_index, int n_bytes)
void * clib_mem_bulk_handle_t
volatile u32 has_event
non-zero if deq event exists
static void * fs_ptr(fifo_segment_header_t *fsh, fs_sptr_t sp)
static fs_sptr_t fs_chunk_sptr(fifo_segment_header_t *fsh, svm_fifo_chunk_t *c)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
uword virtual_mem
Slice sum of all fifo sizes.
u8 slice_index
segment slice for fifo
fs_sptr_t tail_chunk
tracks chunk where tail lands
CLIB_CACHE_LINE_ALIGN_MARK(shared)
uword virtual_mem
Slice sum of all fifo sizes.
u32 start_byte
chunk start byte
u32 next
Next linked-list element pool index.
#define FS_MIN_LOG2_CHUNK_SZ
also min fifo size
fs_sptr_t head_chunk
tracks chunk where head lands
rb_node_index_t enq_rb_index
enq node index if chunk in rbtree
uword n_fl_chunk_bytes
Chunk bytes on freelist.
u32 min_alloc
min chunk alloc if space available
fs_sptr_t next
next in freelist
u32 length
Length of segment.
struct _svm_fifo svm_fifo_t
fs_sptr_t end_chunk
end chunk in fifo chunk list
#define SVM_FIFO_MAX_EVT_SUBSCRIBERS
u32 client_session_index
app session index
u32 tail
fifo tail position/byte
u32 start
Start of segment, normalized.
#define FS_MAX_LOG2_CHUNK_SZ
4MB max chunk size
rb_node_index_t deq_rb_index
deq node index if chunk in rbtree
struct svm_fifo_shr_ svm_fifo_shared_t
fs_sptr_t next
pointer to next chunk in linked-lists
u32 length
length of chunk in bytes
fs_sptr_t start_chunk
first chunk in fifo chunk list
u32 num_chunks[FS_CHUNK_VEC_LEN]
Allocated chunks by chunk size.
fs_sptr_t free_fifos
Freelists of fifo shared hdrs
struct fifo_slice_private_ fifo_slice_private_t
struct fifo_segment_slice_ fifo_segment_slice_t
CLIB_CACHE_LINE_ALIGN_MARK(cacheline)
u8 subscribers[SVM_FIFO_MAX_EVT_SUBSCRIBERS]
u8 data[0]
start of chunk data
#define FS_CHUNK_VEC_LEN
number of chunk sizes
u32 prev
Previous linked-list element pool index.
STATIC_ASSERT((FS_MAX_LOG2_CHUNK_SZ - FS_MIN_LOG2_CHUNK_SZ)==FS_CHUNK_VEC_LEN - 1, "update chunk sizes")
static svm_fifo_chunk_t * fs_chunk_ptr(fifo_segment_header_t *fsh, fs_sptr_t cp)
fs_sptr_t free_chunks[FS_CHUNK_VEC_LEN]
Free chunks by size.
svm_fifo_t * active_fifos
Linked list of active RX fifos.
clib_mem_bulk_handle_t fifos
Bulk fifo allocator.
struct svm_fifo_chunk_ svm_fifo_chunk_t
volatile u8 n_subscribers
Number of subscribers for io events.
vl_api_wireguard_peer_flags_t flags