FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  gso_trace_t
 

Functions

static u8format_gso_trace (u8 *s, va_list *args)
 
static_always_inline u16 tso_segment_ipip_tunnel_fixup (vlib_main_t *vm, vnet_interface_per_thread_data_t *ptd, vlib_buffer_t *sb0, generic_header_offset_t *gho)
 
static_always_inline void tso_segment_vxlan_tunnel_headers_fixup (vlib_main_t *vm, vlib_buffer_t *b, generic_header_offset_t *gho)
 
static_always_inline u16 tso_segment_vxlan_tunnel_fixup (vlib_main_t *vm, vnet_interface_per_thread_data_t *ptd, vlib_buffer_t *sb0, generic_header_offset_t *gho)
 
static_always_inline u16 tso_alloc_tx_bufs (vlib_main_t *vm, vnet_interface_per_thread_data_t *ptd, vlib_buffer_t *b0, u32 n_bytes_b0, u16 l234_sz, u16 gso_size, u16 first_data_size, generic_header_offset_t *gho)
 
static_always_inline void tso_init_buf_from_template_base (vlib_buffer_t *nb0, vlib_buffer_t *b0, u32 flags, u16 length)
 
static_always_inline void tso_init_buf_from_template (vlib_main_t *vm, vlib_buffer_t *nb0, vlib_buffer_t *b0, u16 template_data_sz, u16 gso_size, u8 **p_dst_ptr, u16 *p_dst_left, u32 next_tcp_seq, u32 flags, generic_header_offset_t *gho)
 
static_always_inline void tso_fixup_segmented_buf (vlib_main_t *vm, vlib_buffer_t *b0, u8 tcp_flags, int is_l2, int is_ip6, generic_header_offset_t *gho)
 
static_always_inline u32 tso_segment_buffer (vlib_main_t *vm, vnet_interface_per_thread_data_t *ptd, u32 sbi0, vlib_buffer_t *sb0, generic_header_offset_t *gho, u32 n_bytes_b0, int is_l2, int is_ip6)
 Allocate the necessary number of ptd->split_buffers, and segment the possibly chained buffer(s) from b0 into there. More...
 
static_always_inline void drop_one_buffer_and_count (vlib_main_t *vm, vnet_main_t *vnm, vlib_node_runtime_t *node, u32 *pbi0, u32 sw_if_index, u32 drop_error_code)
 
static_always_inline uword vnet_gso_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vnet_main_t *vnm, vnet_hw_interface_t *hi, int is_l2, int is_ip4, int is_ip6, int do_segmentation)
 
static_always_inline uword vnet_gso_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_l2, int is_ip4, int is_ip6)
 
VLIB_NODE_FN() gso_l2_ip4_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gso_l2_ip6_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gso_ip4_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gso_ip6_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (gso_l2_ip4_node, static)
 
 VNET_FEATURE_INIT (gso_l2_ip6_node, static)
 
 VNET_FEATURE_INIT (gso_ip4_node, static)
 
 VNET_FEATURE_INIT (gso_ip6_node, static)
 

Variables

vlib_node_registration_t gso_l2_ip4_node
 (constructor) VLIB_REGISTER_NODE (gso_l2_ip4_node) More...
 
vlib_node_registration_t gso_l2_ip6_node
 (constructor) VLIB_REGISTER_NODE (gso_l2_ip6_node) More...
 
vlib_node_registration_t gso_ip4_node
 (constructor) VLIB_REGISTER_NODE (gso_ip4_node) More...
 
vlib_node_registration_t gso_ip6_node
 (constructor) VLIB_REGISTER_NODE (gso_ip6_node) More...
 

Function Documentation

◆ drop_one_buffer_and_count()

static_always_inline void drop_one_buffer_and_count ( vlib_main_t vm,
vnet_main_t vnm,
vlib_node_runtime_t node,
u32 pbi0,
u32  sw_if_index,
u32  drop_error_code 
)

Definition at line 447 of file node.c.

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

◆ format_gso_trace()

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

Definition at line 37 of file node.c.

+ Here is the call graph for this function:

◆ gso_ip4_node()

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

Definition at line 802 of file node.c.

+ Here is the call graph for this function:

◆ gso_ip6_node()

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

Definition at line 809 of file node.c.

+ Here is the call graph for this function:

◆ gso_l2_ip4_node()

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

Definition at line 788 of file node.c.

+ Here is the call graph for this function:

◆ gso_l2_ip6_node()

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

Definition at line 795 of file node.c.

+ Here is the call graph for this function:

◆ tso_alloc_tx_bufs()

static_always_inline u16 tso_alloc_tx_bufs ( vlib_main_t vm,
vnet_interface_per_thread_data_t ptd,
vlib_buffer_t b0,
u32  n_bytes_b0,
u16  l234_sz,
u16  gso_size,
u16  first_data_size,
generic_header_offset_t gho 
)

Definition at line 175 of file node.c.

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

◆ tso_fixup_segmented_buf()

