|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
36 #define foreach_gbp_vxlan_input_next \
37 _(DROP, "error-drop") \
38 _(L2_INPUT, "l2-input") \
39 _(IP4_INPUT, "ip4-input") \
40 _(IP6_INPUT, "ip6-input")
44 #define _(s,n) GBP_VXLAN_INPUT_NEXT_##s,
51 #define foreach_gbp_vxlan_error \
52 _(DECAPPED, "decapped") \
57 #define _(s,n) GBP_VXLAN_ERROR_##s,
94 bi0 = to_next[0] =
from[0];
99 next0 = GBP_VXLAN_INPUT_NEXT_DROP;
111 next0 = GBP_VXLAN_INPUT_NEXT_DROP;
119 if (GBP_VXLAN_TUN_L2 == gt0->
gt_layer)
123 next0 = GBP_VXLAN_INPUT_NEXT_L2_INPUT;
134 type0 = clib_net_to_host_u16 (e0->
type);
137 case ETHERNET_TYPE_IP4:
138 next0 = GBP_VXLAN_INPUT_NEXT_IP4_INPUT;
140 case ETHERNET_TYPE_IP6:
141 next0 = GBP_VXLAN_INPUT_NEXT_IP6_INPUT;
156 tr->
dropped = (next0 == GBP_VXLAN_INPUT_NEXT_DROP);
164 to_next, n_left_to_next,
188 s =
format (s,
"vni:%d dropped:%d rx:%d sclass:%d flags:%U",
198 .name =
"gbp-vxlan4",
199 .vector_size =
sizeof (
u32),
205 #define _(s,n) [GBP_VXLAN_INPUT_NEXT_##s] = n,
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
static vxlan_gbp_gpflags_t vxlan_gbp_get_gpflags(vxlan_gbp_header_t *h)
vlib_node_registration_t gbp_vxlan4_input_node
(constructor) VLIB_REGISTER_NODE (gbp_vxlan4_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.
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
#define foreach_gbp_vxlan_input_next
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static uword gbp_vxlan_decap(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_ip4)
#define VLIB_NODE_FN(node)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
gbp_vxlan_tunnel_layer_t gt_layer
struct _vlib_node_registration vlib_node_registration_t
GBP VXLAN (template) tunnel.
#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.
static char * gbp_vxlan_error_strings[]
static u8 * format_gbp_vxlan_rx_trace(u8 *s, va_list *args)
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
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.
struct gbp_vxlan_trace_t_ gbp_vxlan_trace_t
u8 * format_vxlan_gbp_header_gpflags(u8 *s, va_list *args)
static u16 vxlan_gbp_get_sclass(vxlan_gbp_header_t *h)
uword * gv_db
DB of added tunnels.
#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).
static u32 vxlan_gbp_get_vni(vxlan_gbp_header_t *h)
gbp_vxlan_tunnel_t * gbp_vxlan_tunnel_get(index_t gti)
#define foreach_gbp_vxlan_error
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,...)