FD.io VPP  v17.01-9-ge7dcee4
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 cpu_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)
 

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...
 

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_always_inline void incr_decap_stats ( vnet_main_t vnm,
u32  cpu_index,
u32  length,
u32  sw_if_index,
u32 last_sw_if_index,
u32 n_packets,
u32 n_bytes 
)

Definition at line 97 of file decap.c.

+ Here is the call graph for this function:

+ Here is the caller 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 141 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 432 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 439 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 85 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 caller graph for this function:

Variable Documentation

char* lisp_gpe_ip4_input_error_strings[]
static
Initial value:
= {
#define lisp_gpe_error(n,s)
lisp_gpe_error (ENCAPSULATED, "good packets encapsulated")
lisp_gpe_error (DECAPSULATED, "good packets decapsulated")
lisp_gpe_error (NO_TUNNEL, "tunnel does not exist")
}
#define lisp_gpe_error(n, s)

Definition at line 445 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:53
static uword lisp_gpe_ip4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:432
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:445
#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 452 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:53
static uword lisp_gpe_ip6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:439
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:445
#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 474 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.