FD.io VPP  v19.08-24-ge6a5712
Vector Packet Processing
interface_output.c File Reference
+ Include dependency graph for interface_output.c:

Go to the source code of this file.

Data Structures

struct  interface_output_trace_t
 
struct  vnet_error_trace_t_
 

Typedefs

typedef struct vnet_error_trace_t_ vnet_error_trace_t
 

Enumerations

enum  vnet_error_disposition_t { VNET_ERROR_DISPOSITION_DROP, VNET_ERROR_DISPOSITION_PUNT, VNET_ERROR_N_DISPOSITION }
 

Functions

u8format_vnet_interface_output_trace (u8 *s, va_list *va)
 
static void vnet_interface_output_trace (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, uword n_buffers)
 
static_always_inline void calc_checksums (vlib_main_t *vm, vlib_buffer_t *b)
 
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)
 
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)
 
static_always_inline void tso_fixup_segmented_buf (vlib_buffer_t *b0, u8 tcp_flags, int is_ip6)
 
static_always_inline u32 tso_segment_buffer (vlib_main_t *vm, vnet_interface_per_thread_data_t *ptd, int do_tx_offloads, u32 sbi0, vlib_buffer_t *sb0, u32 n_bytes_b0)
 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 drop_error_code)
 
static_always_inline uword vnet_interface_output_node_inline_gso (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vnet_main_t *vnm, vnet_hw_interface_t *hi, int do_tx_offloads, int do_segmentation)
 
static_always_inline void vnet_interface_pcap_tx_trace (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int sw_if_index_from_buffer)
 
static_always_inline uword vnet_interface_output_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 do_tx_offloads)
 
uword vnet_interface_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() vnet_per_buffer_interface_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_vnet_error_trace (u8 *s, va_list *va)
 
static void interface_trace_buffers (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static_always_inline uword interface_drop_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vnet_error_disposition_t disposition)
 
static void pcap_drop_trace (vlib_main_t *vm, vnet_interface_main_t *im, vlib_frame_t *f)
 
void vnet_pcap_drop_trace_filter_add_del (u32 error_index, int is_add)
 
VLIB_NODE_FN() interface_drop (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() interface_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword interface_tx_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
 VNET_FEATURE_ARC_INIT (interface_output, static)
 
 VNET_FEATURE_INIT (span_tx, static)
 
 VNET_FEATURE_INIT (ipsec_if_tx, static)
 
 VNET_FEATURE_INIT (interface_tx, static)
 
clib_error_tvnet_per_buffer_interface_output_hw_interface_add_del (vnet_main_t *vnm, u32 hw_if_index, u32 is_create)
 
 VNET_HW_INTERFACE_ADD_DEL_FUNCTION (vnet_per_buffer_interface_output_hw_interface_add_del)
 
void vnet_set_interface_output_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 Set interface output node - for interface registered without its output/tx nodes created because its VNET_DEVICE_CLASS did not specify any tx_function. More...
 
static clib_error_tpcap_drop_trace_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

vlib_node_registration_t interface_drop
 (constructor) VLIB_REGISTER_NODE (interface_drop) More...
 
vlib_node_registration_t interface_punt
 (constructor) VLIB_REGISTER_NODE (interface_punt) More...
 
vlib_node_registration_t vnet_per_buffer_interface_output_node
 (constructor) VLIB_REGISTER_NODE (vnet_per_buffer_interface_output_node) More...
 
static vlib_node_registration_t interface_tx
 (constructor) VLIB_REGISTER_NODE (interface_tx) More...
 
static vlib_cli_command_t pcap_trace_command
 (constructor) VLIB_CLI_COMMAND (pcap_trace_command) More...
 

Typedef Documentation

Enumeration Type Documentation

Enumerator
VNET_ERROR_DISPOSITION_DROP 
VNET_ERROR_DISPOSITION_PUNT 
VNET_ERROR_N_DISPOSITION 

Definition at line 1057 of file interface_output.c.

Function Documentation

static_always_inline void calc_checksums ( vlib_main_t vm,
vlib_buffer_t b 
)

Definition at line 180 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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  drop_error_code 
)

Definition at line 448 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_vnet_error_trace ( u8 s,
va_list *  va 
)
static

Definition at line 986 of file interface_output.c.

+ Here is the call graph for this function:

u8* format_vnet_interface_output_trace ( u8 s,
va_list *  va 
)

Definition at line 59 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1224 of file interface_output.c.

+ Here is the call graph for this function:

