36 s =
format (s,
"adj-idx %d : %U",
55 u32 n_left_from, n_left_to_next, * to_next, next_index;
62 while (n_left_from > 0)
66 while (n_left_from > 0 && n_left_to_next > 0)
71 u32 pi0, rw_len0, len0, adj_index0, next0 = 0;
74 pi0 = to_next[0] = from[0];
93 rw_len0 = adj0[0].rewrite_header.data_bytes;
110 if (
PREDICT_TRUE(len0 <= adj0[0].rewrite_header.max_l3_packet_bytes))
116 tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
139 next0 = adj0[0].rewrite_header.next_index;
155 to_next, n_left_to_next,
186 .name =
"adj-l2-rewrite",
187 .vector_size =
sizeof (
u32),
198 .name =
"adj-l2-midchain",
199 .vector_size =
sizeof (
u32),
#define vnet_rewrite_one_header(rw0, p0, most_likely_size)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static void vlib_increment_combined_counter(vlib_combined_counter_main_t *cm, u32 thread_index, u32 index, u64 n_packets, u64 n_bytes)
Increment a combined counter.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
u16 current_length
Nbytes between current data and the end of this buffer.
#define VLIB_NODE_FN(node)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
ethernet_main_t ethernet_main
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
struct ip_adjacency_t_::@149::@151 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
union ip_adjacency_t_::@149 sub_type
vlib_node_registration_t adj_l2_midchain_node
(constructor) VLIB_REGISTER_NODE (adj_l2_midchain_node)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static_always_inline void * vnet_feature_arc_start_w_cfg_index(u8 arc, u32 sw_if_index, u32 *next, vlib_buffer_t *b, u32 cfg_index)
static u8 * format_adj_l2_trace(u8 *s, va_list *args)
#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).
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
#define VLIB_REGISTER_NODE(x,...)
static_always_inline uword vlib_get_thread_index(void)
struct adj_l2_trace_t_ adj_l2_trace_t
Trace data for a L2 Midchain.
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
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
u32 ia_cfg_index
feature [arc] config 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.
Trace data for a L2 Midchain.
u32 adj_index
Adjacency index taken.
vlib_node_registration_t adj_l2_rewrite_node
(constructor) VLIB_REGISTER_NODE (adj_l2_rewrite_node)
static uword adj_l2_rewrite_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_midchain, int do_counters)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
This adjacency/interface has output features configured.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
enum adj_l2_rewrite_next_t_ adj_l2_rewrite_next_t
u8 output_feature_arc_index
static int adj_are_counters_enabled(void)
Get the global configuration option for enabling per-adj counters.