FD.io VPP  v18.07.1-19-g511ce25
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
 

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 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)
 
static uword vnet_interface_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH_CLONE (vnet_interface_output_node)
 
 CLIB_MULTIARCH_SELECT_FN (vnet_interface_output_node)
 
static uword vnet_per_buffer_interface_output (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u32 counter_index (vlib_main_t *vm, vlib_error_t e)
 
static u8format_vnet_error_trace (u8 *s, va_list *va)
 
static void trace_errors_with_buffers (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8validate_error (vlib_main_t *vm, vlib_error_t *e, u32 index)
 
static u8validate_error_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
 
static void do_packet (vlib_main_t *vm, vlib_error_t a)
 
static_always_inline uword process_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)
 
static uword process_drop (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword process_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (drop_buffers, process_drop)
 
 VLIB_NODE_FUNCTION_MULTIARCH (punt_buffers, process_punt)
 
 VLIB_NODE_FUNCTION_MULTIARCH (vnet_per_buffer_interface_output_node, vnet_per_buffer_interface_output)
 
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

static vlib_node_registration_t drop_buffers
 (constructor) VLIB_REGISTER_NODE (drop_buffers) More...
 
static vlib_node_registration_t punt_buffers
 (constructor) VLIB_REGISTER_NODE (punt_buffers) More...
 
static 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...
 

Enumeration Type Documentation

Enumerator
VNET_ERROR_DISPOSITION_DROP 
VNET_ERROR_DISPOSITION_PUNT 
VNET_ERROR_N_DISPOSITION 

Definition at line 688 of file interface_output.c.

Function Documentation

static_always_inline void calc_checksums ( vlib_main_t vm,
vlib_buffer_t b 
)

Definition at line 161 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CLIB_MULTIARCH_SELECT_FN ( vnet_interface_output_node  )

+ Here is the caller graph for this function:

static u32 counter_index ( vlib_main_t vm,
vlib_error_t  e 
)
inlinestatic

Definition at line 557 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_packet ( vlib_main_t vm,
vlib_error_t  a 
)
inlinestatic

Definition at line 696 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 574 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 55 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 1023 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 900 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 1140 of file interface_output.c.

+ Here is the call graph for this function:

static uword process_drop ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 966 of file interface_output.c.

+ Here is the call graph for this function:

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

Definition at line 705 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword process_punt ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 978 of file interface_output.c.

+ Here is the call graph for this function:

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

Definition at line 591 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* validate_error ( vlib_main_t vm,
vlib_error_t e,
u32  index 
)
static

Definition at line 650 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* validate_error_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t f 
)
static

Definition at line 669 of file interface_output.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( drop_buffers  ,
process_drop   
)
VLIB_NODE_FUNCTION_MULTIARCH ( punt_buffers  ,
process_punt   
)
VLIB_NODE_FUNCTION_MULTIARCH_CLONE ( vnet_interface_output_node  )

+ 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:

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

Definition at line 447 of file interface_output.c.

+ Here is the call 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 203 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 95 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 952 of file interface_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword vnet_per_buffer_interface_output ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 468 of file interface_output.c.

+ Here is the call 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 1106 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 1128 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 drop_buffers
static
Initial value:
= {
.function = process_drop,
.name = "error-drop",
.vector_size = sizeof (u32),
.format_trace = format_vnet_error_trace,
.validate_frame = validate_error_frame,
}
static u8 * validate_error_frame(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
unsigned int u32
Definition: types.h:88
static u8 * format_vnet_error_trace(u8 *s, va_list *va)
static uword process_drop(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VLIB_NODE_FLAG_IS_DROP
Definition: node.h:290

(constructor) VLIB_REGISTER_NODE (drop_buffers)

Definition at line 985 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 1069 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 1265 of file interface_output.c.

vlib_node_registration_t punt_buffers
static
Initial value:
= {
.function = process_punt,
.name = "error-punt",
.vector_size = sizeof (u32),
.format_trace = format_vnet_error_trace,
.validate_frame = validate_error_frame,
}
#define VLIB_NODE_FLAG_IS_PUNT
Definition: node.h:291
static u8 * validate_error_frame(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
unsigned int u32
Definition: types.h:88
static u8 * format_vnet_error_trace(u8 *s, va_list *va)
#define VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH
Definition: node.h:286
static uword process_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (punt_buffers)

Definition at line 998 of file interface_output.c.

vlib_node_registration_t vnet_per_buffer_interface_output_node
static
Initial value:
= {
.name = "interface-output",
.vector_size = sizeof (u32),
}
unsigned int u32
Definition: types.h:88
static uword vnet_per_buffer_interface_output(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (vnet_per_buffer_interface_output_node)

Definition at line 1012 of file interface_output.c.