|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
25 #define foreach_ipip_input_next \
26 _ (PUNT, "error-punt") \
27 _ (DROP, "error-drop") \
28 _ (IP4_INPUT, "ip4-input") \
29 _ (IP6_INPUT, "ip6-input") \
30 _ (MPLS_INPUT, "mpls-input")
34 #define _(s, n) IPIP_INPUT_NEXT_##s,
68 u32 tunnel_sw_if_index = ~0;
86 u32 next0 = IPIP_INPUT_NEXT_DROP;
89 bi0 = to_next[0] =
from[0];
97 ipip_tunnel_key_t key0 = {
106 if (ip60->
protocol == IP_PROTOCOL_IPV6_FRAGMENTATION)
108 next0 = IPIP_INPUT_NEXT_DROP;
109 b0->
error =
node->errors[IPIP_ERROR_FRAGMENTED_PACKET];
126 next0 = IPIP_INPUT_NEXT_DROP;
127 b0->
error =
node->errors[IPIP_ERROR_FRAGMENTED_PACKET];
149 next0 = IPIP_INPUT_NEXT_DROP;
150 b0->
error =
node->errors[IPIP_ERROR_NO_TUNNEL];
159 if (inner_protocol0 == IP_PROTOCOL_IPV6)
161 next0 = IPIP_INPUT_NEXT_IP6_INPUT;
169 else if (inner_protocol0 == IP_PROTOCOL_IP_IN_IP)
171 next0 = IPIP_INPUT_NEXT_IP4_INPUT;
179 else if (inner_protocol0 == IP_PROTOCOL_MPLS_IN_IP)
181 next0 = IPIP_INPUT_NEXT_MPLS_INPUT;
198 next0 = IPIP_INPUT_NEXT_DROP;
199 b0->
error =
node->errors[IPIP_ERROR_NO_TUNNEL];
233 n_left_to_next, bi0, next0);
258 #define _(sym,string) string,
265 .name =
"ipip4-input",
267 .vector_size =
sizeof(
u32),
273 #define _(s, n) [IPIP_INPUT_NEXT_##s] = n,
281 .name =
"ipip6-input",
283 .vector_size =
sizeof(
u32),
289 #define _(s, n) [IPIP_INPUT_NEXT_##s] = n,
vnet_interface_main_t * im
void ip_set(ip46_address_t *dst, void *src, u8 is_ip4)
static_always_inline void tunnel_decap_fixup_4o6(tunnel_encap_decap_flags_t flags, ip4_header_t *inner, const ip6_header_t *outer)
#define foreach_ipip_error
vlib_node_registration_t ipip4_input_node
(constructor) VLIB_REGISTER_NODE (ipip4_input_node)
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static void ip46_address_reset(ip46_address_t *ip46)
vlib_node_registration_t ipip6_input_node
(constructor) VLIB_REGISTER_NODE (ipip6_input_node)
static u8 * format_ipip_rx_trace(u8 *s, va_list *args)
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_main_t vlib_node_runtime_t vlib_frame_t * from_frame
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
A representation of a IPIP tunnel.
static uword ipip_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, bool is_ipv6)
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)
static char * ipip_error_strings[]
static_always_inline void tunnel_decap_fixup_6o4(tunnel_encap_decap_flags_t flags, ip6_header_t *inner, const ip4_header_t *outer)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static_always_inline u32 sixrd_get_addr_net(const ipip_tunnel_t *t, u64 dal)
@ VNET_INTERFACE_COUNTER_RX
struct _vlib_node_registration vlib_node_registration_t
vlib_combined_counter_main_t * combined_sw_if_counters
static_always_inline void tunnel_decap_fixup_6o6(tunnel_encap_decap_flags_t flags, ip6_header_t *inner, const ip6_header_t *outer)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
struct ipip_tunnel_t::@426 sixrd
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
format_function_t format_ip46_address
ipip_tunnel_t * ipip_tunnel_db_find(const ipip_tunnel_key_t *key)
static_always_inline void tunnel_decap_fixup_mplso6(tunnel_encap_decap_flags_t flags, mpls_unicast_header_t *inner, const ip6_header_t *outer)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define foreach_ipip_input_next
static_always_inline void tunnel_decap_fixup_mplso4(tunnel_encap_decap_flags_t flags, mpls_unicast_header_t *inner, const ip4_header_t *outer)
tunnel_encap_decap_flags_t flags
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
#define IP4_HEADER_FLAG_MORE_FRAGMENTS
vlib_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
static_always_inline void tunnel_decap_fixup_4o4(tunnel_encap_decap_flags_t flags, ip4_header_t *inner, const ip4_header_t *outer)
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,...)