FD.io VPP  v21.01.1
Vector Packet Processing
buffer.c File Reference
+ Include dependency graph for buffer.c:

Go to the source code of this file.

Functions

 STATIC_ASSERT (VLIB_BUFFER_PRE_DATA_SIZE==RTE_PKTMBUF_HEADROOM, "VLIB_BUFFER_PRE_DATA_SIZE must be equal to RTE_PKTMBUF_HEADROOM")
 
clib_error_tdpdk_buffer_pool_init (vlib_main_t *vm, vlib_buffer_pool_t *bp)
 
static int dpdk_ops_vpp_alloc (struct rte_mempool *mp)
 
static void dpdk_ops_vpp_free (struct rte_mempool *mp)
 
static_always_inline void dpdk_ops_vpp_enqueue_one (vlib_buffer_t *bt, void *obj)
 
int CLIB_MULTIARCH_FN() dpdk_ops_vpp_enqueue (struct rte_mempool *mp, void *const *obj_table, unsigned n)
 
 CLIB_MARCH_FN_REGISTRATION (dpdk_ops_vpp_enqueue)
 
static_always_inline void dpdk_ops_vpp_enqueue_no_cache_one (vlib_main_t *vm, struct rte_mempool *old, struct rte_mempool *new, void *obj, vlib_buffer_t *bt)
 
int CLIB_MULTIARCH_FN() dpdk_ops_vpp_enqueue_no_cache (struct rte_mempool *cmp, void *const *obj_table, unsigned n)
 
 CLIB_MARCH_FN_REGISTRATION (dpdk_ops_vpp_enqueue_no_cache)
 
static_always_inline void dpdk_mbuf_init_from_template (struct rte_mbuf **mba, struct rte_mbuf *mt, int count)
 
int CLIB_MULTIARCH_FN() dpdk_ops_vpp_dequeue (struct rte_mempool *mp, void **obj_table, unsigned n)
 
 CLIB_MARCH_FN_REGISTRATION (dpdk_ops_vpp_dequeue)
 
static int dpdk_ops_vpp_dequeue_no_cache (struct rte_mempool *mp, void **obj_table, unsigned n)
 
static unsigned dpdk_ops_vpp_get_count (const struct rte_mempool *mp)
 
static unsigned dpdk_ops_vpp_get_count_no_cache (const struct rte_mempool *mp)
 
clib_error_tdpdk_buffer_pools_create (vlib_main_t *vm)
 
 VLIB_BUFFER_SET_EXT_HDR_SIZE (sizeof(struct rte_mempool_objhdr)+sizeof(struct rte_mbuf))
 

Variables

struct rte_mbuf * dpdk_mbuf_template_by_pool_index = 0
 
struct rte_mempool ** dpdk_mempool_by_buffer_pool_index = 0
 
struct rte_mempool ** dpdk_no_cache_mempool_by_buffer_pool_index = 0
 

Function Documentation

◆ CLIB_MARCH_FN_REGISTRATION() [1/3]

CLIB_MARCH_FN_REGISTRATION ( dpdk_ops_vpp_enqueue  )
+ Here is the caller graph for this function:

◆ CLIB_MARCH_FN_REGISTRATION() [2/3]

CLIB_MARCH_FN_REGISTRATION ( dpdk_ops_vpp_enqueue_no_cache  )

◆ CLIB_MARCH_FN_REGISTRATION() [3/3]

CLIB_MARCH_FN_REGISTRATION ( dpdk_ops_vpp_dequeue  )

◆ dpdk_buffer_pool_init()

clib_error_t* dpdk_buffer_pool_init ( vlib_main_t vm,
vlib_buffer_pool_t bp 
)

Definition at line 38 of file buffer.c.

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

◆ dpdk_buffer_pools_create()

clib_error_t* dpdk_buffer_pools_create ( vlib_main_t vm)

Definition at line 430 of file buffer.c.

+ Here is the call graph for this function:

◆ dpdk_mbuf_init_from_template()

static_always_inline void dpdk_mbuf_init_from_template ( struct rte_mbuf **  mba,
struct rte_mbuf *  mt,
int  count 
)

Definition at line 314 of file buffer.c.

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

◆ dpdk_ops_vpp_alloc()

static int dpdk_ops_vpp_alloc ( struct rte_mempool *  mp)
static

Definition at line 181 of file buffer.c.

+ Here is the caller graph for this function:

◆ dpdk_ops_vpp_dequeue()

int CLIB_MULTIARCH_FN() dpdk_ops_vpp_dequeue ( struct rte_mempool *  mp,
void **  obj_table,
unsigned  n 
)

Definition at line 345 of file buffer.c.

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

◆ dpdk_ops_vpp_dequeue_no_cache()

static int dpdk_ops_vpp_dequeue_no_cache ( struct rte_mempool *  mp,
void **  obj_table,
unsigned  n 
)
static

Definition at line 407 of file buffer.c.

+ Here is the caller graph for this function:

◆ dpdk_ops_vpp_enqueue()

int CLIB_MULTIARCH_FN() dpdk_ops_vpp_enqueue ( struct rte_mempool *  mp,
void *const *  obj_table,
unsigned  n 
)

Definition at line 208 of file buffer.c.

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

◆ dpdk_ops_vpp_enqueue_no_cache()

int CLIB_MULTIARCH_FN() dpdk_ops_vpp_enqueue_no_cache ( struct rte_mempool *  cmp,
void *const *  obj_table,
unsigned  n 
)

Definition at line 279 of file buffer.c.

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

◆ dpdk_ops_vpp_enqueue_no_cache_one()

static_always_inline void dpdk_ops_vpp_enqueue_no_cache_one ( vlib_main_t vm,
struct rte_mempool *  old,
struct rte_mempool *  new,
void *  obj,
vlib_buffer_t bt 
)

Definition at line 262 of file buffer.c.

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

◆ dpdk_ops_vpp_enqueue_one()

static_always_inline void dpdk_ops_vpp_enqueue_one ( vlib_buffer_t bt,
void *  obj 
)

Definition at line 196 of file buffer.c.

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

◆ dpdk_ops_vpp_free()

static void dpdk_ops_vpp_free ( struct rte_mempool *  mp)
static

Definition at line 188 of file buffer.c.

+ Here is the caller graph for this function:

◆ dpdk_ops_vpp_get_count()

static unsigned dpdk_ops_vpp_get_count ( const struct rte_mempool *  mp)
static

Definition at line 415 of file buffer.c.

+ Here is the caller graph for this function:

◆ dpdk_ops_vpp_get_count_no_cache()

static unsigned dpdk_ops_vpp_get_count_no_cache ( const struct rte_mempool *  mp)
static

Definition at line 422 of file buffer.c.

+ Here is the call graph for this function:
+ Here is the caller 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_SET_EXT_HDR_SIZE()

VLIB_BUFFER_SET_EXT_HDR_SIZE ( sizeof(struct rte_mempool_objhdr)+sizeof(struct rte_mbuf)  )
+ Here is the caller graph for this function:

Variable Documentation

◆ dpdk_mbuf_template_by_pool_index

struct rte_mbuf * dpdk_mbuf_template_by_pool_index = 0

Definition at line 35 of file buffer.c.

◆ dpdk_mempool_by_buffer_pool_index

struct rte_mempool** dpdk_mempool_by_buffer_pool_index = 0

Definition at line 33 of file buffer.c.

◆ dpdk_no_cache_mempool_by_buffer_pool_index

struct rte_mempool** dpdk_no_cache_mempool_by_buffer_pool_index = 0

Definition at line 34 of file buffer.c.