32 #define foreach_nat44_ei_handoff_error \ 33 _ (CONGESTION_DROP, "congestion drop") \ 34 _ (SAME_WORKER, "same worker") \ 35 _ (DO_HANDOFF, "do handoff") 39 #define _(sym, str) NAT44_EI_HANDOFF_ERROR_##sym, 46 #define _(sym, string) string, 59 tag = t->
in2out ?
"IN2OUT" :
"OUT2IN";
60 output = t->
output ?
"OUTPUT-FEATURE" :
"";
62 format (s,
"NAT44_EI_%s_WORKER_HANDOFF %s: next-worker %d trace index %d",
97 while (n_left_from >= 4)
99 u32 arc_next0, arc_next1, arc_next2, arc_next3;
100 u32 sw_if_index0, sw_if_index1, sw_if_index2, sw_if_index3;
101 u32 rx_fib_index0, rx_fib_index1, rx_fib_index2, rx_fib_index3;
102 u32 iph_offset0 = 0, iph_offset1 = 0, iph_offset2 = 0, iph_offset3 = 0;
119 iph_offset0 =
vnet_buffer (b[0])->ip.save_rewrite_length;
120 iph_offset1 =
vnet_buffer (b[1])->ip.save_rewrite_length;
121 iph_offset2 =
vnet_buffer (b[2])->ip.save_rewrite_length;
122 iph_offset3 =
vnet_buffer (b[3])->ip.save_rewrite_length;
177 if (ti[0] == thread_index)
182 if (ti[1] == thread_index)
187 if (ti[2] == thread_index)
192 if (ti[3] == thread_index)
202 while (n_left_from > 0)
211 iph_offset0 =
vnet_buffer (b[0])->ip.save_rewrite_length;
233 if (ti[0] == thread_index)
251 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
274 NAT44_EI_HANDOFF_ERROR_CONGESTION_DROP,
279 vm, node->
node_index, NAT44_EI_HANDOFF_ERROR_SAME_WORKER, same_worker);
281 NAT44_EI_HANDOFF_ERROR_DO_HANDOFF, do_handoff);
304 .name =
"nat44-ei-in2out-output-worker-handoff",
305 .vector_size =
sizeof (
u32),
313 .name =
"nat44-ei-in2out-worker-handoff",
314 .vector_size =
sizeof (
u32),
322 .name =
"nat44-ei-out2in-worker-handoff",
323 .vector_size =
sizeof (
u32),
vlib_node_registration_t nat44_ei_in2out_output_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_in2out_output_worker_handoff_node)
vl_api_wireguard_peer_flags_t flags
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
static uword nat44_ei_worker_handoff_fn_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_output, u8 is_in2out)
u32 fq_in2out_output_index
vlib_node_registration_t nat44_ei_out2in_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_worker_handoff_node)
static u8 * format_nat44_ei_handoff_trace(u8 *s, va_list *args)
NAT44 endpoint independent plugin declarations.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
#define VLIB_NODE_FN(node)
vlib_node_registration_t nat44_ei_in2out_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_in2out_worker_handoff_node)
u32 nat44_ei_get_in2out_worker_index(ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
vlib_get_buffers(vm, from, b, n_left_from)
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
vl_api_fib_path_type_t type
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 node_index
Node index.
u32 nat44_ei_get_out2in_worker_index(vlib_buffer_t *b, ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
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_main_t vlib_node_runtime_t * node
sll srl srl sll sra u16x4 i
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
static char * nat44_ei_handoff_error_strings[]
#define foreach_nat44_ei_handoff_error
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
nat44_ei_main_t nat44_ei_main
u16 flags
Copy of main node flags.
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
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
static_always_inline u32 vlib_buffer_enqueue_to_thread(vlib_main_t *vm, vlib_node_runtime_t *node, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion)