|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
28 #define foreach_mpls_input_next \
29 _(DROP, "error-drop") \
30 _(LOOKUP, "mpls-lookup")
33 #define _(s,n) MPLS_INPUT_NEXT_##s,
50 #define _(a,b) if (t->next_index == MPLS_INPUT_NEXT_##a) next_name = b;
54 s =
format (s,
"MPLS: next %s[%d] label %d ttl %d exp %d",
94 to_next, n_left_to_next);
98 u32 bi0, next0, sw_if_index0;
99 u32 bi1, next1, sw_if_index1;
117 bi0 = to_next[0] =
from[0];
118 bi1 = to_next[1] =
from[1];
137 next0 = MPLS_INPUT_NEXT_DROP;
138 b0->
error =
node->errors[MPLS_ERROR_TTL_EXPIRED];
142 next0 = MPLS_INPUT_NEXT_LOOKUP;
144 sw_if_index0, &next0, b0);
150 next1 = MPLS_INPUT_NEXT_DROP;
151 b1->
error =
node->errors[MPLS_ERROR_TTL_EXPIRED];
155 next1 = MPLS_INPUT_NEXT_LOOKUP;
157 sw_if_index1, &next1, b1);
177 to_next, n_left_to_next,
184 u32 sw_if_index0, next0, bi0;
202 next0 = MPLS_INPUT_NEXT_DROP;
203 b0->
error =
node->errors[MPLS_ERROR_TTL_EXPIRED];
207 next0 = MPLS_INPUT_NEXT_LOOKUP;
221 to_next, n_left_to_next,
228 MPLS_ERROR_PKTS_DECAP,
from_frame->n_vectors);
240 #define mpls_error(n,s) s,
246 .name =
"mpls-input",
248 .vector_size =
sizeof (
u32),
257 #define _(s,n) [MPLS_INPUT_NEXT_##s] = n,
266 #ifndef CLIB_MARCH_VARIANT
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
nat44_ei_hairpin_src_next_t next_index
@ VNET_INTERFACE_COUNTER_MPLS
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.
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
vlib_simple_counter_main_t * sw_if_counters
vlib_main_t vlib_node_runtime_t vlib_frame_t * from_frame
#define CLIB_PREFETCH(addr, size, type)
static void vlib_increment_simple_counter(vlib_simple_counter_main_t *cm, u32 thread_index, u32 index, u64 increment)
Increment a simple counter.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
u8 input_feature_arc_index
#define VLIB_NODE_FN(node)
unformat_function_t * unformat_edit
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
vnet_main_t * vnet_get_main(void)
static_always_inline uword vlib_get_thread_index(void)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
unformat_function_t unformat_pg_mpls_header
static pg_node_t * pg_get_node(uword node_index)
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
vnet_feature_config_main_t * cm
static u32 vnet_mpls_uc_get_exp(mpls_label_t label_exp_s_ttl)
struct _vlib_node_registration vlib_node_registration_t
#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.
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
#define VLIB_INIT_FUNCTION(x)
format_function_t format_mpls_unicast_header_net_byte_order
A collection of simple counters.
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.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static_always_inline void vnet_feature_arc_start(u8 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
static u32 vnet_mpls_uc_get_ttl(mpls_label_t label_exp_s_ttl)
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
#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).
void ethernet_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
vnet_interface_main_t interface_main
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,...)