37 s =
format (s,
"adj-idx %d : %U",
55 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];
93 rw_len0 = adj0[0].rewrite_header.data_bytes;
104 adj0[0].rewrite_header.max_l3_packet_bytes)))
110 tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
124 tx_sw_if_index0, &next0, p0);
140 to_next, n_left_to_next,
168 .name =
"adj-nsh-rewrite",
169 .vector_size =
sizeof (
u32),
183 .name =
"adj-nsh-midchain",
184 .vector_size =
sizeof (
u32),
200 .arc_name =
"nsh-output",
207 .arc_name =
"nsh-output",
208 .node_name =
"error-drop",
#define vnet_rewrite_one_header(rw0, p0, most_likely_size)
Trace data for a NSH Midchain.
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.
vlib_node_registration_t adj_nsh_rewrite_node
(constructor) VLIB_REGISTER_NODE (adj_nsh_rewrite_node)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
struct ip_adjacency_t_::@38::@40 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
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.
static u8 * format_adj_nsh_trace(u8 *s, va_list *args)
vlib_node_registration_t adj_nsh_midchain_node
(constructor) VLIB_REGISTER_NODE (adj_nsh_midchain_node)
static uword adj_nsh_midchain(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
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.
#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.
union ip_adjacency_t_::@38 sub_type
static_always_inline uword vlib_get_thread_index(void)
static uword adj_nsh_rewrite(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VLIB_BUFFER_IS_TRACED
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.
u32 adj_index
Adjacency index taken.
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
struct _nsh_main_dummy nsh_main_dummy_t
struct adj_nsh_trace_t_ adj_nsh_trace_t
Trace data for a NSH Midchain.
VNET_FEATURE_INIT(nsh_tx_drop, static)
#define VNET_FEATURES(...)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
nsh_main_dummy_t nsh_main_dummy
VNET_FEATURE_ARC_INIT(nsh_output, static)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define VLIB_NODE_FUNCTION_MULTIARCH(node, fn)
#define VLIB_REGISTER_NODE(x,...)
static uword adj_nsh_rewrite_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_midchain)
enum adj_nsh_rewrite_next_t_ adj_gpe_rewrite_next_t
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.
static_always_inline void vnet_feature_arc_start(u8 arc, u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)