FD.io VPP  v17.04.2-2-ga8f93f8
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_t
 

Macros

#define OOO_SEGMENT_INVALID_INDEX   ((u32)~0)
 

Enumerations

enum  svm_lock_tag_t { SVM_FIFO_TAG_NOT_HELD = 0, SVM_FIFO_TAG_DEQUEUE, SVM_FIFO_TAG_ENQUEUE }
 

Functions

static int svm_fifo_lock (svm_fifo_t *f, u32 pid, u32 tag, int nowait)
 
static void svm_fifo_unlock (svm_fifo_t *f)
 
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)
 
svm_fifo_tsvm_fifo_create (u32 data_size_in_bytes)
 create an svm fifo, in the current heap. More...
 
int svm_fifo_enqueue_nowait (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_from_here)
 
int svm_fifo_enqueue_with_offset (svm_fifo_t *f, int pid, u32 offset, u32 required_bytes, u8 *copy_from_here)
 
int svm_fifo_dequeue_nowait (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_here)
 
int svm_fifo_peek (svm_fifo_t *f, int pid, u32 offset, u32 max_bytes, u8 *copy_here)
 
int svm_fifo_dequeue_drop (svm_fifo_t *f, int pid, u32 max_bytes)
 
static ooo_segment_tsvm_fifo_newest_ooo_segment (svm_fifo_t *f)
 
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)
 

Macro Definition Documentation

#define OOO_SEGMENT_INVALID_INDEX   ((u32)~0)

Definition at line 43 of file svm_fifo.h.

Enumeration Type Documentation

Enumerator
SVM_FIFO_TAG_NOT_HELD 
SVM_FIFO_TAG_DEQUEUE 
SVM_FIFO_TAG_ENQUEUE 

Definition at line 26 of file svm_fifo.h.

Function Documentation

static u32 ooo_segment_end_offset ( svm_fifo_t f,
ooo_segment_t s 
)
inlinestatic

Definition at line 144 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 138 of file svm_fifo.h.

+ 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 20 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,
int  pid,
u32  max_bytes 
)

Definition at line 527 of file svm_fifo.c.

+ Here is the caller graph for this function:

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

Definition at line 484 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_nowait ( svm_fifo_t f,
int  pid,
u32  max_bytes,
u8 copy_from_here 
)

Definition at line 359 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,
int  pid,
u32  offset,
u32  required_bytes,
u8 copy_from_here 
)

Definition at line 422 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 110 of file svm_fifo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int svm_fifo_lock ( svm_fifo_t f,
u32  pid,
u32  tag,
int  nowait 
)
inlinestatic

Definition at line 74 of file svm_fifo.h.

static u32 svm_fifo_max_dequeue ( svm_fifo_t f)
inlinestatic

Definition at line 98 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 104 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 132 of file svm_fifo.h.

+ Here is the caller graph for this function:

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

Definition at line 491 of file svm_fifo.c.

+ Here is the caller graph for this function:

static void svm_fifo_unlock ( svm_fifo_t f)
inlinestatic

Definition at line 89 of file svm_fifo.h.