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

Go to the source code of this file.

Macros

#define VHOST_USER_TX_COPY_THRESHOLD   (VHOST_USER_COPY_ARRAY_N - 200)
 
#define foreach_vhost_user_tx_func_error
 

Enumerations

enum  vhost_user_tx_func_error_t { VHOST_USER_TX_FUNC_N_ERROR }
 

Functions

static __clib_unused u8format_vhost_user_interface_name (u8 *s, va_list *args)
 
static __clib_unused int vhost_user_name_renumber (vnet_hw_interface_t *hi, u32 new_dev_instance)
 
static_always_inline int vhost_user_vring_try_lock (vhost_user_intf_t *vui, u32 qid)
 Try once to lock the vring. More...
 
static_always_inline void vhost_user_vring_lock (vhost_user_intf_t *vui, u32 qid)
 Spin until the vring is successfully locked. More...
 
static_always_inline void vhost_user_vring_unlock (vhost_user_intf_t *vui, u32 qid)
 Unlock the vring lock. More...
 
static_always_inline void vhost_user_tx_trace (vhost_trace_t *t, vhost_user_intf_t *vui, u16 qid, vlib_buffer_t *b, vhost_user_vring_t *rxvq)
 
static_always_inline u32 vhost_user_tx_copy (vhost_user_intf_t *vui, vhost_copy_t *cpy, u16 copy_len, u32 *map_hint)
 
static_always_inline void vhost_user_handle_tx_offload (vhost_user_intf_t *vui, vlib_buffer_t *b, virtio_net_hdr_t *hdr)
 
static_always_inline void vhost_user_mark_desc_available (vlib_main_t *vm, vhost_user_vring_t *rxvq, u16 *n_descs_processed, u8 chained, vlib_frame_t *frame, u32 n_left)
 
static_always_inline void vhost_user_tx_trace_packed (vhost_trace_t *t, vhost_user_intf_t *vui, u16 qid, vlib_buffer_t *b, vhost_user_vring_t *rxvq)
 
static_always_inline uword vhost_user_device_class_packed (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VNET_DEVICE_CLASS_TX_FN() vhost_user_device_class (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static __clib_unused clib_error_tvhost_user_interface_rx_mode_change (vnet_main_t *vnm, u32 hw_if_index, u32 qid, vnet_hw_if_rx_mode mode)
 
static __clib_unused clib_error_tvhost_user_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_DEVICE_CLASS (vhost_user_device_class)
 

Variables

vnet_device_class_t vhost_user_device_class
 
static __clib_unused char * vhost_user_tx_func_error_strings []
 

Macro Definition Documentation

◆ foreach_vhost_user_tx_func_error

#define foreach_vhost_user_tx_func_error
Value:
_(NONE, "no error") \
_(NOT_READY, "vhost vring not ready") \
_(DOWN, "vhost interface is down") \
_(PKT_DROP_NOBUF, "tx packet drops (no available descriptors)") \
_(PKT_DROP_NOMRG, "tx packet drops (cannot merge descriptors)") \
_(MMAP_FAIL, "mmap failure") \
_(INDIRECT_OVERFLOW, "indirect descriptor table overflow")

Definition at line 61 of file vhost_user_output.c.

◆ VHOST_USER_TX_COPY_THRESHOLD

#define VHOST_USER_TX_COPY_THRESHOLD   (VHOST_USER_COPY_ARRAY_N - 200)

Definition at line 57 of file vhost_user_output.c.

Enumeration Type Documentation

◆ vhost_user_tx_func_error_t

Enumerator
VHOST_USER_TX_FUNC_N_ERROR 

Definition at line 70 of file vhost_user_output.c.

Function Documentation

◆ format_vhost_user_interface_name()

static __clib_unused u8* format_vhost_user_interface_name ( u8 s,
va_list *  args 
)
static

Definition at line 85 of file vhost_user_output.c.

+ Here is the caller graph for this function:

◆ vhost_user_device_class()

VNET_DEVICE_CLASS_TX_FN() vhost_user_device_class ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 710 of file vhost_user_output.c.

+ Here is the call graph for this function:

◆ vhost_user_device_class_packed()

static_always_inline uword vhost_user_device_class_packed ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 389 of file vhost_user_output.c.

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

◆ vhost_user_handle_tx_offload()

static_always_inline void vhost_user_handle_tx_offload ( vhost_user_intf_t vui,
vlib_buffer_t b,
virtio_net_hdr_t *  hdr 
)

Definition at line 233 of file vhost_user_output.c.

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

◆ vhost_user_interface_admin_up_down()

static __clib_unused clib_error_t* vhost_user_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 1115 of file vhost_user_output.c.

+ Here is the call graph for this function:

◆ vhost_user_interface_rx_mode_change()

static __clib_unused clib_error_t* vhost_user_interface_rx_mode_change ( vnet_main_t vnm,
u32  hw_if_index,
u32  qid,
vnet_hw_if_rx_mode  mode 
)
static

Definition at line 1053 of file vhost_user_output.c.

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

◆ vhost_user_mark_desc_available()

static_always_inline void vhost_user_mark_desc_available ( vlib_main_t vm,
vhost_user_vring_t rxvq,
u16 n_descs_processed,
u8  chained,
vlib_frame_t frame,
u32  n_left 
)

Definition at line 293 of file vhost_user_output.c.

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

◆ vhost_user_name_renumber()

static __clib_unused int vhost_user_name_renumber ( vnet_hw_interface_t hi,
u32  new_dev_instance 
)
static

Definition at line 102 of file vhost_user_output.c.

+ Here is the caller graph for this function:

◆ vhost_user_tx_copy()

static_always_inline u32 vhost_user_tx_copy ( vhost_user_intf_t vui,
vhost_copy_t cpy,
u16  copy_len,
u32 map_hint 
)

Definition at line 186 of file vhost_user_output.c.

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

◆ vhost_user_tx_trace()

static_always_inline void vhost_user_tx_trace ( vhost_trace_t t,
vhost_user_intf_t vui,
u16  qid,
vlib_buffer_t b,
vhost_user_vring_t rxvq 
)

Definition at line 151 of file vhost_user_output.c.

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

◆ vhost_user_tx_trace_packed()

static_always_inline void vhost_user_tx_trace_packed ( vhost_trace_t t,
vhost_user_intf_t vui,
u16  qid,
vlib_buffer_t b,
vhost_user_vring_t rxvq 
)

Definition at line 353 of file vhost_user_output.c.

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

◆ vhost_user_vring_lock()

static_always_inline void vhost_user_vring_lock ( vhost_user_intf_t vui,
u32  qid 
)

Spin until the vring is successfully locked.

Definition at line 135 of file vhost_user_output.c.

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

◆ vhost_user_vring_try_lock()

static_always_inline int vhost_user_vring_try_lock ( vhost_user_intf_t vui,
u32  qid 
)

Try once to lock the vring.

Returns
0 on success, non-zero on failure.

Definition at line 126 of file vhost_user_output.c.

+ Here is the caller graph for this function:

◆ vhost_user_vring_unlock()

static_always_inline void vhost_user_vring_unlock ( vhost_user_intf_t vui,
u32  qid 
)

Unlock the vring lock.

Definition at line 145 of file vhost_user_output.c.

+ Here is the caller graph for this function:

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( vhost_user_device_class  )
+ Here is the caller graph for this function:

Variable Documentation

◆ vhost_user_device_class

vnet_device_class_t vhost_user_device_class

◆ vhost_user_tx_func_error_strings

__clib_unused char* vhost_user_tx_func_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_vhost_user_tx_func_error

Definition at line 78 of file vhost_user_output.c.