FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
svm_fifo.h File Reference
+ Include dependency graph for svm_fifo.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Macros

#define SVM_FIFO_TRACE   (0)
 
#define OOO_SEGMENT_INVALID_INDEX   ((u32)~0)
 
#define svm_fifo_trace_add(_f, _s, _l, _t)
 

Typedefs

typedef struct _svm_fifo svm_fifo_t
 

Enumerations

enum  svm_fifo_err_t { SVM_FIFO_FULL = -2 }
 

Functions

u8svm_fifo_dump_trace (u8 *s, svm_fifo_t *f)
 
u8svm_fifo_replay (u8 *s, svm_fifo_t *f, u8 no_read, u8 verbose)
 
static u32 svm_fifo_max_dequeue (svm_fifo_t *f)
 
static u32 svm_fifo_max_enqueue (svm_fifo_t *f)
 
static u8 svm_fifo_has_ooo_data (svm_fifo_t *f)
 
static u8 svm_fifo_set_event (svm_fifo_t *f)
 Sets fifo event flag. More...
 
static void svm_fifo_unset_event (svm_fifo_t *f)
 Unsets fifo event flag. More...
 
svm_fifo_tsvm_fifo_create (u32 data_size_in_bytes)
 create an svm fifo, in the current heap. More...
 
void svm_fifo_free (svm_fifo_t *f)
 
int svm_fifo_enqueue_nowait (svm_fifo_t *f, u32 max_bytes, const u8 *copy_from_here)
 
int svm_fifo_enqueue_with_offset (svm_fifo_t *f, u32 offset, u32 required_bytes, u8 *copy_from_here)
 
int svm_fifo_dequeue_nowait (svm_fifo_t *f, u32 max_bytes, u8 *copy_here)
 
int svm_fifo_peek (svm_fifo_t *f, u32 offset, u32 max_bytes, u8 *copy_here)
 
int svm_fifo_dequeue_drop (svm_fifo_t *f, u32 max_bytes)
 
void svm_fifo_dequeue_drop_all (svm_fifo_t *f)
 
u32 svm_fifo_number_ooo_segments (svm_fifo_t *f)
 
ooo_segment_tsvm_fifo_first_ooo_segment (svm_fifo_t *f)
 
void svm_fifo_init_pointers (svm_fifo_t *f, u32 pointer)
 Set fifo pointers to requested offset. More...
 
void svm_fifo_overwrite_head (svm_fifo_t *f, u8 *data, u32 len)
 
static ooo_segment_tsvm_fifo_newest_ooo_segment (svm_fifo_t *f)
 
static void svm_fifo_newest_ooo_segment_reset (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 void svm_fifo_enqueue_nocopy (svm_fifo_t *f, u32 bytes)
 Advance tail pointer. More...
 
static u8svm_fifo_head (svm_fifo_t *f)
 
static u8svm_fifo_tail (svm_fifo_t *f)
 
static u32 ooo_segment_distance_from_tail (svm_fifo_t *f, u32 pos)
 
static u32 ooo_segment_distance_to_tail (svm_fifo_t *f, u32 pos)
 
static u32 ooo_segment_offset (svm_fifo_t *f, ooo_segment_t *s)
 
static u32 ooo_segment_end_offset (svm_fifo_t *f, ooo_segment_t *s)
 
static u32 ooo_segment_length (svm_fifo_t *f, ooo_segment_t *s)
 
static ooo_segment_tooo_segment_get_prev (svm_fifo_t *f, ooo_segment_t *s)
 
static ooo_segment_tooo_segment_next (svm_fifo_t *f, ooo_segment_t *s)
 

Variables

format_function_t format_ooo_segment
 
format_function_t format_ooo_list
 
format_function_t format_svm_fifo
 

Macro Definition Documentation

#define OOO_SEGMENT_INVALID_INDEX   ((u32)~0)

Definition at line 40 of file svm_fifo.h.

#define SVM_FIFO_TRACE   (0)

Definition at line 39 of file svm_fifo.h.

#define svm_fifo_trace_add (   _f,
  _s,
  _l,
  _t 
)

Definition at line 98 of file svm_fifo.h.

Typedef Documentation

typedef struct _svm_fifo svm_fifo_t

Enumeration Type Documentation

Enumerator
SVM_FIFO_FULL 

Definition at line 83 of file svm_fifo.h.

Function Documentation

static u32 ooo_segment_distance_from_tail ( svm_fifo_t f,
u32  pos 
)
inlinestatic

