|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
27 #define foreach_l2t_decap_error \
28 _(USER_TO_NETWORK, "L2TP user (ip6) to L2 network pkts") \
29 _(SESSION_ID_MISMATCH, "l2tpv3 local session id mismatches") \
30 _(COOKIE_MISMATCH, "l2tpv3 local cookie mismatches") \
31 _(NO_SESSION, "l2tpv3 session not found") \
32 _(ADMIN_DOWN, "l2tpv3 tunnel is down")
35 #define _(sym,string) string,
42 #define _(sym,str) L2T_DECAP_ERROR_##sym,
93 l2t = (l2tpv3_header_t *) (
ip6 + 1);
107 session_index = p[0];
125 l2tpv3_header_t *l2tp;
139 em->
counters[node_counter_base_index + L2T_DECAP_ERROR_USER_TO_NETWORK] +=
162 em->
counters[node_counter_base_index +
163 L2T_DECAP_ERROR_SESSION_ID_MISMATCH] += 1;
173 b->
error =
node->errors[L2T_DECAP_ERROR_COOKIE_MISMATCH];
183 b->
error =
node->errors[L2T_DECAP_ERROR_ADMIN_DOWN];
211 if (l2tp_decap_local)
213 b->
error =
node->errors[L2T_DECAP_ERROR_NO_SESSION];
254 .name =
"l2tp-decap",
255 .vector_size =
sizeof (
u32),
277 .name =
"l2tp-decap-local",
278 .vector_size =
sizeof (
u32),
vlib_node_function_t l2t_decap_node_fn
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
nat44_ei_hairpin_src_next_t next_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 * format_l2t_trace(u8 *s, va_list *args)
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
static void stage1(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b)
static u32 last_stage(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b)
vlib_error_main_t error_main
uword * session_by_dst_address
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ L2T_DECAP_NEXT_NO_INTERCEPT
static u32 counter_index(vlib_main_t *vm, vlib_error_t e)
uword() vlib_node_function_t(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, struct vlib_frame_t *frame)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static u32 session_index_to_counter_index(u32 session_index, u32 counter_id)
#define CLIB_PREFETCH(addr, size, type)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
uword * session_by_session_id
static_always_inline uword vlib_get_thread_index(void)
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
ip6_to_l2_lookup_t lookup_type
ip6_address_t client_address
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
@ L2T_DECAP_NEXT_L2_INPUT
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
static char * l2t_decap_error_strings[]
uword * session_by_src_address
#define hash_get_mem(h, key)
ip6_address_t our_address
@ SESSION_COUNTER_USER_TO_NETWORK
static void stage0(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b)
vlib_node_registration_t l2t_decap_node
(constructor) VLIB_REGISTER_NODE (l2t_decap_node)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define foreach_l2t_decap_error
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
vlib_node_registration_t l2t_decap_local_node
(constructor) VLIB_REGISTER_NODE (l2t_decap_local_node)
vlib_combined_counter_main_t counter_main
vl_api_fib_path_type_t type
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)