FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
buffer.c File Reference

Allocate/free network buffers. More...

+ Include dependency graph for buffer.c:

Go to the source code of this file.

Data Structures

struct  dpdk_buffer_per_thread_data
 
struct  dpdk_buffer_main_t
 

Functions

 STATIC_ASSERT (VLIB_BUFFER_PRE_DATA_SIZE==RTE_PKTMBUF_HEADROOM, "VLIB_BUFFER_PRE_DATA_SIZE must be equal to RTE_PKTMBUF_HEADROOM")
 
static_always_inline void dpdk_rte_pktmbuf_free (vlib_main_t *vm, u32 thread_index, vlib_buffer_t *b, int maybe_next)
 
static void del_free_list (vlib_main_t *vm, vlib_buffer_free_list_t *f)
 
static void dpdk_buffer_delete_free_list (vlib_main_t *vm, vlib_buffer_free_list_index_t free_list_index)
 
uword CLIB_MULTIARCH_FN() dpdk_buffer_fill_free_list (vlib_main_t *vm, vlib_buffer_free_list_t *fl, uword min_free_buffers)
 
static_always_inline void dpdk_prefetch_buffer (vlib_buffer_t *b)
 
static_always_inline void recycle_or_free (vlib_main_t *vm, vlib_buffer_main_t *bm, u32 bi, vlib_buffer_t *b)
 
static_always_inline void vlib_buffer_free_inline (vlib_main_t *vm, u32 *buffers, u32 n_buffers, u32 follow_buffer_next)
 
void CLIB_MULTIARCH_FN() dpdk_buffer_free (vlib_main_t *vm, u32 *buffers, u32 n_buffers)
 
void CLIB_MULTIARCH_FN() dpdk_buffer_free_no_next (vlib_main_t *vm, u32 *buffers, u32 n_buffers)
 
clib_error_tdpdk_pool_create (vlib_main_t *vm, u8 *pool_name, u32 elt_size, u32 num_elts, u32 pool_priv_size, u16 cache_size, u8 numa, struct rte_mempool **_mp, u32 *map_index)
 
clib_error_tdpdk_buffer_pool_create (vlib_main_t *vm, unsigned num_mbufs, unsigned socket_id)
 
static clib_error_tbuffer_state_validation_init (vlib_main_t *vm)
 
static clib_error_tdpdk_buffer_init (vlib_main_t *vm)
 
 VLIB_BUFFER_REGISTER_CALLBACKS (dpdk, static)
 
static void __clib_constructor dpdk_input_multiarch_select (void)
 

Variables

dpdk_buffer_main_t dpdk_buffer_main
 
u32vlib_buffer_state_validation_lock
 
uwordvlib_buffer_state_validation_hash
 
void * vlib_buffer_state_heap
 
vlib_buffer_fill_free_list_cb_t __clib_weak dpdk_buffer_fill_free_list_avx512
 
vlib_buffer_fill_free_list_cb_t __clib_weak dpdk_buffer_fill_free_list_avx2
 
vlib_buffer_free_cb_t __clib_weak dpdk_buffer_free_avx512
 
vlib_buffer_free_cb_t __clib_weak dpdk_buffer_free_avx2
 
vlib_buffer_free_no_next_cb_t __clib_weak dpdk_buffer_free_no_next_avx512
 
vlib_buffer_free_no_next_cb_t __clib_weak dpdk_buffer_free_no_next_avx2
 

Detailed Description

Allocate/free network buffers.

Definition in file buffer.c.

Function Documentation

◆ buffer_state_validation_init()

static clib_error_t* buffer_state_validation_init ( vlib_main_t vm)
static

Definition at line 512 of file buffer.c.

+ Here is the call graph for this function:

◆ del_free_list()

static void del_free_list ( vlib_main_t vm,
vlib_buffer_free_list_t f 
)
static

Definition at line 128 of file buffer.c.

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

◆ dpdk_buffer_delete_free_list()

static void dpdk_buffer_delete_free_list ( vlib_main_t vm,
vlib_buffer_free_list_index_t  free_list_index 
)
static

Definition at line 148 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_buffer_fill_free_list()

uword CLIB_MULTIARCH_FN() dpdk_buffer_fill_free_list ( vlib_main_t vm,
vlib_buffer_free_list_t fl,
uword  min_free_buffers 
)

Definition at line 174 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_buffer_free()

