20 #ifndef CLIB_MARCH_VARIANT 39 s =
format (s,
"adj-idx %d : %U",
57 u32 n_left_from, n_left_to_next, * to_next, next_index;
63 while (n_left_from > 0)
67 while (n_left_from > 0 && n_left_to_next > 0)
72 u32 pi0, rw_len0, adj_index0, next0 = 0;
75 pi0 = to_next[0] = from[0];
95 rw_len0 = adj0[0].rewrite_header.data_bytes;
106 adj0[0].rewrite_header.max_l3_packet_bytes)))
112 tx_sw_if_index0 = adj0[0].rewrite_header.sw_if_index;
128 tx_sw_if_index0, &next0, p0);
144 to_next, n_left_to_next,
169 .name =
"adj-nsh-rewrite",
170 .vector_size =
sizeof (
u32),
181 .name =
"adj-nsh-midchain",
182 .vector_size =
sizeof (
u32),
196 .arc_name =
"nsh-output",
203 .arc_name =
"nsh-output",
204 .node_name =
"error-drop",
#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.
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.
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.
vlib_node_registration_t adj_nsh_rewrite_node
(constructor) VLIB_REGISTER_NODE (adj_nsh_rewrite_node)
#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.
union ip_adjacency_t_::@48 sub_type
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
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)
struct ip_adjacency_t_::@48::@50 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
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.
#define VLIB_REGISTER_NODE(x,...)
static_always_inline uword vlib_get_thread_index(void)
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)
VLIB buffer representation.
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.
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
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)