FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
mpls_output.c File Reference
+ Include dependency graph for mpls_output.c:

Go to the source code of this file.

Data Structures

struct  mpls_output_trace_t
 
struct  mpls_adj_incomplete_trace_t_
 A struct to hold tracing information for the MPLS label imposition node. More...
 

Macros

#define foreach_mpls_output_next   _(DROP, "error-drop")
 
#define mpls_error(n, s)   s,
 
#define foreach_mpls_adj_incomplete_next
 Next index values from the MPLS incomplete adj node. More...
 

Typedefs

typedef struct mpls_adj_incomplete_trace_t_ mpls_adj_incomplete_trace_t
 A struct to hold tracing information for the MPLS label imposition node. More...
 

Enumerations

enum  mpls_output_next_t { MPLS_OUTPUT_N_NEXT }
 
enum  mpls_adj_incomplete_next_t { MPLS_ADJ_INCOMPLETE_N_NEXT }
 

Functions

static u8format_mpls_output_trace (u8 *s, va_list *args)
 
static uword mpls_output_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_midchain)
 
static uword mpls_output (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword mpls_midchain (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword mpls_adj_incomplete (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 Graph node for incomplete MPLS adjacency. More...
 
static u8format_mpls_adj_incomplete_trace (u8 *s, va_list *args)
 

Variables

static char * mpls_error_strings []
 
vlib_node_registration_t mpls_output_node
 (constructor) VLIB_REGISTER_NODE (mpls_output_node) More...
 
vlib_node_registration_t mpls_midchain_node
 (constructor) VLIB_REGISTER_NODE (mpls_midchain_node) More...
 
vlib_node_registration_t mpls_adj_incomplete_node
 (constructor) VLIB_REGISTER_NODE (mpls_adj_incomplete_node) More...
 

Macro Definition Documentation

#define foreach_mpls_adj_incomplete_next
Value:
_(DROP, "error-drop") \
_(IP4, "ip4-arp") \
_(IP6, "ip6-discover-neighbor")
DROP
Definition: error.def:41
Definition: lisp_types.h:37
Definition: lisp_types.h:38

Next index values from the MPLS incomplete adj node.

Definition at line 367 of file mpls_output.c.

#define foreach_mpls_output_next   _(DROP, "error-drop")

Definition at line 29 of file mpls_output.c.

#define mpls_error (   n,
 
)    s,

Typedef Documentation

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

Enumeration Type Documentation

Enumerator
MPLS_ADJ_INCOMPLETE_N_NEXT 

Definition at line 372 of file mpls_output.c.

Enumerator
MPLS_OUTPUT_N_NEXT 

Definition at line 32 of file mpls_output.c.

Function Documentation

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

Definition at line 459 of file mpls_output.c.

+ Here is the call graph for this function:

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

Definition at line 40 of file mpls_output.c.

+ Here is the call graph for this function:

static uword mpls_adj_incomplete ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Graph node for incomplete MPLS 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 397 of file mpls_output.c.

+ Here is the call graph for this function:

static uword mpls_midchain ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Definition at line 345 of file mpls_output.c.

+ Here is the call graph for this function:

static uword mpls_output ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Definition at line 317 of file mpls_output.c.

+ Here is the call graph for this function:

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

Definition at line 54 of file mpls_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t mpls_adj_incomplete_node
Initial value:
= {
.function = mpls_adj_incomplete,
.name = "mpls-adj-incomplete",
.vector_size = sizeof (u32),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.n_next_nodes = MPLS_ADJ_INCOMPLETE_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static u8 * format_mpls_adj_incomplete_trace(u8 *s, va_list *args)
Definition: mpls_output.c:459
unsigned int u32
Definition: types.h:88
static uword mpls_adj_incomplete(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Graph node for incomplete MPLS adjacency.
Definition: mpls_output.c:397
#define foreach_mpls_adj_incomplete_next
Next index values from the MPLS incomplete adj node.
Definition: mpls_output.c:367
static char * mpls_error_strings[]
Definition: mpls_output.c:310

(constructor) VLIB_REGISTER_NODE (mpls_adj_incomplete_node)

Definition at line 475 of file mpls_output.c.

char* mpls_error_strings[]
static
Initial value:
= {
#define mpls_error(n,s)
mpls_error (NONE, "no error")
mpls_error (UNKNOWN_PROTOCOL, "unknown protocol")
mpls_error (UNSUPPORTED_VERSION, "unsupported version")
mpls_error (PKTS_DECAP, "MPLS input packets decapsulated")
mpls_error (PKTS_ENCAP, "MPLS output packets encapsulated")
mpls_error (NO_LABEL, "MPLS no label for fib/dst")
mpls_error (TTL_EXPIRED, "MPLS ttl expired")
mpls_error (S_NOT_SET, "MPLS s-bit not set")
mpls_error (BAD_LABEL, "invalid FIB id in label")
mpls_error (NOT_IP4, "non-ip4 packets dropped")
mpls_error (DISALLOWED_FIB, "disallowed FIB id")
mpls_error (NOT_ENABLED, "MPLS not enabled")
mpls_error (DROP, "MPLS DROP DPO")
mpls_error (PUNT, "MPLS PUNT DPO")
}
for(i=1;i<=collision_buckets;i++)
DROP
Definition: error.def:41
option version
Definition: memclnt.api:17
#define mpls_error(n, s)

Definition at line 310 of file mpls_output.c.

vlib_node_registration_t mpls_midchain_node
Initial value:
= {
.function = mpls_midchain,
.name = "mpls-midchain",
.vector_size = sizeof (u32),
.format_trace = format_mpls_output_trace,
.sibling_of = "mpls-output",
}
static u8 * format_mpls_output_trace(u8 *s, va_list *args)
Definition: mpls_output.c:40
unsigned int u32
Definition: types.h:88
static uword mpls_midchain(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: mpls_output.c:345

(constructor) VLIB_REGISTER_NODE (mpls_midchain_node)

Definition at line 352 of file mpls_output.c.

vlib_node_registration_t mpls_output_node
Initial value:
= {
.function = mpls_output,
.name = "mpls-output",
.vector_size = sizeof (u32),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.n_next_nodes = MPLS_OUTPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_mpls_output_trace,
}
#define foreach_mpls_output_next
Definition: mpls_output.c:29
static u8 * format_mpls_output_trace(u8 *s, va_list *args)
Definition: mpls_output.c:40
unsigned int u32
Definition: types.h:88
static uword mpls_output(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: mpls_output.c:317
static char * mpls_error_strings[]
Definition: mpls_output.c:310

(constructor) VLIB_REGISTER_NODE (mpls_output_node)

Definition at line 324 of file mpls_output.c.