|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
49 s =
format (s,
"l2-input-vtr: sw_if_index %d dst %U src %U data "
50 "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x",
60 #ifndef CLIB_MARCH_VARIANT
64 #define foreach_l2_invtr_error \
65 _(L2_INVTR, "L2 inverter packets") \
66 _(DROP, "L2 input tag rewrite drops")
70 #define _(sym,str) L2_INVTR_ERROR_##sym,
77 #define _(sym,string) string,
113 u32 sw_if_index0, sw_if_index1;
118 u32 sw_if_index2, sw_if_index3;
148 to_next[0] = bi0 =
from[0];
149 to_next[1] = bi1 =
from[1];
182 b0->
error =
node->errors[L2_INVTR_ERROR_DROP];
191 b0->
error =
node->errors[L2_INVTR_ERROR_DROP];
203 b1->
error =
node->errors[L2_INVTR_ERROR_DROP];
212 b1->
error =
node->errors[L2_INVTR_ERROR_DROP];
219 if (b0->
flags & VLIB_BUFFER_IS_TRACED)
229 if (b1->
flags & VLIB_BUFFER_IS_TRACED)
244 to_next, n_left_to_next,
245 bi0, bi1, next0, next1);
283 b0->
error =
node->errors[L2_INVTR_ERROR_DROP];
292 b0->
error =
node->errors[L2_INVTR_ERROR_DROP];
298 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
311 to_next, n_left_to_next,
318 return frame->n_vectors;
324 .name =
"l2-input-vtr",
325 .vector_size =
sizeof (
u32),
341 #ifndef CLIB_MARCH_VARIANT
ptr_config_t output_pbb_vtr
const char *const const char *const raw
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
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.
u8 * format_ethernet_address(u8 *s, va_list *args)
@ VLIB_NODE_TYPE_INTERNAL
static u32 l2_pbb_process(vlib_buffer_t *b0, ptr_config_t *config)
vlib_main_t vlib_node_runtime_t * node
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
ptr_config_t input_pbb_vtr
#define CLIB_PREFETCH(addr, size, type)
static u32 l2_vtr_process(vlib_buffer_t *b0, vtr_config_t *config)
Perform the configured tag rewrite on the packet.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
#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)
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define CLIB_CACHE_LINE_BYTES
u32 feat_next_node_index[32]
struct _vlib_node_registration vlib_node_registration_t
static u32 vnet_l2_feature_next(vlib_buffer_t *b, u32 *next_nodes, u32 feat_bit)
Return the graph node index for the feature corresponding to the next set bit after clearing the curr...
#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)
l2output_main_t l2output_main
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)
#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).
l2_output_config_t * configs
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
vl_api_fib_path_type_t type
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,...)