FD.io VPP
v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | svm_fifo_segment_header_t |
struct | svm_fifo_segment_private_t |
struct | svm_fifo_segment_main_t |
struct | svm_fifo_segment_create_args_t |
Macros | |
#define | FIFO_SEGMENT_MIN_FIFO_SIZE 4096 |
#define | FIFO_SEGMENT_MAX_FIFO_SIZE (8<<20) /* 8mb max fifo size */ |
#define | FIFO_SEGMENT_ALLOC_CHUNK_SIZE 32 /* Allocation quantum */ |
#define | FIFO_SEGMENT_F_IS_PREALLOCATED (1 << 0) |
#define | FIFO_SEGMENT_F_WILL_DELETE (1 << 1) |
#define | svm_fifo_segment_flags(_seg) _seg->h->flags |
Enumerations | |
enum | svm_fifo_segment_freelist_t { FIFO_SEGMENT_FREELIST_NONE = -1, FIFO_SEGMENT_RX_FREELIST = 0, FIFO_SEGMENT_TX_FREELIST, FIFO_SEGMENT_N_FREELISTS } |
Variables | |
svm_fifo_segment_main_t | svm_fifo_segment_main |
format_function_t | format_svm_fifo_segment |
format_function_t | format_svm_fifo_segment_type |
#define FIFO_SEGMENT_ALLOC_CHUNK_SIZE 32 /* Allocation quantum */ |
Definition at line 32 of file svm_fifo_segment.h.
#define FIFO_SEGMENT_F_IS_PREALLOCATED (1 << 0) |
Definition at line 34 of file svm_fifo_segment.h.
#define FIFO_SEGMENT_F_WILL_DELETE (1 << 1) |
Definition at line 35 of file svm_fifo_segment.h.
#define FIFO_SEGMENT_MAX_FIFO_SIZE (8<<20) /* 8mb max fifo size */ |
Definition at line 31 of file svm_fifo_segment.h.
#define FIFO_SEGMENT_MIN_FIFO_SIZE 4096 |
Definition at line 30 of file svm_fifo_segment.h.
Definition at line 73 of file svm_fifo_segment.h.
Enumerator | |
---|---|
FIFO_SEGMENT_FREELIST_NONE | |
FIFO_SEGMENT_RX_FREELIST | |
FIFO_SEGMENT_TX_FREELIST | |
FIFO_SEGMENT_N_FREELISTS |
Definition at line 22 of file svm_fifo_segment.h.
svm_fifo_t* svm_fifo_segment_alloc_fifo | ( | svm_fifo_segment_private_t * | s, |
u32 | data_size_in_bytes, | ||
svm_fifo_segment_freelist_t | index | ||
) |
Allocate fifo in svm segment.
Definition at line 329 of file svm_fifo_segment.c.
int svm_fifo_segment_attach | ( | svm_fifo_segment_create_args_t * | a | ) |
Attach as slave to an svm fifo segment.
Definition at line 283 of file svm_fifo_segment.c.
int svm_fifo_segment_create | ( | svm_fifo_segment_create_args_t * | a | ) |
Create an svm fifo segment and initialize as master.
Definition at line 201 of file svm_fifo_segment.c.
int svm_fifo_segment_create_process_private | ( | svm_fifo_segment_create_args_t * | a | ) |
Create an svm fifo segment in process-private memory.
Definition at line 235 of file svm_fifo_segment.c.
void svm_fifo_segment_delete | ( | svm_fifo_segment_private_t * | s | ) |
Definition at line 316 of file svm_fifo_segment.c.
void svm_fifo_segment_free_fifo | ( | svm_fifo_segment_private_t * | s, |
svm_fifo_t * | f, | ||
svm_fifo_segment_freelist_t | index | ||
) |
Definition at line 426 of file svm_fifo_segment.c.
|
inlinestatic |
Definition at line 89 of file svm_fifo_segment.h.
|
inlinestatic |
Definition at line 76 of file svm_fifo_segment.h.
|
inlinestatic |
u32 svm_fifo_segment_index | ( | svm_fifo_segment_private_t * | s | ) |
void svm_fifo_segment_info | ( | svm_fifo_segment_private_t * | seg, |
uword * | address, | ||
u64 * | size | ||
) |
Definition at line 570 of file svm_fifo_segment.c.
int svm_fifo_segment_init | ( | svm_fifo_segment_private_t * | s | ) |
Initialize svm fifo segment shared header.
Definition at line 178 of file svm_fifo_segment.c.
u32 svm_fifo_segment_num_fifos | ( | svm_fifo_segment_private_t * | fifo_segment | ) |
Get number of active fifos.
Definition at line 514 of file svm_fifo_segment.c.
u32 svm_fifo_segment_num_free_fifos | ( | svm_fifo_segment_private_t * | fifo_segment, |
u32 | fifo_size_in_bytes | ||
) |
Definition at line 520 of file svm_fifo_segment.c.
void svm_fifo_segment_preallocate_fifo_pairs | ( | svm_fifo_segment_private_t * | s, |
u32 | rx_fifo_size, | ||
u32 | tx_fifo_size, | ||
u32 * | n_fifo_pairs | ||
) |
Pre-allocates fifo pairs in fifo segment.
The number of fifos pre-allocated is the minimum of the requested number of pairs and the maximum number that fit within the segment. If the maximum is hit, the number of fifo pairs requested is updated by subtracting the number of fifos that have been successfully allocated.
Definition at line 68 of file svm_fifo_segment.c.
svm_fifo_segment_private_t* svm_fifo_segment_segments_pool | ( | void | ) |
Retrieve svm segments pool.
Used only for debug purposes.
Definition at line 504 of file svm_fifo_segment.c.
format_function_t format_svm_fifo_segment |
Definition at line 121 of file svm_fifo_segment.h.
format_function_t format_svm_fifo_segment_type |
Definition at line 122 of file svm_fifo_segment.h.
svm_fifo_segment_main_t svm_fifo_segment_main |
Definition at line 18 of file svm_fifo_segment.c.