void CLIB_MULTIARCH_FN() dpdk_buffer_free ( vlib_main_t vm,
u32 buffers,
u32  n_buffers 
)

Definition at line 360 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_buffer_free_no_next()

void CLIB_MULTIARCH_FN() dpdk_buffer_free_no_next ( vlib_main_t vm,
u32 buffers,
u32  n_buffers 
)

Definition at line 368 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_buffer_init()

static clib_error_t* dpdk_buffer_init ( vlib_main_t vm)
static

Definition at line 592 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_buffer_pool_create()

clib_error_t* dpdk_buffer_pool_create ( vlib_main_t vm,
unsigned  num_mbufs,
unsigned  socket_id 
)

Definition at line 444 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_input_multiarch_select()

static void __clib_constructor dpdk_input_multiarch_select ( void  )
static

Definition at line 625 of file buffer.c.

◆ dpdk_pool_create()

clib_error_t* dpdk_pool_create ( vlib_main_t vm,
u8 pool_name,
u32  elt_size,
u32  num_elts,
u32  pool_priv_size,
u16  cache_size,
u8  numa,
struct rte_mempool **  _mp,
u32 map_index 
)

Definition at line 377 of file buffer.c.

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

◆ dpdk_prefetch_buffer()

static_always_inline void dpdk_prefetch_buffer ( vlib_buffer_t b)

Definition at line 267 of file buffer.c.

+ Here is the caller graph for this function:

◆ dpdk_rte_pktmbuf_free()

static_always_inline void dpdk_rte_pktmbuf_free ( vlib_main_t vm,
u32  thread_index,
vlib_buffer_t b,
int  maybe_next 
)

Definition at line 99 of file buffer.c.

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

◆ recycle_or_free()

static_always_inline void recycle_or_free ( vlib_main_t vm,
vlib_buffer_main_t bm,
u32  bi,
vlib_buffer_t b 
)

Definition at line 276 of file buffer.c.

+ Here is the call graph for this function:

◆ STATIC_ASSERT()

STATIC_ASSERT ( VLIB_BUFFER_PRE_DATA_SIZE  = =RTE_PKTMBUF_HEADROOM,
"VLIB_BUFFER_PRE_DATA_SIZE must be equal to RTE_PKTMBUF_HEADROOM"   
)

◆ vlib_buffer_free_inline()

static_always_inline void vlib_buffer_free_inline ( vlib_main_t vm,
u32 buffers,
u32  n_buffers,
u32  follow_buffer_next 
)

Definition at line 285 of file buffer.c.

+ Here is the call graph for this function:

◆ VLIB_BUFFER_REGISTER_CALLBACKS()

VLIB_BUFFER_REGISTER_CALLBACKS ( dpdk  ,
static   
)

Variable Documentation

◆ dpdk_buffer_fill_free_list_avx2

vlib_buffer_fill_free_list_cb_t __clib_weak dpdk_buffer_fill_free_list_avx2

Definition at line 618 of file buffer.c.

◆ dpdk_buffer_fill_free_list_avx512

vlib_buffer_fill_free_list_cb_t __clib_weak dpdk_buffer_fill_free_list_avx512

Definition at line 617 of file buffer.c.

◆ dpdk_buffer_free_avx2

vlib_buffer_free_cb_t __clib_weak dpdk_buffer_free_avx2

Definition at line 620 of file buffer.c.

◆ dpdk_buffer_free_avx512

vlib_buffer_free_cb_t __clib_weak dpdk_buffer_free_avx512

Definition at line 619 of file buffer.c.

◆ dpdk_buffer_free_no_next_avx2

vlib_buffer_free_no_next_cb_t __clib_weak dpdk_buffer_free_no_next_avx2

Definition at line 622 of file buffer.c.

◆ dpdk_buffer_free_no_next_avx512

vlib_buffer_free_no_next_cb_t __clib_weak dpdk_buffer_free_no_next_avx512

Definition at line 621 of file buffer.c.

◆ dpdk_buffer_main

dpdk_buffer_main_t dpdk_buffer_main

Definition at line 96 of file buffer.c.

◆ vlib_buffer_state_heap

void* vlib_buffer_state_heap

Definition at line 509 of file buffer.c.

◆ vlib_buffer_state_validation_hash

uword* vlib_buffer_state_validation_hash

Definition at line 508 of file buffer.c.

◆ vlib_buffer_state_validation_lock

u32* vlib_buffer_state_validation_lock

Definition at line 507 of file buffer.c.