Definition at line 221 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 ooo_segment_distance_to_tail ( svm_fifo_t f,
u32  pos 
)
inlinestatic

Definition at line 231 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 ooo_segment_end_offset ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 243 of file svm_fifo.h.

+ Here is the call graph for this function:

static ooo_segment_t* ooo_segment_get_prev ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 255 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 ooo_segment_length ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 249 of file svm_fifo.h.

+ Here is the caller graph for this function:

static ooo_segment_t* ooo_segment_next ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 263 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 ooo_segment_offset ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 237 of file svm_fifo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

svm_fifo_t* svm_fifo_create ( u32  data_size_in_bytes)

create an svm fifo, in the current heap.

Fails vs blow up the process

Definition at line 198 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  max_bytes 
)

Definition at line 792 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)

Definition at line 832 of file svm_fifo.c.

+ Here is the caller graph for this function:

int svm_fifo_dequeue_nowait ( svm_fifo_t f,
u32  max_bytes,
u8 copy_here 
)

Definition at line 710 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 66 of file svm_fifo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void svm_fifo_enqueue_nocopy ( svm_fifo_t f,
u32  bytes 
)
inlinestatic

Advance tail pointer.

Useful for moving tail pointer after external enqueue.

Definition at line 201 of file svm_fifo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int svm_fifo_enqueue_nowait ( svm_fifo_t f,
u32  max_bytes,
const u8 copy_from_here 
)

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:

int svm_fifo_enqueue_with_offset ( svm_fifo_t f,
u32  offset,
u32  required_bytes,
u8 copy_from_here 
)

Definition at line 614 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)

Definition at line 845 of file svm_fifo.c.

+ Here is the caller graph for this function:

void svm_fifo_free ( svm_fifo_t f)

Definition at line 218 of file svm_fifo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 svm_fifo_has_ooo_data ( svm_fifo_t f)
inlinestatic

Definition at line 117 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u8* svm_fifo_head ( svm_fifo_t f)
inlinestatic

Definition at line 209 of file svm_fifo.h.

+ Here is the caller graph for this function:

void svm_fifo_init_pointers ( svm_fifo_t f,
u32  pointer 
)

Set fifo pointers to requested offset.

Definition at line 854 of file svm_fifo.c.

+ Here is the caller graph for this function:

static u32 svm_fifo_max_dequeue ( svm_fifo_t f)
inlinestatic

Definition at line 105 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 svm_fifo_max_enqueue ( svm_fifo_t f)
inlinestatic

Definition at line 111 of file svm_fifo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 svm_fifo_max_read_chunk ( svm_fifo_t f)
inlinestatic

Max contiguous chunk of data that can be read.

Definition at line 181 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u32 svm_fifo_max_write_chunk ( svm_fifo_t f)
inlinestatic

Max contiguous chunk of data that can be written.

Definition at line 190 of file svm_fifo.h.

+ Here is the caller graph for this function:

static ooo_segment_t* svm_fifo_newest_ooo_segment ( svm_fifo_t f)
inlinestatic

Definition at line 164 of file svm_fifo.h.

+ Here is the caller graph for this function:

static void svm_fifo_newest_ooo_segment_reset ( svm_fifo_t f)
inlinestatic

Definition at line 172 of file svm_fifo.h.

+ Here is the caller graph for this function:

u32 svm_fifo_number_ooo_segments ( svm_fifo_t f)

Definition at line 839 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 data,
u32  len 
)

Definition at line 623 of file svm_fifo.c.

+ Here is the caller graph for this function:

int svm_fifo_peek ( svm_fifo_t f,
u32  offset,
u32  max_bytes,
u8 copy_here 
)

Definition at line 776 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 90 of file svm_fifo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 svm_fifo_set_event ( svm_fifo_t f)
inlinestatic

Sets fifo event flag.

Returns
1 if flag was not set.

Definition at line 128 of file svm_fifo.h.

+ Here is the caller graph for this function:

static u8* svm_fifo_tail ( svm_fifo_t f)
inlinestatic

Definition at line 215 of file svm_fifo.h.

+ Here is the caller graph for this function:

static void svm_fifo_unset_event ( svm_fifo_t f)
inlinestatic

Unsets fifo event flag.

Definition at line 138 of file svm_fifo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

format_function_t format_ooo_list

Definition at line 37 of file svm_fifo.h.

format_function_t format_ooo_segment

Definition at line 36 of file svm_fifo.h.

format_function_t format_svm_fifo

Definition at line 161 of file svm_fifo.h.