![]() |
FD.io VPP
v20.05.1-5-g09f167997
Vector Packet Processing
|
Include dependency graph for svm_fifo.c:Go to the source code of this file.
| CLIB_MARCH_FN | ( | svm_fifo_copy_to_chunk | , |
| void | , | ||
| svm_fifo_t * | f, | ||
| svm_fifo_chunk_t * | c, | ||
| u32 | tail_idx, | ||
| const u8 * | src, | ||
| u32 | len, | ||
| svm_fifo_chunk_t ** | last | ||
| ) |
| CLIB_MARCH_FN | ( | svm_fifo_copy_from_chunk | , |
| void | , | ||
| svm_fifo_t * | f, | ||
| svm_fifo_chunk_t * | c, | ||
| u32 | head_idx, | ||
| u8 * | dst, | ||
| u32 | len, | ||
| svm_fifo_chunk_t ** | last | ||
| ) |
|
static |
Definition at line 576 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 538 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 727 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 693 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 798 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 955 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 644 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 595 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1459 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1478 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Add segment to fifo's out-of-order segment list.
Takes care of merging adjacent segments and removing overlapping ones.
Definition at line 176 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinestatic |
|
inlinestatic |
|
static |
Removes segments that can now be enqueued because the fifo's tail has advanced.
Returns the number of bytes added to tail.
Definition at line 306 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_add_subscriber | ( | svm_fifo_t * | f, |
| u8 | sub | ||
| ) |
Add io events subscriber to list.
| f | fifo |
| sub | subscriber opaque index (typically app worker index) |
Definition at line 1234 of file svm_fifo.c.
Here is the caller graph for this function:| svm_fifo_t* svm_fifo_alloc | ( | u32 | data_size_in_bytes | ) |
Creates a fifo in the current heap.
Create fifo of requested size.
Fails vs blow up the process
Definition at line 419 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| svm_fifo_chunk_t* svm_fifo_chunk_alloc | ( | u32 | size | ) |
Creates a fifo chunk in the current heap.
Allocate a fifo chunk on heap.
Definition at line 455 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_clone | ( | svm_fifo_t * | df, |
| svm_fifo_t * | sf | ||
| ) |
Clones fifo.
Clone fifo.
Assumptions:
Definition at line 1188 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 97 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 89 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_del_subscriber | ( | svm_fifo_t * | f, |
| u8 | subscriber | ||
| ) |
Remove io events subscriber form list.
| f | fifo |
| sub | subscriber index to be removed |
Definition at line 1242 of file svm_fifo.c.
Here is the caller graph for this function:| int svm_fifo_dequeue | ( | svm_fifo_t * | f, |
| u32 | len, | ||
| u8 * | dst | ||
| ) |
Dequeue data from fifo.
Data is dequeued to consumer provided buffer and head is atomically updated.
| f | fifo |
| len | length of data to dequeue |
| dst | buffer to where to dequeue the data |
Definition at line 1007 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_dequeue_drop | ( | svm_fifo_t * | f, |
| u32 | len | ||
| ) |
Dequeue and drop bytes from fifo.
Advances fifo head by requested amount of bytes.
| f | fifo |
| len | number of bytes to drop |
Definition at line 1061 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_dequeue_drop_all | ( | svm_fifo_t * | f | ) |
Drop all data from fifo.
Dequeue and drop all bytes from fifo.
Definition at line 1099 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8* svm_fifo_dump_trace | ( | u8 * | s, |
| svm_fifo_t * | f | ||
| ) |
Definition at line 1376 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_enqueue | ( | svm_fifo_t * | f, |
| u32 | len, | ||
| const u8 * | src | ||
| ) |
Enqueue data to fifo.
Data is enqueued and tail pointer is updated atomically. If the new data enqueued partly overlaps or "touches" an out-of-order segment, said segment is "consumed" and the number of bytes returned is appropriately updated.
| f | fifo |
| len | length of data to copy |
| src | buffer from where to copy the data |
Definition at line 836 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_enqueue_nocopy | ( | svm_fifo_t * | f, |
| u32 | len | ||
| ) |
Advance tail.
Advance tail pointer.
Definition at line 931 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_enqueue_with_offset | ( | svm_fifo_t * | f, |
| u32 | offset, | ||
| u32 | len, | ||
| u8 * | src | ||
| ) |
Enqueue a future segment.
Enqueue data to fifo with offset.
Two choices: either copies the entire segment, or copies nothing Returns 0 of the entire segment was copied Returns -1 if none of the segment was copied due to lack of space
Definition at line 894 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_fill_chunk_list | ( | svm_fifo_t * | f | ) |
Ensure the whole fifo size is writeable.
Allocates enough chunks to cover the whole fifo size.
| f | fifo |
Definition at line 1119 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Find chunk for given byte position.
| f | fifo |
| pos | normalized position in fifo |
Definition at line 481 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 493 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| ooo_segment_t* svm_fifo_first_ooo_segment | ( | svm_fifo_t * | f | ) |
First out-of-order segment for fifo.
| f | fifo |
Definition at line 1209 of file svm_fifo.c.
Here is the caller graph for this function:| void svm_fifo_free | ( | svm_fifo_t * | f | ) |
Free fifo and associated state.
| f | fifo |
Definition at line 758 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_free_chunk_lookup | ( | svm_fifo_t * | f | ) |
Cleanup fifo chunk lookup rb tree.
The rb tree is allocated in segment heap so this should be called with it pushed.
| f | fifo to cleanup |
Definition at line 751 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_free_ooo_data | ( | svm_fifo_t * | f | ) |
Cleanup fifo ooo data.
The ooo data is allocated in producer process memory. The fifo segment heap should not be pushed.
| f | fifo to cleanup |
Definition at line 111 of file svm_fifo.c.
Here is the caller graph for this function:| void svm_fifo_init | ( | svm_fifo_t * | f, |
| u32 | size | ||
| ) |
Initialize fifo.
| f | fifo |
| size | size for fifo |
Definition at line 368 of file svm_fifo.c.
Here is the caller graph for this function:| void svm_fifo_init_ooo_lookup | ( | svm_fifo_t * | f, |
| u8 | ooo_type | ||
| ) |
Initialize rbtrees used for ooo lookups.
| f | fifo |
| ooo_type | type of ooo operation (0 enqueue, 1 dequeue) |
Definition at line 401 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_init_pointers | ( | svm_fifo_t * | f, |
| u32 | head, | ||
| u32 | tail | ||
| ) |
Set fifo pointers to requested offset.
Init fifo head and tail.
Definition at line 1218 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8 svm_fifo_is_sane | ( | svm_fifo_t * | f | ) |
Check if fifo is sane.
Debug only.
| f | fifo |
Definition at line 1257 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 svm_fifo_max_read_chunk | ( | svm_fifo_t * | f | ) |
Max contiguous chunk of data that can be read.
Should only be called by consumers.
Definition at line 507 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 svm_fifo_max_write_chunk | ( | svm_fifo_t * | f | ) |
Max contiguous chunk of data that can be written.
Should only be called by producers
Definition at line 527 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u32 svm_fifo_n_chunks | ( | svm_fifo_t * | f | ) |
Number of chunks linked into the fifo.
| f | fifo |
Definition at line 1350 of file svm_fifo.c.
Here is the caller graph for this function:| u32 svm_fifo_n_ooo_segments | ( | svm_fifo_t * | f | ) |
Number of out-of-order segments for fifo.
| f | fifo |
Definition at line 1203 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_overwrite_head | ( | svm_fifo_t * | f, |
| u8 * | src, | ||
| u32 | len | ||
| ) |
Overwrite fifo head with new data.
This should be typically used by dgram transport protocols that need to update the dgram header after dequeueing a chunk of data. It assumes that the dgram header is at most spread over two chunks.
| f | fifo |
| src | src of new data |
| len | length of new data |
Definition at line 771 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_peek | ( | svm_fifo_t * | f, |
| u32 | offset, | ||
| u32 | len, | ||
| u8 * | dst | ||
| ) |
Peek data from fifo.
Data is copied from requested offset into provided dst buffer. Head is not updated.
| f | fifo |
| offset | offset from which to copy the data |
| len | length of data to copy |
| dst | buffer to where to dequeue the data |
Definition at line 1038 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| u8* svm_fifo_replay | ( | u8 * | s, |
| svm_fifo_t * | f, | ||
| u8 | no_read, | ||
| u8 | verbose | ||
| ) |
Definition at line 1400 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int svm_fifo_segments | ( | svm_fifo_t * | f, |
| svm_fifo_seg_t * | fs | ||
| ) |
Definition at line 1135 of file svm_fifo.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void svm_fifo_segments_free | ( | svm_fifo_t * | f, |
| svm_fifo_seg_t * | fs | ||
| ) |