FD.io VPP  v20.09-64-g4f7b92f0a
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_add_del_mac_address (vnet_hw_interface_t *hi, const u8 *address, u8 is_add)
 
static clib_error_tdpdk_set_mac_address (vnet_hw_interface_t *hi, const u8 *old_address, const u8 *address)
 
static void dpdk_tx_trace_buffer (dpdk_main_t *dm, vlib_node_runtime_t *node, dpdk_device_t *xd, u16 queue_id, 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 **mb, u32 n_left)
 
static_always_inline __clib_unused void dpdk_prefetch_buffer (vlib_main_t *vm, struct rte_mbuf *mb)
 
static_always_inline void dpdk_buffer_tx_offload (dpdk_device_t *xd, vlib_buffer_t *b, struct rte_mbuf *mb)
 
VNET_DEVICE_CLASS_TX_FN() dpdk_device_class (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)
 
static clib_error_tdpdk_interface_set_rss_queues (struct vnet_main_t *vnm, struct vnet_hw_interface_t *hi, clib_bitmap_t *bitmap)
 
 VNET_DEVICE_CLASS (dpdk_device_class)
 
static 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_registration_t admin_up_down_process_node
 (constructor) VLIB_REGISTER_NODE (admin_up_down_process_node) More...
 

Macro Definition Documentation

◆ foreach_dpdk_tx_func_error

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

Definition at line 26 of file device.c.

◆ UP_DOWN_FLAG_EVENT

#define UP_DOWN_FLAG_EVENT   1

Definition at line 717 of file device.c.

Enumeration Type Documentation

◆ dpdk_tx_func_error_t

Enumerator
DPDK_TX_FUNC_N_ERROR 

Definition at line 30 of file device.c.

Function Documentation

◆ admin_up_down_process()

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

Definition at line 720 of file device.c.

+ Here is the call graph for this function:

◆ dpdk_add_del_mac_address()

static clib_error_t* dpdk_add_del_mac_address ( vnet_hw_interface_t hi,
const u8 address,
u8  is_add 
)
static

Definition at line 45 of file device.c.

+ Here is the caller graph for this function:

◆ dpdk_buffer_tx_offload()

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

Definition at line 218 of file device.c.

+ Here is the caller graph for this function:

◆ dpdk_clear_hw_interface_counters()

static void dpdk_clear_hw_interface_counters ( u32  instance)
static

Definition at line 457 of file device.c.

+ Here is the caller graph for this function:

◆ dpdk_device_class()

VNET_DEVICE_CLASS_TX_FN() dpdk_device_class ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)

Definition at line 262 of file device.c.

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

◆ dpdk_interface_admin_up_down()

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

Definition at line 467 of file device.c.

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

◆ dpdk_interface_set_rss_queues()

static clib_error_t* dpdk_interface_set_rss_queues ( struct vnet_main_t vnm,
struct vnet_hw_interface_t hi,
clib_bitmap_t bitmap 
)
static

Definition at line 588 of file device.c.

+ Here is the call graph for this function:

◆ dpdk_prefetch_buffer()

static_always_inline __clib_unused void dpdk_prefetch_buffer ( vlib_main_t vm,
struct rte_mbuf *  mb 
)

Definition at line 210 of file device.c.

+ Here is the caller graph for this function:

◆ dpdk_set_interface_next_node()

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

Definition at line 502 of file device.c.

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

◆ dpdk_set_mac_address()

static clib_error_t* dpdk_set_mac_address ( vnet_hw_interface_t hi,
const u8 old_address,
const u8 address 
)
static

Definition at line 68 of file device.c.

+ Here is the caller graph for this function:

◆ dpdk_subif_add_del_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 522 of file device.c.

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

◆ dpdk_tx_trace_buffer()

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

Definition at line 90 of file device.c.

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

◆ dpdk_validate_rte_mbuf()

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

Definition at line 114 of file device.c.

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

◆ tx_burst_vector_internal()

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

Definition at line 156 of file device.c.

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

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( dpdk_device_class  )

Variable Documentation

◆ admin_up_down_process_node

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

(constructor) VLIB_REGISTER_NODE (admin_up_down_process_node)

Definition at line 763 of file device.c.

◆ dpdk_tx_func_error_strings

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

Definition at line 38 of file device.c.