69 u32 n_left_from, n_left_to_next, *to_next, next_index;
75 while (n_left_from > 0)
79 while (n_left_from >= 4 && n_left_to_next >= 2)
97 bi0 = to_next[0] = from[0];
98 bi1 = to_next[1] = from[1];
175 to_next, n_left_to_next,
176 bi0, bi1, next0, next1);
179 while (n_left_from > 0 && n_left_to_next > 0)
181 u32 bi0, next0, uei0;
185 bi0 = to_next[0] = from[0];
240 to_next, n_left_to_next,
267 .name =
"udp4-encap",
268 .vector_size =
sizeof (
u32),
278 .name =
"udp6-encap",
279 .vector_size =
sizeof (
u32),
The UDP encap represenation.
vlib_node_registration_t udp6_encap_node
(constructor) VLIB_REGISTER_NODE (udp6_encap_node)
struct udp6_encap_trace_t_ udp6_encap_trace_t
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.
dpo_id_t ue_dpo
The DPO used to forward to the next node in the VLIB graph.
static uword udp6_encap(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
static uword udp4_encap(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword udp_encap_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_encap_v6)
static void ip_udp_encap_one(vlib_main_t *vm, vlib_buffer_t *b0, u8 *ec0, word ec_len, u8 is_ip4)
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
struct udp_encap_t_::@332::@334 ip6
#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 udp_encap_counters
Stats for each UDP encap object.
#define VLIB_REGISTER_NODE(x,...)
static void ip_udp_encap_two(vlib_main_t *vm, vlib_buffer_t *b0, vlib_buffer_t *b1, u8 *ec0, u8 *ec1, word ec_len, u8 is_v4)
static_always_inline uword vlib_get_thread_index(void)
struct udp_encap_t_::@332::@333 ip4
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.
union udp_encap_t_::@332 ue_hdrs
The headers to paint, in packet painting order.
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
struct udp4_encap_trace_t_ udp4_encap_trace_t
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
index_t dpoi_index
the index of objects of that type
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
A collection of combined counters.
VLIB_NODE_FUNCTION_MULTIARCH(udp4_encap_node, udp4_encap)
u16 dpoi_next_node
The next VLIB node to follow.
static u8 * format_udp6_encap_trace(u8 *s, va_list *args)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vlib_node_registration_t udp4_encap_node
(constructor) VLIB_REGISTER_NODE (udp4_encap_node)
static udp_encap_t * udp_encap_get(index_t uei)
static u8 * format_udp4_encap_trace(u8 *s, va_list *args)