FD.io VPP
v19.08.2-294-g37e99c22d
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | ooo_segment_t |
Out-of-order segment. More... | |
struct | svm_fifo_trace_elem_t |
struct | svm_fifo_chunk_ |
struct | svm_fifo_seg_ |
Macros | |
#define | SVM_FIFO_TRACE (0) |
#define | OOO_SEGMENT_INVALID_INDEX ((u32)~0) |
#define | SVM_FIFO_INVALID_SESSION_INDEX ((u32)~0) |
#define | SVM_FIFO_INVALID_INDEX ((u32)~0) |
#define | SVM_FIFO_MAX_EVT_SUBSCRIBERS 7 |
#define | svm_fifo_trace_add(_f, _s, _l, _t) |
Typedefs | |
typedef enum svm_fifo_deq_ntf_ | svm_fifo_deq_ntf_t |
typedef struct svm_fifo_chunk_ | svm_fifo_chunk_t |
typedef enum svm_fifo_flag_ | svm_fifo_flag_t |
typedef struct _svm_fifo | svm_fifo_t |
typedef struct svm_fifo_seg_ | svm_fifo_seg_t |
Enumerations | |
enum | svm_fifo_deq_ntf_ { SVM_FIFO_NO_DEQ_NOTIF = 0, SVM_FIFO_WANT_DEQ_NOTIF = 1, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL = 2, SVM_FIFO_WANT_DEQ_NOTIF_IF_EMPTY = 4 } |
enum | svm_fifo_flag_ { SVM_FIFO_F_MULTI_CHUNK = 1 << 0, SVM_FIFO_F_GROW = 1 << 1, SVM_FIFO_F_SHRINK = 1 << 2, SVM_FIFO_F_COLLECT_CHUNKS = 1 << 3, SVM_FIFO_F_LL_TRACKED = 1 << 4, SVM_FIFO_F_SINGLE_THREAD_OWNED = 1 << 5 } |
enum | svm_fifo_err_t { SVM_FIFO_EFULL = -2, SVM_FIFO_EEMPTY = -3 } |
Functions | |
u8 * | svm_fifo_dump_trace (u8 *s, svm_fifo_t *f) |
u8 * | svm_fifo_replay (u8 *s, svm_fifo_t *f, u8 no_read, u8 verbose) |
static void | f_load_head_tail_cons (svm_fifo_t *f, u32 *head, u32 *tail) |
Load head and tail optimized for consumer. More... | |
static void | f_load_head_tail_prod (svm_fifo_t *f, u32 *head, u32 *tail) |
Load head and tail optimized for producer. More... | |
static void | f_load_head_tail_all_acq (svm_fifo_t *f, u32 *head, u32 *tail) |
Load head and tail independent of producer/consumer role. More... | |
static u32 | f_distance_to (svm_fifo_t *f, u32 a, u32 b) |
Distance to a from b, i.e., a - b in the fifo. More... | |
static u32 | f_distance_from (svm_fifo_t *f, u32 a, u32 b) |
Distance from a to b, i.e., b - a in the fifo. More... | |
static u32 | f_cursize (svm_fifo_t *f, u32 head, u32 tail) |
Fifo current size, i.e., number of bytes enqueued. More... | |
static u32 | f_free_count (svm_fifo_t *f, u32 head, u32 tail) |
Fifo free bytes, i.e., number of free bytes. More... | |
void | svm_fifo_try_shrink (svm_fifo_t *f, u32 head, u32 tail) |
Try to shrink fifo size. More... | |
svm_fifo_t * | svm_fifo_create (u32 size) |
Create fifo of requested size. More... | |
void | svm_fifo_init (svm_fifo_t *f, u32 size) |
Initialize fifo. More... | |
void | svm_fifo_init_chunks (svm_fifo_t *f) |
Initialize fifo chunks and rbtree. More... | |
svm_fifo_chunk_t * | svm_fifo_chunk_alloc (u32 size) |
Allocate a fifo chunk on heap. More... | |
void | svm_fifo_add_chunk (svm_fifo_t *f, svm_fifo_chunk_t *c) |
Grow fifo size by adding chunk to chunk list. More... | |
int | svm_fifo_reduce_size (svm_fifo_t *f, u32 len, u8 try_shrink) |
Request to reduce fifo size by amount of bytes. More... | |
svm_fifo_chunk_t * | svm_fifo_collect_chunks (svm_fifo_t *f) |
Removes chunks that are after fifo end byte. More... | |
void | svm_fifo_free (svm_fifo_t *f) |
Free fifo and associated state. More... | |
void | svm_fifo_free_chunk_lookup (svm_fifo_t *f) |
Cleanup fifo chunk lookup rb tree. More... | |
void | svm_fifo_free_ooo_data (svm_fifo_t *f) |
Cleanup fifo ooo data. More... | |
void | svm_fifo_init_pointers (svm_fifo_t *f, u32 head, u32 tail) |
Init fifo head and tail. More... | |
void | svm_fifo_clone (svm_fifo_t *df, svm_fifo_t *sf) |
Clone fifo. More... | |
int | svm_fifo_enqueue (svm_fifo_t *f, u32 len, const u8 *src) |
Enqueue data to fifo. More... | |
int | svm_fifo_enqueue_with_offset (svm_fifo_t *f, u32 offset, u32 len, u8 *src) |
Enqueue data to fifo with offset. More... | |
void | svm_fifo_enqueue_nocopy (svm_fifo_t *f, u32 len) |
Advance tail pointer. More... | |
void | svm_fifo_overwrite_head (svm_fifo_t *f, u8 *src, u32 len) |
Overwrite fifo head with new data. More... | |
int | svm_fifo_dequeue (svm_fifo_t *f, u32 len, u8 *dst) |
Dequeue data from fifo. More... | |
int | svm_fifo_peek (svm_fifo_t *f, u32 offset, u32 len, u8 *dst) |
Peek data from fifo. More... | |
int | svm_fifo_dequeue_drop (svm_fifo_t *f, u32 len) |
Dequeue and drop bytes from fifo. More... | |
void | svm_fifo_dequeue_drop_all (svm_fifo_t *f) |
Dequeue and drop all bytes from fifo. More... | |
int | svm_fifo_segments (svm_fifo_t *f, svm_fifo_seg_t *fs) |
void | svm_fifo_segments_free (svm_fifo_t *f, svm_fifo_seg_t *fs) |
void | svm_fifo_add_subscriber (svm_fifo_t *f, u8 sub) |
Add io events subscriber to list. More... | |
void | svm_fifo_del_subscriber (svm_fifo_t *f, u8 subscriber) |
Remove io events subscriber form list. More... | |
u32 | svm_fifo_n_ooo_segments (svm_fifo_t *f) |
Number of out-of-order segments for fifo. More... | |
ooo_segment_t * | svm_fifo_first_ooo_segment (svm_fifo_t *f) |
First out-of-order segment for fifo. More... | |
u8 | svm_fifo_is_sane (svm_fifo_t *f) |
Check if fifo is sane. More... | |
u8 | svm_fifo_set_single_thread_owned (svm_fifo_t *f) |
Declare this fifo is used by only a single thread. More... | |
static u32 | svm_fifo_max_dequeue_cons (svm_fifo_t *f) |
Fifo max bytes to dequeue optimized for consumer. More... | |
static u32 | svm_fifo_max_dequeue_prod (svm_fifo_t *f) |
Fifo max bytes to dequeue optimized for producer. More... | |
static u32 | svm_fifo_max_dequeue (svm_fifo_t *f) |
Fifo max bytes to dequeue. More... | |
static int | svm_fifo_is_full_prod (svm_fifo_t *f) |
Check if fifo is full optimized for producer. More... | |
static int | svm_fifo_is_full (svm_fifo_t *f) |
static int | svm_fifo_is_empty_cons (svm_fifo_t *f) |
Check if fifo is empty optimized for consumer. More... | |
static int | svm_fifo_is_empty_prod (svm_fifo_t *f) |
Check if fifo is empty optimized for producer. More... | |
static int | svm_fifo_is_empty (svm_fifo_t *f) |
Check if fifo is empty. More... | |
static u8 | svm_fifo_is_wrapped (svm_fifo_t *f) |
Check if fifo is wrapped. More... | |
static u32 | svm_fifo_max_enqueue_prod (svm_fifo_t *f) |
Maximum number of bytes that can be enqueued into fifo. More... | |
static u32 | svm_fifo_max_enqueue (svm_fifo_t *f) |
static u32 | svm_fifo_max_read_chunk (svm_fifo_t *f) |
Max contiguous chunk of data that can be read. More... | |
static u32 | svm_fifo_max_write_chunk (svm_fifo_t *f) |
Max contiguous chunk of data that can be written. More... | |
static u8 * | svm_fifo_head (svm_fifo_t *f) |
static u8 * | svm_fifo_tail (svm_fifo_t *f) |
static u8 | svm_fifo_n_subscribers (svm_fifo_t *f) |
static u8 | svm_fifo_has_ooo_data (svm_fifo_t *f) |
Check if fifo has out-of-order data. More... | |
static ooo_segment_t * | svm_fifo_newest_ooo_segment (svm_fifo_t *f) |
static void | svm_fifo_newest_ooo_segment_reset (svm_fifo_t *f) |
static u32 | ooo_segment_offset_prod (svm_fifo_t *f, ooo_segment_t *s) |
static u32 | ooo_segment_length (svm_fifo_t *f, ooo_segment_t *s) |
static int | svm_fifo_has_event (svm_fifo_t *f) |
Check if fifo has io event. More... | |
static u8 | svm_fifo_set_event (svm_fifo_t *f) |
Set fifo event flag. More... | |
static void | svm_fifo_unset_event (svm_fifo_t *f) |
Unset fifo event flag. More... | |
static void | svm_fifo_add_want_deq_ntf (svm_fifo_t *f, u8 ntf_type) |
Set specific want notification flag. More... | |
static void | svm_fifo_del_want_deq_ntf (svm_fifo_t *f, u8 ntf_type) |
Clear specific want notification flag. More... | |
static void | svm_fifo_clear_deq_ntf (svm_fifo_t *f) |
Clear the want notification flag and set has notification. More... | |
static void | svm_fifo_reset_has_deq_ntf (svm_fifo_t *f) |
Clear has notification flag. More... | |
static u8 | svm_fifo_needs_deq_ntf (svm_fifo_t *f, u32 n_last_deq) |
Check if fifo needs dequeue notification. More... | |
Variables | |
format_function_t | format_svm_fifo |
#define OOO_SEGMENT_INVALID_INDEX ((u32)~0) |
Definition at line 38 of file svm_fifo.h.
#define SVM_FIFO_INVALID_INDEX ((u32)~0) |
Definition at line 40 of file svm_fifo.h.
#define SVM_FIFO_INVALID_SESSION_INDEX ((u32)~0) |
Definition at line 39 of file svm_fifo.h.
#define SVM_FIFO_MAX_EVT_SUBSCRIBERS 7 |
Definition at line 41 of file svm_fifo.h.
#define SVM_FIFO_TRACE (0) |
Definition at line 37 of file svm_fifo.h.
#define svm_fifo_trace_add | ( | _f, | |
_s, | |||
_l, | |||
_t | |||
) |
Definition at line 145 of file svm_fifo.h.
typedef struct svm_fifo_chunk_ svm_fifo_chunk_t |
typedef enum svm_fifo_deq_ntf_ svm_fifo_deq_ntf_t |
typedef enum svm_fifo_flag_ svm_fifo_flag_t |
typedef struct svm_fifo_seg_ svm_fifo_seg_t |
typedef struct _svm_fifo svm_fifo_t |
enum svm_fifo_deq_ntf_ |
Definition at line 43 of file svm_fifo.h.
enum svm_fifo_err_t |
Enumerator | |
---|---|
SVM_FIFO_EFULL | |
SVM_FIFO_EEMPTY |
Definition at line 123 of file svm_fifo.h.
enum svm_fifo_flag_ |
Enumerator | |
---|---|
SVM_FIFO_F_MULTI_CHUNK | |
SVM_FIFO_F_GROW | |
SVM_FIFO_F_SHRINK | |
SVM_FIFO_F_COLLECT_CHUNKS | |
SVM_FIFO_F_LL_TRACKED | |
SVM_FIFO_F_SINGLE_THREAD_OWNED |
Definition at line 66 of file svm_fifo.h.
|
inlinestatic |
Fifo current size, i.e., number of bytes enqueued.
Internal function.
Definition at line 220 of file svm_fifo.h.
|
inlinestatic |
Distance from a to b, i.e., b - a in the fifo.
Internal function.
Definition at line 209 of file svm_fifo.h.
|
inlinestatic |
Distance to a from b, i.e., a - b in the fifo.
Internal function.
Definition at line 198 of file svm_fifo.h.
|
inlinestatic |
Fifo free bytes, i.e., number of free bytes.
Internal function
Definition at line 231 of file svm_fifo.h.
|
inlinestatic |
Load head and tail independent of producer/consumer role.
Internal function.
Definition at line 184 of file svm_fifo.h.
|
inlinestatic |
Load head and tail optimized for consumer.
Internal function.
Definition at line 157 of file svm_fifo.h.
|
inlinestatic |
Load head and tail optimized for producer.
Internal function
Definition at line 170 of file svm_fifo.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 712 of file svm_fifo.h.
void svm_fifo_add_chunk | ( | svm_fifo_t * | f, |
svm_fifo_chunk_t * | c | ||
) |
Grow fifo size by adding chunk to chunk list.
If fifos are allocated on a segment, this should be called with the segment's heap pushed.
f | fifo to be extended |
c | chunk or linked list of chunks to be added |
Definition at line 579 of file svm_fifo.c.
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 1175 of file svm_fifo.c.
|
inlinestatic |
Set specific want notification flag.
For list of flags see svm_fifo_deq_ntf_t
f | fifo |
ntf_type | type of notification requested |
Definition at line 775 of file svm_fifo.h.
svm_fifo_chunk_t* svm_fifo_chunk_alloc | ( | u32 | size | ) |
Allocate a fifo chunk on heap.
If the chunk is allocated on a fifo segment, this should be called with the segment's heap pushed.
size | chunk size in bytes. Will be rounded to the next highest power-of-two |
Allocate a fifo chunk on heap.
Definition at line 471 of file svm_fifo.c.
|
inlinestatic |
Clear the want notification flag and set has notification.
Should be used after enqueuing an event. This clears the SVM_FIFO_WANT_NOTIF flag but it does not clear SVM_FIFO_WANT_NOTIF_IF_FULL. If the latter was set, has_ntf is set to avoid enqueueing events for for all dequeue operations until it is manually cleared.
f | fifo |
Definition at line 806 of file svm_fifo.h.
void svm_fifo_clone | ( | svm_fifo_t * | df, |
svm_fifo_t * | sf | ||
) |
Clone fifo.
Clones single/default chunk fifo. It does not work for fifos with multiple chunks.
Clone fifo.
Assumptions:
Definition at line 1130 of file svm_fifo.c.
svm_fifo_chunk_t* svm_fifo_collect_chunks | ( | svm_fifo_t * | f | ) |
Removes chunks that are after fifo end byte.
Needs to be called with segment heap pushed.
f | fifo |
Definition at line 715 of file svm_fifo.c.
svm_fifo_t* svm_fifo_create | ( | u32 | data_size_in_bytes | ) |
Create fifo of requested size.
Allocates fifo on current heap.
size | data size in bytes for fifo to be allocated. Will be rounded to the next highest power-of-two value. |
Create fifo of requested size.
Fails vs blow up the process
Definition at line 436 of file svm_fifo.c.
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 1183 of file svm_fifo.c.
|
inlinestatic |
Clear specific want notification flag.
For list of flags see svm_fifo_ntf_t
f | fifo |
ntf_type | type of notification to be cleared |
Definition at line 789 of file svm_fifo.h.
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 981 of file svm_fifo.c.
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 1029 of file svm_fifo.c.
void svm_fifo_dequeue_drop_all | ( | svm_fifo_t * | f | ) |
Dequeue and drop all bytes from fifo.
Advances head to tail position.
f | fifo |
Definition at line 1061 of file svm_fifo.c.
u8* svm_fifo_dump_trace | ( | u8 * | s, |
svm_fifo_t * | f | ||
) |
Definition at line 1268 of file svm_fifo.c.
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 888 of file svm_fifo.c.
void svm_fifo_enqueue_nocopy | ( | svm_fifo_t * | f, |
u32 | len | ||
) |
Advance tail pointer.
Useful for moving tail pointer after external enqueue.
f | fifo |
len | number of bytes to add to tail |
Advance tail pointer.
Definition at line 964 of file svm_fifo.c.
int svm_fifo_enqueue_with_offset | ( | svm_fifo_t * | f, |
u32 | offset, | ||
u32 | len, | ||
u8 * | src | ||
) |
Enqueue data to fifo with offset.
Data is enqueued without updating tail pointer. Instead, an out-of-order list of segments is generated and maintained. Fifo takes care of coalescing contiguous or overlapping segments.
f | fifo |
offset | offset at which to copy the data |
len | len of data to copy |
src | buffer from where to copy the data |
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 931 of file svm_fifo.c.
ooo_segment_t* svm_fifo_first_ooo_segment | ( | svm_fifo_t * | f | ) |
First out-of-order segment for fifo.
f | fifo |
Definition at line 1147 of file svm_fifo.c.
void svm_fifo_free | ( | svm_fifo_t * | f | ) |
Free fifo and associated state.
f | fifo |
Definition at line 853 of file svm_fifo.c.
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 847 of file svm_fifo.c.
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 132 of file svm_fifo.c.
|
inlinestatic |
Check if fifo has io event.
f | fifo |
Definition at line 734 of file svm_fifo.h.
|
inlinestatic |
Check if fifo has out-of-order data.
f | fifo |
Definition at line 692 of file svm_fifo.h.
|
inlinestatic |
void svm_fifo_init | ( | svm_fifo_t * | f, |
u32 | size | ||
) |
Initialize fifo.
f | fifo |
size | size for fifo |
Definition at line 392 of file svm_fifo.c.
void svm_fifo_init_chunks | ( | svm_fifo_t * | f | ) |
Initialize fifo chunks and rbtree.
f | fifo |
Definition at line 408 of file svm_fifo.c.
void svm_fifo_init_pointers | ( | svm_fifo_t * | f, |
u32 | head, | ||
u32 | tail | ||
) |
Init fifo head and tail.
f | fifo |
head | head value that will be matched to a chunk |
tail | tail value that will be matched to a chunk |
Init fifo head and tail.
Definition at line 1156 of file svm_fifo.c.
|
inlinestatic |
Check if fifo is empty.
Note: use producer or consumer specific functions for perfomance. svm_fifo_is_empty_cons (svm_fifo_t * f) svm_fifo_is_empty_prod (svm_fifo_t * f)
Definition at line 590 of file svm_fifo.h.
|
inlinestatic |
Check if fifo is empty optimized for consumer.
f | fifo |
Definition at line 565 of file svm_fifo.h.
|
inlinestatic |
Check if fifo is empty optimized for producer.
f | fifo |
Definition at line 577 of file svm_fifo.h.
|
inlinestatic |
|
inlinestatic |
Check if fifo is full optimized for producer.
f | fifo |
Definition at line 541 of file svm_fifo.h.
u8 svm_fifo_is_sane | ( | svm_fifo_t * | f | ) |
Check if fifo is sane.
Debug only.
f | fifo |
Definition at line 1198 of file svm_fifo.c.
|
inlinestatic |
Check if fifo is wrapped.
f | fifo |
Definition at line 602 of file svm_fifo.h.
|
inlinestatic |
Fifo max bytes to dequeue.
Note: use producer or consumer specific functions for performance: svm_fifo_max_dequeue_cons (svm_fifo_t *f) svm_fifo_max_dequeue_prod (svm_fifo_t *f)
Definition at line 527 of file svm_fifo.h.
|
inlinestatic |
Fifo max bytes to dequeue optimized for consumer.
f | fifo |
Definition at line 498 of file svm_fifo.h.
|
inlinestatic |
Fifo max bytes to dequeue optimized for producer.
f | fifo |
Definition at line 512 of file svm_fifo.h.
|
inlinestatic |
Definition at line 634 of file svm_fifo.h.
|
inlinestatic |
Maximum number of bytes that can be enqueued into fifo.
Optimized for producer
f | fifo |
Definition at line 618 of file svm_fifo.h.
|
inlinestatic |
Max contiguous chunk of data that can be read.
Definition at line 647 of file svm_fifo.h.
|
inlinestatic |
Max contiguous chunk of data that can be written.
Definition at line 658 of file svm_fifo.h.
u32 svm_fifo_n_ooo_segments | ( | svm_fifo_t * | f | ) |
Number of out-of-order segments for fifo.
f | fifo |
Definition at line 1141 of file svm_fifo.c.
|
inlinestatic |
|
inlinestatic |
Check if fifo needs dequeue notification.
Determines based on notification request flags and state of the fifo if an event should be generated.
f | fifo |
n_last_deq | number of bytes last dequeued |
Definition at line 839 of file svm_fifo.h.
|
inlinestatic |
|
inlinestatic |
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 866 of file svm_fifo.c.
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 1007 of file svm_fifo.c.
int svm_fifo_reduce_size | ( | svm_fifo_t * | f, |
u32 | len, | ||
u8 | try_shrink | ||
) |
Request to reduce fifo size by amount of bytes.
Because the producer might be enqueuing data when this is called, the actual size update is only applied when producer tries to enqueue new data, unless
try_shrink | is set. |
f | fifo |
len | number of bytes to remove from fifo. The actual number of bytes to be removed will be less or equal to this value. |
try_shrink | flg to indicate if it's safe to try to shrink fifo size. It should be set only if this is called by the producer of if the producer is not using the fifo |
Definition at line 807 of file svm_fifo.c.
u8* svm_fifo_replay | ( | u8 * | s, |
svm_fifo_t * | f, | ||
u8 | no_read, | ||
u8 | verbose | ||
) |
Definition at line 1292 of file svm_fifo.c.
|
inlinestatic |
Clear has notification flag.
The fifo generates only one event per SVM_FIFO_WANT_NOTIF_IF_FULL request and sets has_ntf. To received new events the flag must be cleared using this function.
f | fifo |
Definition at line 823 of file svm_fifo.h.
int svm_fifo_segments | ( | svm_fifo_t * | f, |
svm_fifo_seg_t * | fs | ||
) |
Definition at line 1077 of file svm_fifo.c.
void svm_fifo_segments_free | ( | svm_fifo_t * | f, |
svm_fifo_seg_t * | fs | ||
) |
|
inlinestatic |
Set fifo event flag.
Forces release semantics.
f | fifo |
Definition at line 748 of file svm_fifo.h.
u8 svm_fifo_set_single_thread_owned | ( | svm_fifo_t * | f | ) |
Declare this fifo is used by only a single thread.
In this special case, fifo-growth can be done in an efficient way without delay.
f | fifo |
Definition at line 1237 of file svm_fifo.c.
|
inlinestatic |
void svm_fifo_try_shrink | ( | svm_fifo_t * | f, |
u32 | head, | ||
u32 | tail | ||
) |
Try to shrink fifo size.
Internal function.
Definition at line 734 of file svm_fifo.c.
|
inlinestatic |
Unset fifo event flag.
Forces acquire semantics
f | fifo |
Definition at line 761 of file svm_fifo.h.
format_function_t format_svm_fifo |
Definition at line 489 of file svm_fifo.h.