static_always_inline uword interface_drop_punt ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vnet_error_disposition_t  disposition 
)

Definition at line 1065 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1236 of file interface_output.c.

+ Here is the call graph for this function:

static void interface_trace_buffers ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 999 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword interface_tx_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 1275 of file interface_output.c.

+ Here is the call graph for this function:

static void pcap_drop_trace ( vlib_main_t vm,
vnet_interface_main_t im,
vlib_frame_t f 
)
inlinestatic

Definition at line 1157 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* pcap_drop_trace_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1395 of file interface_output.c.

+ Here is the call graph for this function:

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 
)

Definition at line 233 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void tso_fixup_segmented_buf ( vlib_buffer_t b0,
u8  tcp_flags,
int  is_ip6 
)

Definition at line 290 of file interface_output.c.

+ Here is the caller graph for this function:

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 
)

Definition at line 271 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 258 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u32 tso_segment_buffer ( vlib_main_t vm,
vnet_interface_per_thread_data_t ptd,
int  do_tx_offloads,
u32  sbi0,
vlib_buffer_t sb0,
u32  n_bytes_b0 
)

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 320 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_FEATURE_ARC_INIT ( interface_output  ,
static   
)
VNET_FEATURE_INIT ( span_tx  ,
static   
)
VNET_FEATURE_INIT ( ipsec_if_tx  ,
static   
)
VNET_FEATURE_INIT ( interface_tx  ,
static   
)
VNET_HW_INTERFACE_ADD_DEL_FUNCTION ( vnet_per_buffer_interface_output_hw_interface_add_del  )

+ Here is the caller graph for this function:

uword vnet_interface_output_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 866 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline uword vnet_interface_output_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  do_tx_offloads 
)

Definition at line 839 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline uword vnet_interface_output_node_inline_gso ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vnet_main_t vnm,
vnet_hw_interface_t hi,
int  do_tx_offloads,
int  do_segmentation 
)

Definition at line 469 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vnet_interface_output_trace ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
uword  n_buffers 
)
static

Definition at line 105 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void vnet_interface_pcap_tx_trace ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  sw_if_index_from_buffer 
)

Definition at line 800 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_pcap_drop_trace_filter_add_del ( u32  error_index,
int  is_add 
)

Definition at line 1210 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_per_buffer_interface_output_hw_interface_add_del ( vnet_main_t vnm,
u32  hw_if_index,
u32  is_create 
)

Definition at line 1360 of file interface_output.c.

+ Here is the call graph for this function:

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

Definition at line 887 of file interface_output.c.

+ Here is the call graph for this function:

void vnet_set_interface_output_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)

Set interface output node - for interface registered without its output/tx nodes created because its VNET_DEVICE_CLASS did not specify any tx_function.

This is typically the case for tunnel interfaces.

Definition at line 1382 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t interface_drop
Initial value:
= {
.name = "error-drop",
.vector_size = sizeof (u32),
.format_trace = format_vnet_error_trace,
.n_next_nodes = 1,
.next_nodes = {
[0] = "drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_vnet_error_trace(u8 *s, va_list *va)

(constructor) VLIB_REGISTER_NODE (interface_drop)

Definition at line 1244 of file interface_output.c.

vlib_node_registration_t interface_punt
Initial value:
= {
.name = "error-punt",
.vector_size = sizeof (u32),
.format_trace = format_vnet_error_trace,
.n_next_nodes = 1,
.next_nodes = {
[0] = "punt",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_vnet_error_trace(u8 *s, va_list *va)

(constructor) VLIB_REGISTER_NODE (interface_punt)

Definition at line 1256 of file interface_output.c.

vlib_node_registration_t interface_tx
static
Initial value:
= {
.function = interface_tx_node_fn,
.name = "interface-tx",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
static uword interface_tx_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)

(constructor) VLIB_REGISTER_NODE (interface_tx)

Definition at line 1321 of file interface_output.c.

vlib_cli_command_t pcap_trace_command
static
Initial value:
= {
.path = "pcap drop trace",
.short_help =
"pcap drop trace on off max <nn> intfc <intfc> file <name> status",
}
static clib_error_t * pcap_drop_trace_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (pcap_trace_command)

Definition at line 1520 of file interface_output.c.

vlib_node_registration_t vnet_per_buffer_interface_output_node
Initial value:
= {
.name = "interface-output",
.vector_size = sizeof (u32),
}
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (vnet_per_buffer_interface_output_node)

Definition at line 1268 of file interface_output.c.