46 (
u32) sizeof (t->
h) );
52 LISP_GPE_INPUT_NEXT_DROP,
53 LISP_GPE_INPUT_NEXT_IP4_INPUT,
54 LISP_GPE_INPUT_NEXT_IP6_INPUT,
55 LISP_GPE_INPUT_NEXT_DROP
66 else if ((lgh->
flags & LISP_GPE_FLAGS_P) == 0)
70 return LISP_GPE_INPUT_NEXT_IP4_INPUT;
72 return LISP_GPE_INPUT_NEXT_IP6_INPUT;
74 return LISP_GPE_INPUT_NEXT_DROP;
77 return LISP_GPE_INPUT_NEXT_DROP;
84 u32 n_left_from, next_index, * from, * to_next;
85 u32 pkts_decapsulated = 0;
93 while (n_left_from > 0)
99 while (n_left_from >= 4 && n_left_to_next >= 2)
103 ip4_udp_lisp_gpe_header_t * iul4_0, * iul4_1;
104 ip6_udp_lisp_gpe_header_t * iul6_0, * iul6_1;
106 u32 next0, next1, error0, error1;
194 next0 = LISP_GPE_INPUT_NEXT_DROP;
195 error0 = LISP_GPE_ERROR_NO_SUCH_TUNNEL;
206 next1 = LISP_GPE_INPUT_NEXT_DROP;
207 error1 = LISP_GPE_ERROR_NO_SUCH_TUNNEL;
232 n_left_to_next, bi0, bi1, next0,
236 while (n_left_from > 0 && n_left_to_next > 0)
241 ip4_udp_lisp_gpe_header_t * iul4_0;
242 ip6_udp_lisp_gpe_header_t * iul6_0;
310 next0 = LISP_GPE_INPUT_NEXT_DROP;
311 error0 = LISP_GPE_ERROR_NO_SUCH_TUNNEL;
327 n_left_to_next, bi0, next0);
333 LISP_GPE_ERROR_DECAPSULATED,
353 #define lisp_gpe_error(n,s) s, 355 #undef lisp_gpe_error 361 .name =
"lisp-gpe-ip4-input",
363 .vector_size =
sizeof (
u32),
370 #define _(s,n) [LISP_GPE_INPUT_NEXT_##s] = n, 382 .name =
"lisp-gpe-ip6-input",
384 .vector_size =
sizeof (
u32),
391 #define _(s,n) [LISP_GPE_INPUT_NEXT_##s] = n, void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
#define foreach_lisp_gpe_ip_input_next
vlib_node_registration_t lisp_gpe_ip4_input_node
(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node)
uword * tunnel_term_sw_if_index_by_vni
static uword lisp_gpe_ip4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
always_inline void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static uword lisp_gpe_ip6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
u8 * format_lisp_gpe_header_with_length(u8 *s, va_list *args)
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
vlib_node_registration_t lisp_gpe_ip6_input_node
(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node)
static char * lisp_gpe_error_strings[]
always_inline void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define CLIB_PREFETCH(addr, size, type)
lisp_gpe_main_t lisp_gpe_main
static uword lisp_gpe_input_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_v4)
#define VLIB_BUFFER_IS_TRACED
static u32 next_proto_to_next_index[LISP_GPE_NEXT_PROTOS]
always_inline void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
static u32 next_protocol_to_next_index(lisp_gpe_header_t *lgh, u8 *next_header)
#define CLIB_CACHE_LINE_BYTES
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u8 * format_lisp_gpe_rx_trace(u8 *s, va_list *args)