FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
nsh_output.c File Reference
+ Include dependency graph for nsh_output.c:

Go to the source code of this file.

Data Structures

struct  nsh_output_trace_t
 
struct  nsh_adj_incomplete_trace_t_
 A struct to hold tracing information for the NSH label imposition node. More...
 

Macros

#define foreach_nsh_output_next
 
#define foreach_nsh_adj_incomplete_next
 Next index values from the NSH incomplete adj node. More...
 

Typedefs

typedef enum nsh_midchain_next_t_ nsh_midchain_next_t
 
typedef struct nsh_adj_incomplete_trace_t_ nsh_adj_incomplete_trace_t
 A struct to hold tracing information for the NSH label imposition node. More...
 

Enumerations

enum  nsh_output_next_t { NSH_OUTPUT_N_NEXT }
 
enum  nsh_midchain_next_t_ { NSH_MIDCHAIN_NEXT_DROP }
 
enum  nsh_adj_incomplete_next_t { NSH_ADJ_INCOMPLETE_N_NEXT }
 

Functions

static u8format_nsh_output_trace (u8 *s, va_list *args)
 
static uword nsh_output_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_midchain)
 
VLIB_NODE_FN() nsh_eth_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() nsh_midchain_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
 VNET_FEATURE_INIT (nsh_interface_output, static)
 
 VNET_FEATURE_ARC_INIT (nsh_eth_output, static)
 
 VNET_FEATURE_INIT (nsh_eth_tx_drop, static)
 
VLIB_NODE_FN() nsh_adj_incomplete_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 Graph node for incomplete NSH adjacency. More...
 
static u8format_nsh_adj_incomplete_trace (u8 *s, va_list *args)
 

Variables

vlib_node_registration_t nsh_eth_output_node
 (constructor) VLIB_REGISTER_NODE (nsh_eth_output_node) More...
 
vlib_node_registration_t nsh_midchain_node
 (constructor) VLIB_REGISTER_NODE (nsh_midchain_node) More...
 
vlib_node_registration_t nsh_adj_incomplete_node
 (constructor) VLIB_REGISTER_NODE (nsh_adj_incomplete_node) More...
 

Macro Definition Documentation

◆ foreach_nsh_adj_incomplete_next

#define foreach_nsh_adj_incomplete_next
Value:
_(DROP, "error-drop") \
_(IP4, "ip4-arp") \
_(IP6, "ip6-discover-neighbor")
Definition: acl.h:67
Definition: acl.h:67
DROP
Definition: error.def:41

Next index values from the NSH incomplete adj node.

Definition at line 387 of file nsh_output.c.

◆ foreach_nsh_output_next

#define foreach_nsh_output_next
Value:
_(DROP, "error-drop") \
_(INTERFACE, "interface-output" )
DROP
Definition: error.def:41

Definition at line 32 of file nsh_output.c.

Typedef Documentation

◆ nsh_adj_incomplete_trace_t

A struct to hold tracing information for the NSH label imposition node.

◆ nsh_midchain_next_t

Enumeration Type Documentation

◆ nsh_adj_incomplete_next_t

Enumerator
NSH_ADJ_INCOMPLETE_N_NEXT 

Definition at line 392 of file nsh_output.c.

◆ nsh_midchain_next_t_

Enumerator
NSH_MIDCHAIN_NEXT_DROP 

Definition at line 319 of file nsh_output.c.

◆ nsh_output_next_t

Enumerator
NSH_OUTPUT_N_NEXT 

Definition at line 36 of file nsh_output.c.

Function Documentation

◆ format_nsh_adj_incomplete_trace()

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

Definition at line 478 of file nsh_output.c.

+ Here is the call graph for this function:

◆ format_nsh_output_trace()

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

Definition at line 44 of file nsh_output.c.

+ Here is the call graph for this function:

◆ nsh_adj_incomplete_node()

VLIB_NODE_FN() nsh_adj_incomplete_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Graph node for incomplete NSH adjacency.

This node will push traffic to either the v4-arp or v6-nd node based on the next-hop proto of the adj. We pay a cost for this 'routing' node, but an incomplete adj is the exception case.

Definition at line 416 of file nsh_output.c.

+ Here is the call graph for this function:

◆ nsh_eth_output_node()

VLIB_NODE_FN() nsh_eth_output_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 324 of file nsh_output.c.

+ Here is the call graph for this function:

◆ nsh_midchain_node()

VLIB_NODE_FN() nsh_midchain_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 345 of file nsh_output.c.

+ Here is the call graph for this function:

◆ nsh_output_inline()

static uword nsh_output_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_midchain 
)
inlinestatic

Definition at line 63 of file nsh_output.c.

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

◆ VNET_FEATURE_ARC_INIT()

VNET_FEATURE_ARC_INIT ( nsh_eth_output  ,
static   
)

◆ VNET_FEATURE_INIT() [1/2]

VNET_FEATURE_INIT ( nsh_interface_output  ,
static   
)

◆ VNET_FEATURE_INIT() [2/2]

VNET_FEATURE_INIT ( nsh_eth_tx_drop  ,
static   
)

Variable Documentation

◆ nsh_adj_incomplete_node

vlib_node_registration_t nsh_adj_incomplete_node
Initial value:
= {
.name = "nsh-adj-incomplete",
.vector_size = sizeof (u32),
.n_next_nodes = NSH_ADJ_INCOMPLETE_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_nsh_adj_incomplete_trace(u8 *s, va_list *args)
Definition: nsh_output.c:478
#define foreach_nsh_adj_incomplete_next
Next index values from the NSH incomplete adj node.
Definition: nsh_output.c:387

(constructor) VLIB_REGISTER_NODE (nsh_adj_incomplete_node)

Definition at line 494 of file nsh_output.c.

◆ nsh_eth_output_node

vlib_node_registration_t nsh_eth_output_node
Initial value:
= {
.name = "nsh-eth-output",
.vector_size = sizeof (u32),
.n_next_nodes = NSH_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_nsh_output_trace,
}
unsigned int u32
Definition: types.h:88
static u8 * format_nsh_output_trace(u8 *s, va_list *args)
Definition: nsh_output.c:44
#define foreach_nsh_output_next
Definition: nsh_output.c:32

(constructor) VLIB_REGISTER_NODE (nsh_eth_output_node)

Definition at line 331 of file nsh_output.c.

◆ nsh_midchain_node

vlib_node_registration_t nsh_midchain_node
Initial value:
= {
.name = "nsh-midchain",
.vector_size = sizeof (u32),
.format_trace = format_nsh_output_trace,
.n_next_nodes = 1,
.next_nodes = {
[NSH_MIDCHAIN_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_nsh_output_trace(u8 *s, va_list *args)
Definition: nsh_output.c:44

(constructor) VLIB_REGISTER_NODE (nsh_midchain_node)

Definition at line 352 of file nsh_output.c.