37 #define _(sym,string) string, 50 tag = t->
in2out ?
"IN2OUT" :
"OUT2IN";
51 output = t->
output ?
"OUTPUT-FEATURE" :
"";
53 format (s,
"NAT44_%s_WORKER_HANDOFF %s: next-worker %d trace index %d",
65 u32 n_enq, n_left_from, *from, do_handoff = 0, same_worker = 0;
87 while (n_left_from >= 4)
89 u32 arc_next0, arc_next1, arc_next2, arc_next3;
90 u32 sw_if_index0, sw_if_index1, sw_if_index2, sw_if_index3;
91 u32 rx_fib_index0, rx_fib_index1, rx_fib_index2, rx_fib_index3;
92 u32 iph_offset0 = 0, iph_offset1 = 0, iph_offset2 = 0, iph_offset3 = 0;
109 iph_offset0 =
vnet_buffer (b[0])->ip.save_rewrite_length;
110 iph_offset1 =
vnet_buffer (b[1])->ip.save_rewrite_length;
111 iph_offset2 =
vnet_buffer (b[2])->ip.save_rewrite_length;
112 iph_offset3 =
vnet_buffer (b[3])->ip.save_rewrite_length;
159 if (ti[0] == thread_index)
164 if (ti[1] == thread_index)
169 if (ti[2] == thread_index)
174 if (ti[3] == thread_index)
184 while (n_left_from > 0)
194 iph_offset0 =
vnet_buffer (b[0])->ip.save_rewrite_length;
214 if (ti[0] == thread_index)
232 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
252 if (n_enq < frame->n_vectors)
255 NAT44_HANDOFF_ERROR_CONGESTION_DROP,
260 NAT44_HANDOFF_ERROR_SAME_WORKER, same_worker);
262 NAT44_HANDOFF_ERROR_DO_HANDOFF, do_handoff);
275 .name =
"nat44-in2out-worker-handoff",
276 .vector_size =
sizeof (
u32),
277 .sibling_of =
"nat-default",
295 .name =
"nat44-in2out-output-worker-handoff",
296 .vector_size =
sizeof (
u32),
297 .sibling_of =
"nat-default",
314 .name =
"nat44-out2in-worker-handoff",
315 .vector_size =
sizeof (
u32),
316 .sibling_of =
"nat-default",
static char * nat44_handoff_error_strings[]
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.
u32 fq_in2out_output_index
vlib_node_registration_t snat_in2out_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node)
#define VLIB_NODE_FN(node)
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
snat_get_worker_out2in_function_t * worker_out2in_cb
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define foreach_nat44_handoff_error
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.
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)
sll srl srl sll sra u16x4 i
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
vlib_main_t vlib_node_runtime_t * node
static uword nat44_worker_handoff_fn_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_output, u8 is_in2out)
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.
vlib_node_registration_t snat_out2in_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_out2in_worker_handoff_node)
static_always_inline u32 vlib_buffer_enqueue_to_thread(vlib_main_t *vm, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion)
snat_get_worker_in2out_function_t * worker_in2out_cb
vlib_node_registration_t snat_in2out_output_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node)
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)
static u8 * format_nat44_handoff_trace(u8 *s, va_list *args)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
#define VLIB_NODE_FLAG_TRACE
#define CLIB_CACHE_LINE_BYTES