FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
device.c File Reference
+ Include dependency graph for device.c:

Go to the source code of this file.

Macros

#define foreach_dpdk_tx_func_error
 
#define UP_DOWN_FLAG_EVENT   1
 

Enumerations

enum  dpdk_tx_func_error_t { DPDK_TX_FUNC_N_ERROR }
 

Functions

static clib_error_tdpdk_set_mac_address (vnet_hw_interface_t *hi, char *address)
 
static struct rte_mbuf * dpdk_replicate_packet_mb (vlib_buffer_t *b)
 
static void dpdk_tx_trace_buffer (dpdk_main_t *dm, vlib_node_runtime_t *node, dpdk_device_t *xd, u16 queue_id, u32 buffer_index, vlib_buffer_t *buffer)
 
static_always_inline void dpdk_validate_rte_mbuf (vlib_main_t *vm, vlib_buffer_t *b, int maybe_multiseg)
 
static_always_inline u32 tx_burst_vector_internal (vlib_main_t *vm, dpdk_device_t *xd, struct rte_mbuf **tx_vector)
 
static_always_inline void dpdk_prefetch_buffer_by_index (vlib_main_t *vm, u32 bi)
 
static_always_inline void dpdk_buffer_recycle (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, u32 bi, struct rte_mbuf **mbp)
 
static_always_inline void dpdk_buffer_tx_offload (dpdk_device_t *xd, vlib_buffer_t *b, struct rte_mbuf *mb)
 
uword CLIB_MULTIARCH_FN() dpdk_interface_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
static void dpdk_clear_hw_interface_counters (u32 instance)
 
static clib_error_tdpdk_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static void dpdk_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
static clib_error_tdpdk_subif_add_del_function (vnet_main_t *vnm, u32 hw_if_index, struct vnet_sw_interface_t *st, int is_add)
 
 VNET_DEVICE_CLASS (dpdk_device_class)
 
static void __clib_constructor dpdk_interface_tx_multiarch_select (void)
 
uword admin_up_down_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 

Variables

static char * dpdk_tx_func_error_strings []
 
vlib_node_function_t __clib_weak dpdk_interface_tx_avx512
 
vlib_node_function_t __clib_weak dpdk_interface_tx_avx2
 
static vlib_node_registration_t admin_up_down_process_node
 (constructor) VLIB_REGISTER_NODE (admin_up_down_process_node) More...
 

Macro Definition Documentation

#define foreach_dpdk_tx_func_error
Value:
_(BAD_RETVAL, "DPDK tx function returned an error") \
_(RING_FULL, "Tx packet drops (ring full)") \
_(PKT_DROP, "Tx packet drops (dpdk tx failure)") \
_(REPL_FAIL, "Tx packet drops (replication failure)")

Definition at line 27 of file device.c.

#define UP_DOWN_FLAG_EVENT   1

Definition at line 813 of file device.c.

Enumeration Type Documentation

Enumerator
DPDK_TX_FUNC_N_ERROR 

Definition at line 33 of file device.c.

Function Documentation

uword admin_up_down_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)

Definition at line 817 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void dpdk_buffer_recycle ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
u32  bi,
struct rte_mbuf **  mbp 
)

Definition at line 314 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void dpdk_buffer_tx_offload ( dpdk_device_t xd,
vlib_buffer_t b,
struct rte_mbuf *  mb 
)

Definition at line 338 of file device.c.

+ Here is the caller graph for this function:

static void dpdk_clear_hw_interface_counters ( u32  instance)
static

Definition at line 641 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* dpdk_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 660 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword CLIB_MULTIARCH_FN() dpdk_interface_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)

Definition at line 375 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void __clib_constructor dpdk_interface_tx_multiarch_select ( void  )
static

Definition at line 803 of file device.c.

static_always_inline void dpdk_prefetch_buffer_by_index ( vlib_main_t vm,
u32  bi 
)

Definition at line 303 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct rte_mbuf* dpdk_replicate_packet_mb ( vlib_buffer_t b)
static

Definition at line 72 of file device.c.

+ Here is the caller graph for this function:

static void dpdk_set_interface_next_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)
static

Definition at line 697 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* dpdk_set_mac_address ( vnet_hw_interface_t hi,
char *  address 
)
static

Definition at line 49 of file device.c.

+ Here is the caller graph for this function:

static clib_error_t* dpdk_subif_add_del_function ( vnet_main_t vnm,
u32  hw_if_index,
struct vnet_sw_interface_t st,
int  is_add 
)
static

Definition at line 717 of file device.c.

+ Here is the call graph for this function:

static void dpdk_tx_trace_buffer ( dpdk_main_t dm,
vlib_node_runtime_t node,
dpdk_device_t xd,
u16  queue_id,
u32  buffer_index,
vlib_buffer_t buffer 
)
static

Definition at line 114 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void dpdk_validate_rte_mbuf ( vlib_main_t vm,
vlib_buffer_t b,
int  maybe_multiseg 
)

Definition at line 138 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u32 tx_burst_vector_internal ( vlib_main_t vm,
dpdk_device_t xd,
struct rte_mbuf **  tx_vector 
)

Definition at line 193 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( dpdk_device_class  )

Variable Documentation

vlib_node_registration_t admin_up_down_process_node
static
Initial value:
= {
.function = admin_up_down_process,
.name = "admin-up-down-process",
.process_log2_n_stack_bytes = 17,
}
uword admin_up_down_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: device.c:817

(constructor) VLIB_REGISTER_NODE (admin_up_down_process_node)

Definition at line 860 of file device.c.

vlib_node_function_t __clib_weak dpdk_interface_tx_avx2

Definition at line 801 of file device.c.

vlib_node_function_t __clib_weak dpdk_interface_tx_avx512

Definition at line 800 of file device.c.

char* dpdk_tx_func_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_dpdk_tx_func_error
Definition: device.c:27

Definition at line 42 of file device.c.