FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
mpls_lookup.c File Reference
+ Include dependency graph for mpls_lookup.c:

Go to the source code of this file.

Data Structures

struct  mpls_lookup_trace_t
 
struct  mpls_load_balance_trace_t
 

Macros

#define mpls_error(n, s)   s,
 

Functions

static u8format_mpls_lookup_trace (u8 *s, va_list *args)
 
static uword mpls_lookup (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_mpls_load_balance_trace (u8 *s, va_list *args)
 
static uword mpls_load_balance (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tmpls_lookup_init (vlib_main_t *vm)
 

Variables

static vlib_node_registration_t mpls_lookup_node
 Static MPLS VLIB forwarding node. More...
 
u32 mpls_lookup_to_replicate_edge
 The arc/edge from the MPLS lookup node to the MPLS replicate node. More...
 
static char * mpls_error_strings []
 
vlib_node_registration_t mpls_load_balance_node
 (constructor) VLIB_REGISTER_NODE (mpls_load_balance_node) More...
 

Macro Definition Documentation

#define mpls_error (   n,
 
)    s,

Function Documentation

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

Definition at line 492 of file mpls_lookup.c.

+ Here is the call graph for this function:

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

Definition at line 44 of file mpls_lookup.c.

+ Here is the call graph for this function:

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

Definition at line 504 of file mpls_lookup.c.

+ Here is the call graph for this function:

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

Definition at line 61 of file mpls_lookup.c.

+ Here is the call graph for this function:

static clib_error_t* mpls_lookup_init ( vlib_main_t vm)
static

Definition at line 708 of file mpls_lookup.c.

+ Here is the call graph for this function:

Variable Documentation

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++)
vl_api_address_t dst
Definition: vxlan_gbp.api:34
#define mpls_error(n, s)
DROP
Definition: error.def:41
option version
Definition: memclnt.api:17

Definition at line 462 of file mpls_lookup.c.

vlib_node_registration_t mpls_load_balance_node
Initial value:
= {
.function = mpls_load_balance,
.name = "mpls-load-balance",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes =
{
[MPLS_LOOKUP_NEXT_DROP] = "mpls-drop",
},
}
unsigned int u32
Definition: types.h:88
static uword mpls_load_balance(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mpls_lookup.c:504
static u8 * format_mpls_load_balance_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:492

(constructor) VLIB_REGISTER_NODE (mpls_load_balance_node)

Definition at line 691 of file mpls_lookup.c.

static vlib_node_registration_t mpls_lookup_node
static
Initial value:
= {
.function = mpls_lookup,
.name = "mpls-lookup",
.vector_size = sizeof (u32),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.sibling_of = "mpls-load-balance",
.format_buffer = format_mpls_header,
.format_trace = format_mpls_lookup_trace,
.unformat_buffer = unformat_mpls_header,
}
format_function_t format_mpls_header
Definition: mpls.h:70
unsigned int u32
Definition: types.h:88
static uword mpls_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: mpls_lookup.c:61
unformat_function_t unformat_mpls_header
Definition: mpls.h:82
static char * mpls_error_strings[]
Definition: mpls_lookup.c:462
static u8 * format_mpls_lookup_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:44

Static MPLS VLIB forwarding node.

(constructor) VLIB_REGISTER_NODE (mpls_lookup_node)

Definition at line 28 of file mpls_lookup.c.

u32 mpls_lookup_to_replicate_edge

The arc/edge from the MPLS lookup node to the MPLS replicate node.

Definition at line 33 of file mpls_lookup.c.