30 s =
format (s,
"ADL_INPUT: sw_if_index %d, next index %d",
35 #define foreach_adl_input_error \ 36 _(PROCESSED, "Allow/Deny packets processed") 39 #define _(sym,str) ADL_INPUT_ERROR_##sym, 46 #define _(sym,string) string, 55 u32 n_left_from, * from, * to_next;
60 n_left_from =
frame->n_vectors;
61 next_index =
node->cached_next_index;
63 while (n_left_from > 0)
68 to_next, n_left_to_next);
70 while (n_left_from >= 4 && n_left_to_next >= 2)
75 u32 sw_if_index0, sw_if_index1;
78 u32 advance0, advance1;
96 to_next[0] = bi0 = from[0];
97 to_next[1] = bi1 = from[1];
117 if (en0->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP4))
122 else if (en0->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP6))
128 if (en1->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP4))
133 else if (en1->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP6))
159 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
168 && (b1->
flags & VLIB_BUFFER_IS_TRACED)))
177 to_next, n_left_to_next,
178 bi0, bi1, next0, next1);
181 while (n_left_from > 0 && n_left_to_next > 0)
215 if (en0->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP4))
220 else if (en0->
type == clib_host_to_net_u16(ETHERNET_TYPE_IP6))
237 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
247 to_next, n_left_to_next,
254 ADL_INPUT_ERROR_PROCESSED,
frame->n_vectors);
255 return frame->n_vectors;
260 .vector_size =
sizeof (
u32),
282 #define foreach_adl_stub \ 283 _(default-adl-allowlist, default_adl_allowlist) 288 f##_node_fn (vlib_main_t * vm, \ 289 vlib_node_runtime_t * node, \ 290 vlib_frame_t * frame) \ 292 clib_warning ("BUG: stub function called"); \ 296 VLIB_REGISTER_NODE (f##_input_node) = { \ 297 .function = f##_node_fn, \ 299 .vector_size = sizeof (u32), \ 300 .type = VLIB_NODE_TYPE_INTERNAL, \ 303 .error_strings = 0, \ u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define foreach_adl_input_error
#define VLIB_NODE_FN(node)
adl_config_main_t adl_config_mains[VNET_N_ADLS]
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vl_api_fib_path_type_t type
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static void * vnet_get_config_data(vnet_config_main_t *cm, u32 *config_index, u32 *next_index, u32 n_data_bytes)
#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_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer 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).
vnet_config_main_t config_main
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
#define VLIB_REGISTER_NODE(x,...)
#define CLIB_PREFETCH(addr, size, type)
vlib_node_registration_t adl_input_node
(constructor) VLIB_REGISTER_NODE (adl_input_node)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_main_t vlib_node_runtime_t * node
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static char * adl_input_error_strings[]
u32 * config_index_by_sw_if_index
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static u8 * format_adl_input_trace(u8 *s, va_list *args)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define VLIB_NODE_FLAG_TRACE
#define CLIB_CACHE_LINE_BYTES
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
uword unformat_ethernet_header(unformat_input_t *input, va_list *args)