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

Go to the source code of this file.

Data Structures

struct  virtio_input_trace_t
 

Macros

#define foreach_virtio_input_error
 
#define increment_last(last, packed, vring)
 

Enumerations

enum  virtio_input_error_t { VIRTIO_INPUT_N_ERROR }
 

Functions

static u8format_virtio_input_trace (u8 *s, va_list *args)
 
static_always_inline void virtio_refill_vring_split (vlib_main_t *vm, virtio_if_t *vif, virtio_if_type_t type, virtio_vring_t *vring, const int hdr_sz, u32 node_index)
 
static_always_inline void virtio_refill_vring_packed (vlib_main_t *vm, virtio_if_t *vif, virtio_if_type_t type, virtio_vring_t *vring, const int hdr_sz, u32 node_index)
 
static_always_inline void virtio_needs_csum (vlib_buffer_t *b0, virtio_net_hdr_v1_t *hdr, u8 *l4_proto, u8 *l4_hdr_sz, virtio_if_type_t type)
 
static_always_inline void fill_gso_buffer_flags (vlib_buffer_t *b0, virtio_net_hdr_v1_t *hdr, u8 l4_proto, u8 l4_hdr_sz)
 
static_always_inline u16 virtio_n_left_to_process (virtio_vring_t *vring, const int packed)
 
static_always_inline u16 virtio_get_slot_id (virtio_vring_t *vring, const int packed, u16 last, u16 mask)
 
static_always_inline u16 virtio_get_len (virtio_vring_t *vring, const int packed, const int hdr_sz, u16 last, u16 mask)
 
static_always_inline uword virtio_device_input_gso_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, virtio_if_t *vif, virtio_vring_t *vring, virtio_if_type_t type, int gso_enabled, int checksum_offload_enabled, int packed)
 
static_always_inline uword virtio_device_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, virtio_if_t *vif, u16 qid, virtio_if_type_t type)
 
VLIB_NODE_FN() virtio_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static char * virtio_input_error_strings []
 
vlib_node_registration_t virtio_input_node
 (constructor) VLIB_REGISTER_NODE (virtio_input_node) More...
 

Macro Definition Documentation

◆ foreach_virtio_input_error

#define foreach_virtio_input_error
Value:
_(BUFFER_ALLOC, "buffer alloc error") \
_(UNKNOWN, "unknown")

Definition at line 38 of file node.c.

◆ increment_last

#define increment_last (   last,
  packed,
  vring 
)
Value:
do { \
last++; \
if (packed && last >= vring->size) \
{ \
last = 0; \
vring->used_wrap_counter ^= 1; \
} \
} while (0)
static heap_elt_t * last(heap_header_t *h)
Definition: heap.c:53

Definition at line 372 of file node.c.

Enumeration Type Documentation

◆ virtio_input_error_t

Enumerator
VIRTIO_INPUT_N_ERROR 

Definition at line 42 of file node.c.

Function Documentation

◆ fill_gso_buffer_flags()

static_always_inline void fill_gso_buffer_flags ( vlib_buffer_t b0,
virtio_net_hdr_v1_t *  hdr,
u8  l4_proto,
u8  l4_hdr_sz 
)

Definition at line 324 of file node.c.

+ Here is the caller graph for this function:

◆ format_virtio_input_trace()

static u8* format_virtio_input_trace ( u8 s,
va_list *  args 
)
static

Definition at line 66 of file node.c.

+ Here is the call graph for this function:

◆ virtio_device_input_gso_inline()

static_always_inline uword virtio_device_input_gso_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
virtio_if_t vif,
virtio_vring_t vring,
virtio_if_type_t  type,
int  gso_enabled,
int  checksum_offload_enabled,
int  packed 
)

Definition at line 383 of file node.c.

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

◆ virtio_device_input_inline()

static_always_inline uword virtio_device_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
virtio_if_t vif,
u16  qid,
virtio_if_type_t  type 
)

Definition at line 569 of file node.c.

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

◆ virtio_get_len()

static_always_inline u16 virtio_get_len ( virtio_vring_t vring,
const int  packed,
const int  hdr_sz,
u16  last,
u16  mask 
)

Definition at line 363 of file node.c.

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

◆ virtio_get_slot_id()

static_always_inline u16 virtio_get_slot_id ( virtio_vring_t vring,
const int  packed,
u16  last,
u16  mask 
)

Definition at line 353 of file node.c.

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

◆ virtio_input_node()

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

Definition at line 636 of file node.c.

+ Here is the call graph for this function:

◆ virtio_n_left_to_process()

static_always_inline u16 virtio_n_left_to_process ( virtio_vring_t vring,
const int  packed 
)

Definition at line 344 of file node.c.

+ Here is the caller graph for this function:

◆ virtio_needs_csum()

static_always_inline void virtio_needs_csum ( vlib_buffer_t b0,
virtio_net_hdr_v1_t *  hdr,
u8 l4_proto,
u8 l4_hdr_sz,
virtio_if_type_t  type 
)

Definition at line 234 of file node.c.

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

◆ virtio_refill_vring_packed()

static_always_inline void virtio_refill_vring_packed ( vlib_main_t vm,
virtio_if_t vif,
virtio_if_type_t  type,
virtio_vring_t vring,
const int  hdr_sz,
u32  node_index 
)

Definition at line 152 of file node.c.

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

◆ virtio_refill_vring_split()

static_always_inline void virtio_refill_vring_split ( vlib_main_t vm,
virtio_if_t vif,
virtio_if_type_t  type,
virtio_vring_t vring,
const int  hdr_sz,
u32  node_index 
)

Definition at line 84 of file node.c.

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

Variable Documentation

◆ virtio_input_error_strings

char* virtio_input_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_virtio_input_error
Definition: node.c:38

Definition at line 50 of file node.c.

◆ virtio_input_node

vlib_node_registration_t virtio_input_node
Initial value:
= {
.name = "virtio-input",
.sibling_of = "device-input",
.format_trace = format_virtio_input_trace,
.state = VLIB_NODE_STATE_INTERRUPT,
.n_errors = VIRTIO_INPUT_N_ERROR,
.error_strings = virtio_input_error_strings,
}
#define VLIB_NODE_FLAG_TRACE_SUPPORTED
Definition: node.h:306
static u8 * format_virtio_input_trace(u8 *s, va_list *args)
Definition: node.c:66
static char * virtio_input_error_strings[]
Definition: node.c:50

(constructor) VLIB_REGISTER_NODE (virtio_input_node)

Definition at line 670 of file node.c.