|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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",
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;
211 iph_offset0 =
vnet_buffer (
b[0])->ip.save_rewrite_length;
249 for (
i = 0;
i <
frame->n_vectors;
i++)
251 if (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
269 thread_indices,
frame->n_vectors, 1);
274 NAT44_EI_HANDOFF_ERROR_CONGESTION_DROP,
275 frame->n_vectors - n_enq);
279 vm,
node->node_index, NAT44_EI_HANDOFF_ERROR_SAME_WORKER, same_worker);
281 NAT44_EI_HANDOFF_ERROR_DO_HANDOFF, do_handoff);
282 return frame->n_vectors;
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),
u32 fq_in2out_output_index
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)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
@ NAT44_EI_HANDOFF_N_ERROR
vlib_node_registration_t nat44_ei_in2out_output_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_in2out_output_worker_handoff_node)
u32 nat44_ei_get_out2in_worker_index(vlib_buffer_t *b, ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
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 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
#define foreach_nat44_ei_handoff_error
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static char * nat44_ei_handoff_error_strings[]
u32 nat44_ei_get_in2out_worker_index(ip4_header_t *ip0, u32 rx_fib_index0, u8 is_output)
#define VLIB_NODE_FN(node)
static u8 * format_nat44_ei_handoff_trace(u8 *s, va_list *args)
nat44_ei_main_t nat44_ei_main
#define VLIB_NODE_FLAG_TRACE
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
vlib_main_t vlib_node_runtime_t * node
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
struct _vlib_node_registration vlib_node_registration_t
description fragment has unexpected format
static_always_inline void clib_prefetch_load(void *p)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
vlib_node_registration_t nat44_ei_in2out_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_in2out_worker_handoff_node)
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
vlib_node_registration_t nat44_ei_out2in_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (nat44_ei_out2in_worker_handoff_node)
vl_api_fib_path_type_t type
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
vl_api_wireguard_peer_flags_t flags