|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
37 #define foreach_nat44_handoff_error \
38 _ (CONGESTION_DROP, "congestion drop") \
39 _ (SAME_WORKER, "same worker") \
40 _ (DO_HANDOFF, "do handoff")
44 #define _(sym, str) NAT44_HANDOFF_ERROR_##sym,
51 #define _(sym,string) string,
64 tag = t->
in2out ?
"IN2OUT" :
"OUT2IN";
65 output = t->
output ?
"OUTPUT-FEATURE" :
"";
67 format (s,
"NAT44_%s_WORKER_HANDOFF %s: next-worker %d trace index %d",
103 u32 arc_next0, arc_next1, arc_next2, arc_next3;
104 u32 sw_if_index0, sw_if_index1, sw_if_index2, sw_if_index3;
105 u32 rx_fib_index0, rx_fib_index1, rx_fib_index2, rx_fib_index3;
106 u32 iph_offset0 = 0, iph_offset1 = 0, iph_offset2 = 0, iph_offset3 = 0;
123 iph_offset0 =
vnet_buffer (
b[0])->ip.save_rewrite_length;
124 iph_offset1 =
vnet_buffer (
b[1])->ip.save_rewrite_length;
125 iph_offset2 =
vnet_buffer (
b[2])->ip.save_rewrite_length;
126 iph_offset3 =
vnet_buffer (
b[3])->ip.save_rewrite_length;
216 iph_offset0 =
vnet_buffer (
b[0])->ip.save_rewrite_length;
254 for (
i = 0;
i <
frame->n_vectors;
i++)
256 if (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
274 thread_indices,
frame->n_vectors, 1);
279 NAT44_HANDOFF_ERROR_CONGESTION_DROP,
280 frame->n_vectors - n_enq);
284 NAT44_HANDOFF_ERROR_SAME_WORKER, same_worker);
286 NAT44_HANDOFF_ERROR_DO_HANDOFF, do_handoff);
287 return frame->n_vectors;
299 .name =
"nat44-in2out-worker-handoff",
300 .vector_size =
sizeof (
u32),
301 .sibling_of =
"nat-default",
319 .name =
"nat44-in2out-output-worker-handoff",
320 .vector_size =
sizeof (
u32),
321 .sibling_of =
"nat-default",
338 .name =
"nat44-out2in-worker-handoff",
339 .vector_size =
sizeof (
u32),
340 .sibling_of =
"nat-default",
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.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
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)
u32 nat44_ed_get_out2in_worker_index(vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index, u8 is_output)
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_node_registration_t snat_in2out_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node)
vlib_node_registration_t snat_in2out_output_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node)
static u8 * format_nat44_handoff_trace(u8 *s, va_list *args)
#define CLIB_PREFETCH(addr, size, type)
#define VLIB_NODE_FN(node)
#define VLIB_NODE_FLAG_TRACE
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 fq_in2out_output_index
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
sll srl srl sll sra u16x4 i
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t snat_out2in_worker_handoff_node
(constructor) VLIB_REGISTER_NODE (snat_out2in_worker_handoff_node)
static char * nat44_handoff_error_strings[]
description fragment has unexpected format
u32 nat44_ed_get_in2out_worker_index(vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index, u8 is_output)
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.
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
vl_api_fib_path_type_t type
#define foreach_nat44_handoff_error
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
vl_api_wireguard_peer_flags_t flags