static_always_inline void tso_fixup_segmented_buf ( vlib_main_t vm,
vlib_buffer_t b0,
u8  tcp_flags,
int  is_l2,
int  is_ip6,
generic_header_offset_t gho 
)

Definition at line 263 of file node.c.

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

◆ tso_init_buf_from_template()

static_always_inline void tso_init_buf_from_template ( vlib_main_t vm,
vlib_buffer_t nb0,
vlib_buffer_t b0,
u16  template_data_sz,
u16  gso_size,
u8 **  p_dst_ptr,
u16 p_dst_left,
u32  next_tcp_seq,
u32  flags,
generic_header_offset_t gho 
)

Definition at line 243 of file node.c.

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

◆ tso_init_buf_from_template_base()

static_always_inline void tso_init_buf_from_template_base ( vlib_buffer_t nb0,
vlib_buffer_t b0,
u32  flags,
u16  length 
)

Definition at line 221 of file node.c.

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

◆ tso_segment_buffer()

static_always_inline u32 tso_segment_buffer ( vlib_main_t vm,
vnet_interface_per_thread_data_t ptd,
u32  sbi0,
vlib_buffer_t sb0,
generic_header_offset_t gho,
u32  n_bytes_b0,
int  is_l2,
int  is_ip6 
)

Allocate the necessary number of ptd->split_buffers, and segment the possibly chained buffer(s) from b0 into there.

Return the cumulative number of bytes sent or zero if allocation failed.

Definition at line 327 of file node.c.

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

◆ tso_segment_ipip_tunnel_fixup()

static_always_inline u16 tso_segment_ipip_tunnel_fixup ( vlib_main_t vm,
vnet_interface_per_thread_data_t ptd,
vlib_buffer_t sb0,
generic_header_offset_t gho 
)

Definition at line 60 of file node.c.

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

◆ tso_segment_vxlan_tunnel_fixup()

static_always_inline u16 tso_segment_vxlan_tunnel_fixup ( vlib_main_t vm,
vnet_interface_per_thread_data_t ptd,
vlib_buffer_t sb0,
generic_header_offset_t gho 
)

Definition at line 152 of file node.c.

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

◆ tso_segment_vxlan_tunnel_headers_fixup()

static_always_inline void tso_segment_vxlan_tunnel_headers_fixup ( vlib_main_t vm,
vlib_buffer_t b,
generic_header_offset_t gho 
)

Definition at line 104 of file node.c.

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

◆ VNET_FEATURE_INIT() [1/4]

VNET_FEATURE_INIT ( gso_l2_ip4_node  ,
static   
)

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( gso_l2_ip6_node  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( gso_ip4_node  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( gso_ip6_node  ,
static   
)

◆ vnet_gso_inline()

static_always_inline uword vnet_gso_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_l2,
int  is_ip4,
int  is_ip6 
)

Definition at line 762 of file node.c.

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

◆ vnet_gso_node_inline()

static_always_inline uword vnet_gso_node_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vnet_main_t vnm,
vnet_hw_interface_t hi,
int  is_l2,
int  is_ip4,
int  is_ip6,
int  do_segmentation 
)

Definition at line 467 of file node.c.

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

Variable Documentation

◆ gso_ip4_node

Initial value:
= {
.vector_size = sizeof (u32),
.format_trace = format_gso_trace,
.n_errors = 0,
.n_next_nodes = 0,
.name = "gso-ip4",
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_gso_trace(u8 *s, va_list *args)
Definition: node.c:37
string name[64]
Definition: ip.api:44

(constructor) VLIB_REGISTER_NODE (gso_ip4_node)

Definition at line 836 of file node.c.

◆ gso_ip6_node

Initial value:
= {
.vector_size = sizeof (u32),
.format_trace = format_gso_trace,
.n_errors = 0,
.n_next_nodes = 0,
.name = "gso-ip6",
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_gso_trace(u8 *s, va_list *args)
Definition: node.c:37
string name[64]
Definition: ip.api:44

(constructor) VLIB_REGISTER_NODE (gso_ip6_node)

Definition at line 845 of file node.c.

◆ gso_l2_ip4_node

vlib_node_registration_t gso_l2_ip4_node
Initial value:
= {
.vector_size = sizeof (u32),
.format_trace = format_gso_trace,
.n_errors = 0,
.n_next_nodes = 0,
.name = "gso-l2-ip4",
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_gso_trace(u8 *s, va_list *args)
Definition: node.c:37
string name[64]
Definition: ip.api:44

(constructor) VLIB_REGISTER_NODE (gso_l2_ip4_node)

Definition at line 818 of file node.c.

◆ gso_l2_ip6_node

vlib_node_registration_t gso_l2_ip6_node
Initial value:
= {
.vector_size = sizeof (u32),
.format_trace = format_gso_trace,
.n_errors = 0,
.n_next_nodes = 0,
.name = "gso-l2-ip6",
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_gso_trace(u8 *s, va_list *args)
Definition: node.c:37
string name[64]
Definition: ip.api:44

(constructor) VLIB_REGISTER_NODE (gso_l2_ip6_node)

Definition at line 827 of file node.c.