FD.io VPP  v17.07.01-10-g3be13f0
Vector Packet Processing
decap.c File Reference

L2 LISP-GPE decap code. More...

+ Include dependency graph for decap.c:

Go to the source code of this file.

Data Structures

struct  lisp_gpe_rx_trace_t
 

Macros

#define lisp_gpe_error(n, s)   s,
 

Functions

static u8format_lisp_gpe_rx_trace (u8 *s, va_list *args)
 
static u32 next_protocol_to_next_index (lisp_gpe_header_t *lgh, u8 *next_header)
 
static tunnel_lookup_tnext_index_to_iface (lisp_gpe_main_t *lgm, u32 next_index)
 
static_always_inline void incr_decap_stats (vnet_main_t *vnm, u32 thread_index, u32 length, u32 sw_if_index, u32 *last_sw_if_index, u32 *n_packets, u32 *n_bytes)
 
static uword lisp_gpe_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_v4)
 LISP-GPE decap dispatcher. More...
 
static uword lisp_gpe_ip4_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword lisp_gpe_ip6_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static void gpe_add_arc_from_input_to_nsh ()
 Adds arc from lisp-gpe-input to nsh-input if nsh-input is available. More...
 
clib_error_tgpe_decap_init (vlib_main_t *vm)
 GPE decap init function. More...
 
static uword lisp_gpe_nsh_dummy_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static clib_error_tlisp_add_dummy_nsh_node_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static u32 next_proto_to_next_index [LISP_GPE_NEXT_PROTOS]
 
static char * lisp_gpe_ip4_input_error_strings []
 
vlib_node_registration_t lisp_gpe_ip4_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node) More...
 
vlib_node_registration_t lisp_gpe_ip6_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node) More...
 
static char * lisp_gpe_nsh_dummy_error_strings []
 
vlib_node_registration_t lisp_gpe_nsh_dummy_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_nsh_dummy_input_node) More...
 
static vlib_cli_command_t lisp_add_dummy_nsh_node_command
 (constructor) VLIB_CLI_COMMAND (lisp_add_dummy_nsh_node_command) More...
 

Detailed Description

L2 LISP-GPE decap code.

Definition in file decap.c.

Macro Definition Documentation

#define lisp_gpe_error (   n,
 
)    s,

Function Documentation

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

Definition at line 33 of file decap.c.

+ Here is the call graph for this function:

static void gpe_add_arc_from_input_to_nsh ( )
static

Adds arc from lisp-gpe-input to nsh-input if nsh-input is available.

Definition at line 508 of file decap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* gpe_decap_init ( vlib_main_t vm)

GPE decap init function.

Definition at line 537 of file decap.c.

+ Here is the call graph for this function:

static_always_inline void incr_decap_stats ( vnet_main_t vnm,
u32  thread_index,
u32  length,
u32  sw_if_index,
u32 last_sw_if_index,
u32 n_packets,
u32 n_bytes 
)

Definition at line 106 of file decap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 578 of file decap.c.

+ Here is the call graph for this function:

static uword lisp_gpe_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  is_v4 
)
static

LISP-GPE decap dispatcher.

Node Identifier:
lisp_gpe_input_inline

LISP-GPE decap dispatcher.

Decaps IP-UDP-LISP-GPE header and based on the next protocol and in the GPE header and the vni decides the next node to forward the packet to.

Parameters
[in]vmvlib_main_t corresponding to current thread.
[in]nodevlib_node_runtime_t data for this node.
[in]framevlib_frame_t whose contents should be dispatched.
Returns
number of vectors in frame.

Definition at line 150 of file decap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 441 of file decap.c.

+ Here is the call graph for this function:

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

Definition at line 448 of file decap.c.

+ Here is the call graph for this function:

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

Definition at line 549 of file decap.c.

+ Here is the call graph for this function:

static tunnel_lookup_t* next_index_to_iface ( lisp_gpe_main_t lgm,
u32  next_index 
)
inlinestatic

Definition at line 92 of file decap.c.

+ Here is the caller graph for this function:

static u32 next_protocol_to_next_index ( lisp_gpe_header_t lgh,
u8 next_header 
)
inlinestatic

Definition at line 63 of file decap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t lisp_add_dummy_nsh_node_command
static
Initial value:
= {
.path = "test one nsh add-dummy-decap-node",
}
static clib_error_t * lisp_add_dummy_nsh_node_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: decap.c:578

(constructor) VLIB_CLI_COMMAND (lisp_add_dummy_nsh_node_command)

Definition at line 591 of file decap.c.

char* lisp_gpe_ip4_input_error_strings[]
static
Initial value:
= {
#define lisp_gpe_error(n,s)
}

Definition at line 454 of file decap.c.

vlib_node_registration_t lisp_gpe_ip4_input_node
Initial value:
= {
.function = lisp_gpe_ip4_input,
.name = "lisp-gpe-ip4-input",
.vector_size = sizeof (u32),
.n_next_nodes = LISP_GPE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_lisp_gpe_rx_trace,
}
#define foreach_lisp_gpe_ip_input_next
Definition: lisp_gpe.h:55
static uword lisp_gpe_ip4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:441
u8 * format_lisp_gpe_header_with_length(u8 *s, va_list *args)
Definition: interface.c:171
static char * lisp_gpe_ip4_input_error_strings[]
Definition: decap.c:454
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static u8 * format_lisp_gpe_rx_trace(u8 *s, va_list *args)
Definition: decap.c:33

(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node)

Definition at line 461 of file decap.c.

vlib_node_registration_t lisp_gpe_ip6_input_node
Initial value:
= {
.function = lisp_gpe_ip6_input,
.name = "lisp-gpe-ip6-input",
.vector_size = sizeof (u32),
.n_next_nodes = LISP_GPE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_lisp_gpe_rx_trace,
}
#define foreach_lisp_gpe_ip_input_next
Definition: lisp_gpe.h:55
static uword lisp_gpe_ip6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:448
u8 * format_lisp_gpe_header_with_length(u8 *s, va_list *args)
Definition: interface.c:171
static char * lisp_gpe_ip4_input_error_strings[]
Definition: decap.c:454
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static u8 * format_lisp_gpe_rx_trace(u8 *s, va_list *args)
Definition: decap.c:33

(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node)

Definition at line 483 of file decap.c.

char* lisp_gpe_nsh_dummy_error_strings[]
static
Initial value:
= {
"lisp gpe dummy nsh decap",
}

Definition at line 556 of file decap.c.

vlib_node_registration_t lisp_gpe_nsh_dummy_input_node
Initial value:
= {
.name = "lisp-gpe-nsh-dummy-input",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.n_errors = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static uword lisp_gpe_nsh_dummy_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:549
static char * lisp_gpe_nsh_dummy_error_strings[]
Definition: decap.c:556
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (lisp_gpe_nsh_dummy_input_node)

Definition at line 561 of file decap.c.

u32 next_proto_to_next_index[LISP_GPE_NEXT_PROTOS]
static
Initial value:
= {
LISP_GPE_INPUT_NEXT_DROP,
LISP_GPE_INPUT_NEXT_IP4_INPUT,
LISP_GPE_INPUT_NEXT_IP6_INPUT,
LISP_GPE_INPUT_NEXT_L2_INPUT,
LISP_GPE_INPUT_NEXT_DROP
}

Definition at line 54 of file decap.c.