FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
vhost_user_input.c File Reference
+ Include dependency graph for vhost_user_input.c:

Go to the source code of this file.

Macros

#define VHOST_USER_DOWN_DISCARD_COUNT   256
 
#define VHOST_USER_RX_BUFFER_STARVATION   32
 
#define VHOST_USER_RX_COPY_THRESHOLD   64
 
#define foreach_vhost_user_input_func_error
 

Enumerations

enum  vhost_user_input_func_error_t { VHOST_USER_INPUT_FUNC_N_ERROR }
 

Functions

static_always_inline void vhost_user_rx_trace (vhost_trace_t *t, vhost_user_intf_t *vui, u16 qid, vlib_buffer_t *b, vhost_user_vring_t *txvq)
 
static_always_inline u32 vhost_user_input_copy (vhost_user_intf_t *vui, vhost_copy_t *cpy, u16 copy_len, u32 *map_hint)
 
static_always_inline u32 vhost_user_rx_discard_packet (vlib_main_t *vm, vhost_user_intf_t *vui, vhost_user_vring_t *txvq, u32 discard_max)
 Try to discard packets from the tx ring (VPP RX path). More...
 
static __clib_unused void vhost_user_input_rewind_buffers (vlib_main_t *vm, vhost_cpu_t *cpu, vlib_buffer_t *b_head)
 
static __clib_unused u32 vhost_user_if_input (vlib_main_t *vm, vhost_user_main_t *vum, vhost_user_intf_t *vui, u16 qid, vlib_node_runtime_t *node, vnet_hw_interface_rx_mode mode)
 
VLIB_NODE_FN() vhost_user_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t vhost_user_input_node
 (constructor) VLIB_REGISTER_NODE (vhost_user_input_node) More...
 
static __clib_unused char * vhost_user_input_func_error_strings []
 

Macro Definition Documentation

#define foreach_vhost_user_input_func_error
Value:
_(NO_ERROR, "no error") \
_(NO_BUFFER, "no available buffer") \
_(MMAP_FAIL, "mmap failure") \
_(INDIRECT_OVERFLOW, "indirect descriptor overflows table") \
_(UNDERSIZED_FRAME, "undersized ethernet frame received (< 14 bytes)") \
_(FULL_RX_QUEUE, "full rx queue (possible driver tx drop)")

Definition at line 70 of file vhost_user_input.c.

#define VHOST_USER_DOWN_DISCARD_COUNT   256

Definition at line 50 of file vhost_user_input.c.

#define VHOST_USER_RX_BUFFER_STARVATION   32

Definition at line 56 of file vhost_user_input.c.

#define VHOST_USER_RX_COPY_THRESHOLD   64

Definition at line 66 of file vhost_user_input.c.

Enumeration Type Documentation

Enumerator
VHOST_USER_INPUT_FUNC_N_ERROR 

Definition at line 78 of file vhost_user_input.c.

Function Documentation

static __clib_unused u32 vhost_user_if_input ( vlib_main_t vm,
vhost_user_main_t vum,
vhost_user_intf_t vui,
u16  qid,
vlib_node_runtime_t node,
vnet_hw_interface_rx_mode  mode 
)
static

Definition at line 245 of file vhost_user_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 139 of file vhost_user_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_NODE_FN() vhost_user_input_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 631 of file vhost_user_input.c.

+ Here is the call graph for this function:

static __clib_unused void vhost_user_input_rewind_buffers ( vlib_main_t vm,
vhost_cpu_t cpu,
vlib_buffer_t b_head 
)
static

Definition at line 226 of file vhost_user_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u32 vhost_user_rx_discard_packet ( vlib_main_t vm,
vhost_user_intf_t vui,
vhost_user_vring_t txvq,
u32  discard_max 
)

Try to discard packets from the tx ring (VPP RX path).

Returns the number of discarded packets.

Definition at line 187 of file vhost_user_input.c.

+ Here is the caller graph for this function:

static_always_inline void vhost_user_rx_trace ( vhost_trace_t t,
vhost_user_intf_t vui,
u16  qid,
vlib_buffer_t b,
vhost_user_vring_t txvq 
)

Definition at line 93 of file vhost_user_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

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

Definition at line 86 of file vhost_user_input.c.

vlib_node_registration_t vhost_user_input_node
Initial value:
= {
.name = "vhost-user-input",
.sibling_of = "device-input",
.state = VLIB_NODE_STATE_DISABLED,
.format_trace = format_vhost_trace,
}
static_always_inline u8 * format_vhost_trace(u8 *s, va_list *va)
u8 * format_ethernet_header_with_length(u8 *s, va_list *args)
Definition: format.c:97
static __clib_unused char * vhost_user_input_func_error_strings[]

(constructor) VLIB_REGISTER_NODE (vhost_user_input_node)

Definition at line 68 of file vhost_user_input.c.