36 s =
format (s,
"adj-idx %d : %U",
54 u32 n_left_from, n_left_to_next, * to_next, next_index;
61 while (n_left_from > 0)
65 while (n_left_from > 0 && n_left_to_next > 0)
70 u32 pi0, rw_len0, adj_index0, next0 = 0;
73 pi0 = to_next[0] = from[0];
91 rw_len0 = adj0[0].rewrite_header.data_bytes;
108 adj0[0].rewrite_header.max_l3_packet_bytes)))
114 tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
145 to_next, n_left_to_next,
173 .name =
"adj-l2-rewrite",
174 .vector_size =
sizeof (
u32),
188 .name =
"adj-l2-midchain",
189 .vector_size =
sizeof (
u32),
#define vnet_rewrite_one_header(rw0, p0, most_likely_size)
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.
struct ip_adjacency_t_::@43::@45 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
union ip_adjacency_t_::@43 sub_type
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.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
u8 output_feature_arc_index
vlib_node_registration_t adj_l2_midchain_node
(constructor) VLIB_REGISTER_NODE (adj_l2_midchain_node)
#define VLIB_NODE_FUNCTION_MULTIARCH(node, fn)
u16 current_length
Nbytes between current data and the end of this buffer.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
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.
static uword adj_l2_rewrite(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#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.
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
static uword adj_l2_rewrite_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_midchain)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static uword adj_l2_midchain(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
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)
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 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
static_always_inline void vnet_feature_arc_start(u8 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)