![]() |
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Include dependency graph for fifo_segment.c:Go to the source code of this file.
Macros | |
| #define | FS_CL_HEAD_MASK 0xFFFFFFFFFFFF |
| #define | FS_CL_HEAD_TMASK 0xFFFF000000000000 |
| #define | FS_CL_HEAD_TINC (1ULL << 48) |
Variables | |
| static char * | fifo_segment_mem_status_strings [] |
| #define FS_CL_HEAD_MASK 0xFFFFFFFFFFFF |
Definition at line 137 of file fifo_segment.c.
| #define FS_CL_HEAD_TINC (1ULL << 48) |
Definition at line 139 of file fifo_segment.c.
| #define FS_CL_HEAD_TMASK 0xFFFF000000000000 |
Definition at line 138 of file fifo_segment.c.
| void* fifo_segment_alloc | ( | fifo_segment_t * | fs, |
| uword | size | ||
| ) |
Fifo segment reset mem limit flag.
| fs | fifo segment |
| size | size requested |
Definition at line 1393 of file fifo_segment.c.
Here is the call graph for this function:| svm_fifo_chunk_t* fifo_segment_alloc_chunk_w_slice | ( | fifo_segment_t * | fs, |
| u32 | slice_index, | ||
| u32 | chunk_size | ||
| ) |
Definition at line 1055 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_t* fifo_segment_alloc_fifo_w_offset | ( | fifo_segment_t * | fs, |
| uword | offset | ||
| ) |
Definition at line 892 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_t* fifo_segment_alloc_fifo_w_slice | ( | fifo_segment_t * | fs, |
| u32 | slice_index, | ||
| u32 | data_bytes, | ||
| fifo_segment_ftype_t | ftype | ||
| ) |
Allocate fifo in fifo segment.
| fs | fifo segment for fifo |
| data_bytes | size of default fifo chunk in bytes |
| ftype | fifo type fifo_segment_ftype_t |
Definition at line 847 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fifo_segment_attach | ( | fifo_segment_main_t * | sm, |
| fifo_segment_create_args_t * | a | ||
| ) |
Attach as slave to a fifo segment.
Definition at line 382 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_attach_fifo | ( | fifo_segment_t * | fs, |
| svm_fifo_t ** | f, | ||
| u32 | slice_index | ||
| ) |
Definition at line 1012 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_available_bytes | ( | fifo_segment_t * | fs | ) |
Definition at line 1415 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_cached_bytes | ( | fifo_segment_t * | fs | ) |
Fifo segment number of cached bytes.
Returns fifo segment's number of cached bytes.
| fs | fifo segment |
Definition at line 1409 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_chunk_offset | ( | fifo_segment_t * | fs, |
| svm_fifo_chunk_t * | c | ||
| ) |
| void fifo_segment_cleanup | ( | fifo_segment_t * | fs | ) |
Definition at line 827 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_collect_chunk | ( | fifo_segment_t * | fs, |
| u32 | slice_index, | ||
| svm_fifo_chunk_t * | c | ||
| ) |
Definition at line 1066 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fifo_segment_create | ( | fifo_segment_main_t * | sm, |
| fifo_segment_create_args_t * | a | ||
| ) |
Create a fifo segment and initialize as master.
Definition at line 348 of file fifo_segment.c.
Here is the call graph for this function:| void fifo_segment_delete | ( | fifo_segment_main_t * | sm, |
| fifo_segment_t * | s | ||
| ) |
Definition at line 421 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_detach_fifo | ( | fifo_segment_t * | fs, |
| svm_fifo_t ** | f | ||
| ) |
Definition at line 985 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fifo_segment_mem_status_t fifo_segment_determine_status | ( | fifo_segment_t * | fs, |
| u8 | usage | ||
| ) |
Definition at line 1464 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_t* fifo_segment_duplicate_fifo | ( | fifo_segment_t * | fs, |
| svm_fifo_t * | f | ||
| ) |
| uword fifo_segment_fifo_offset | ( | svm_fifo_t * | f | ) |
| uword fifo_segment_fl_chunk_bytes | ( | fifo_segment_t * | fs | ) |
Number of bytes on chunk free lists.
| fs | fifo segment |
Definition at line 1421 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_free_bytes | ( | fifo_segment_t * | fs | ) |
Fifo segment estimate of number of free bytes.
Returns fifo segment's internal estimate of the number of free bytes. To force a synchronization between the segment and the underlying memory allocator, call fifo_segment_update_free_bytes
| fs | fifo segment |
Definition at line 1403 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_free_client_fifo | ( | fifo_segment_t * | fs, |
| svm_fifo_t * | f | ||
| ) |
Free fifo allocated by external applications.
@params fs fifo segment for fifo
| f | fifo to be freed |
Definition at line 979 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_free_fifo | ( | fifo_segment_t * | fs, |
| svm_fifo_t * | f | ||
| ) |
Free fifo allocated in fifo segment.
| fs | fifo segment for fifo |
| f | fifo to be freed |
Definition at line 919 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fifo_segment_mem_status_t fifo_segment_get_mem_status | ( | fifo_segment_t * | fs | ) |
Definition at line 1490 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8 fifo_segment_get_mem_usage | ( | fifo_segment_t * | fs | ) |
Definition at line 1453 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fifo_segment_t* fifo_segment_get_segment | ( | fifo_segment_main_t * | sm, |
| u32 | segment_index | ||
| ) |
| fifo_segment_t* fifo_segment_get_segment_if_valid | ( | fifo_segment_main_t * | sm, |
| u32 | segment_index | ||
| ) |
| svm_fifo_t* fifo_segment_get_slice_fifo_list | ( | fifo_segment_t * | fs, |
| u32 | slice_index | ||
| ) |
Definition at line 1444 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8 fifo_segment_has_fifos | ( | fifo_segment_t * | fs | ) |
Definition at line 1438 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 fifo_segment_index | ( | fifo_segment_main_t * | sm, |
| fifo_segment_t * | s | ||
| ) |
Definition at line 430 of file fifo_segment.c.
| void fifo_segment_info | ( | fifo_segment_t * | seg, |
| char ** | address, | ||
| size_t * | size | ||
| ) |
| int fifo_segment_init | ( | fifo_segment_t * | fs | ) |
Initialize fifo segment shared header.
Definition at line 296 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_main_init | ( | fifo_segment_main_t * | sm, |
| u64 | baseva, | ||
| u32 | timeout_in_seconds | ||
| ) |
| svm_msg_q_t* fifo_segment_msg_q_alloc | ( | fifo_segment_t * | fs, |
| u32 | mq_index, | ||
| svm_msg_q_cfg_t * | cfg | ||
| ) |
Allocate message queue on segment.
| fs | fifo segment for mq |
| mq_index | index in private mqs vector to use to attach |
| cfg | configuration for mq |
Definition at line 1079 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_msg_q_t* fifo_segment_msg_q_attach | ( | fifo_segment_t * | fs, |
| uword | offset, | ||
| u32 | mq_index | ||
| ) |
Attach message queue at fifo segment offset.
| fs | fifo segment for mq |
| offset | offset for shared mq on the segment |
| mq_index | index in private mqs vector to use to attach |
Definition at line 1106 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_msg_q_offset | ( | fifo_segment_t * | fs, |
| u32 | mq_index | ||
| ) |
Message queue offset on segment.
| fs | fifo segment for mq |
| mq_index | index of mq in private mqs vector |
Definition at line 1163 of file fifo_segment.c.
Here is the caller graph for this function:| void fifo_segment_msg_qs_discover | ( | fifo_segment_t * | fs, |
| int * | fds, | ||
| u32 | n_fds | ||
| ) |
Discover mqs on mq only segment.
| fs | fifo segment for mq |
| fds | array of fds is mqs use eventfds |
| n_fds | number of fds |
Definition at line 1131 of file fifo_segment.c.
Here is the call graph for this function:| u32 fifo_segment_num_fifos | ( | fifo_segment_t * | fs | ) |
Get number of active fifos.
Definition at line 1275 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 fifo_segment_num_free_chunks | ( | fifo_segment_t * | fs, |
| u32 | size | ||
| ) |
Find number of free chunks of given size.
| fs | fifo segment |
| size | chunk size of interest or ~0 if all should be counted |
Definition at line 1359 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 fifo_segment_num_free_fifos | ( | fifo_segment_t * | fs | ) |
Definition at line 1299 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int fifo_segment_prealloc_fifo_chunks | ( | fifo_segment_t * | fs, |
| u32 | slice_index, | ||
| u32 | chunk_size, | ||
| u32 | batch_size | ||
| ) |
Try to preallocate fifo chunks on segment.
Tries to preallocate chunks of requested size on segment and adds them to chunk freelist.
| fs | fifo segment |
| chunk_size | size of chunks to be allocated in bytes |
| batch_size | number of chunks to be allocated |
Definition at line 1186 of file fifo_segment.c.
Here is the call graph for this function:| int fifo_segment_prealloc_fifo_hdrs | ( | fifo_segment_t * | fs, |
| u32 | slice_index, | ||
| u32 | batch_size | ||
| ) |
Try to preallocate fifo headers.
Tries to preallocate fifo headers and adds them to freelist.
| fs | fifo segment |
| batch_size | number of chunks to be allocated |
Definition at line 1175 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fifo_segment_preallocate_fifo_pairs | ( | fifo_segment_t * | fs, |
| 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.
| fs | fifo segment for fifo |
| rx_fifo_size | data size of rx fifos |
| tx_fifo_size | data size of tx fifos |
| n_fifo_pairs | number of pairs requested. Prior to returning, this is decremented by the the number of pairs allocated. |
Definition at line 1209 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| uword fifo_segment_size | ( | fifo_segment_t * | fs | ) |
Fifo segment allocated size.
Returns fifo segment's allocated size
| fs | fifo segment |
Definition at line 1375 of file fifo_segment.c.
Here is the caller graph for this function:Segment format function.
Definition at line 1519 of file fifo_segment.c.
Here is the call graph for this function:Definition at line 1498 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
| svm_fifo_t* fs_fifo_alloc | ( | fifo_segment_t * | fs, |
| u32 | slice_index | ||
| ) |
Definition at line 804 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fs_fifo_free | ( | fifo_segment_t * | fs, |
| svm_fifo_t * | f, | ||
| u32 | slice_index | ||
| ) |
Definition at line 815 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 465 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
Definition at line 1315 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1281 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Try to allocate new fifo.
Tries the following steps in order:
Definition at line 726 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 629 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_chunk_t* fs_try_alloc_multi_chunk | ( | fifo_segment_header_t * | fsh, |
| fifo_segment_slice_t * | fss, | ||
| u32 | data_bytes | ||
| ) |
Definition at line 491 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 108 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
Definition at line 44 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 20 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_chunk_t* fsh_alloc_chunk | ( | fifo_segment_header_t * | fsh, |
| u32 | slice_index, | ||
| u32 | chunk_size | ||
| ) |
Allocate chunks in fifo segment.
| fsh | fifo segment header |
| slice_index | slice where chunks should be alocated |
| chunk_size | chunk size needed |
Definition at line 762 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
| void fsh_collect_chunks | ( | fifo_segment_header_t * | fsh, |
| u32 | slice_index, | ||
| svm_fifo_chunk_t * | c | ||
| ) |
Return chunks to fifo segment.
| fsh | fifo segment header |
| slice_index | slice where chunks should be returned |
| c | pointer to first chunk in 0 terminated linked list |
Definition at line 795 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 774 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Definition at line 657 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 588 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 639 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 555 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void fsh_virtual_mem_update | ( | fifo_segment_header_t * | fsh, |
| u32 | slice_index, | ||
| int | n_bytes | ||
| ) |
Definition at line 124 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
static |
Definition at line 142 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 192 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 150 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 171 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_shared_t* fss_fifo_free_list_pop | ( | fifo_segment_header_t * | fsh, |
| fifo_segment_slice_t * | fss | ||
| ) |
Definition at line 241 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 224 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 232 of file fifo_segment.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 62 of file fifo_segment.c.