FD.io VPP  v20.05.1-5-g09f167997
Vector Packet Processing
ring.h File Reference
+ Include dependency graph for ring.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  clib_ring_header_t
 

Macros

#define clib_ring_new_aligned(ring, size, align)   { clib_ring_new_inline ((void **)&(ring), sizeof(ring[0]), size, align); }
 
#define clib_ring_new(ring, size)   { clib_ring_new_inline ((void **)&(ring), sizeof(ring[0]), size, 0);}
 
#define clib_ring_free(f)   vec_free_h((f), sizeof(clib_ring_header_t))
 
#define clib_ring_enq(ring)   clib_ring_get_last_inline (ring, sizeof(ring[0]), 1)
 
#define clib_ring_get_last(ring)   clib_ring_get_last_inline (ring, sizeof(ring[0]), 0)
 
#define clib_ring_deq(ring)   clib_ring_get_first_inline (ring, sizeof(ring[0]), 1)
 
#define clib_ring_get_first(ring)   clib_ring_get_first_inline (ring, sizeof(ring[0]), 0)
 

Functions

static clib_ring_header_tclib_ring_header (void *v)
 
static void clib_ring_new_inline (void **p, u32 elt_bytes, u32 size, u32 align)
 
static u32 clib_ring_n_enq (void *v)
 
static void * clib_ring_get_last_inline (void *v, u32 elt_bytes, int enqueue)
 
static void * clib_ring_get_first_inline (void *v, u32 elt_bytes, int dequeue)
 

Macro Definition Documentation

◆ clib_ring_deq

#define clib_ring_deq (   ring)    clib_ring_get_first_inline (ring, sizeof(ring[0]), 1)

Definition at line 120 of file ring.h.

◆ clib_ring_enq

#define clib_ring_enq (   ring)    clib_ring_get_last_inline (ring, sizeof(ring[0]), 1)

Definition at line 94 of file ring.h.

◆ clib_ring_free

#define clib_ring_free (   f)    vec_free_h((f), sizeof(clib_ring_header_t))

Definition at line 59 of file ring.h.

◆ clib_ring_get_first

#define clib_ring_get_first (   ring)    clib_ring_get_first_inline (ring, sizeof(ring[0]), 0)

Definition at line 123 of file ring.h.

◆ clib_ring_get_last

#define clib_ring_get_last (   ring)    clib_ring_get_last_inline (ring, sizeof(ring[0]), 0)

Definition at line 97 of file ring.h.

◆ clib_ring_new

#define clib_ring_new (   ring,
  size 
)    { clib_ring_new_inline ((void **)&(ring), sizeof(ring[0]), size, 0);}

Definition at line 56 of file ring.h.

◆ clib_ring_new_aligned

#define clib_ring_new_aligned (   ring,
  size,
  align 
)    { clib_ring_new_inline ((void **)&(ring), sizeof(ring[0]), size, align); }

Definition at line 53 of file ring.h.

Function Documentation

◆ clib_ring_get_first_inline()

static void* clib_ring_get_first_inline ( void *  v,
u32  elt_bytes,
int  dequeue 
)
inlinestatic

Definition at line 101 of file ring.h.

+ Here is the call graph for this function:

◆ clib_ring_get_last_inline()

static void* clib_ring_get_last_inline ( void *  v,
u32  elt_bytes,
int  enqueue 
)
inlinestatic

Definition at line 69 of file ring.h.

+ Here is the call graph for this function:

◆ clib_ring_header()

static clib_ring_header_t* clib_ring_header ( void *  v)
inlinestatic

Definition at line 30 of file ring.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clib_ring_n_enq()

static u32 clib_ring_n_enq ( void *  v)
inlinestatic

Definition at line 62 of file ring.h.

+ Here is the call graph for this function:

◆ clib_ring_new_inline()

static void clib_ring_new_inline ( void **  p,
u32  elt_bytes,
u32  size,
u32  align 
)
inlinestatic

Definition at line 36 of file ring.h.