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,
266 .name =
"udp4-encap",
267 .vector_size =
sizeof (
u32),
275 .name =
"udp6-encap",
276 .vector_size =
sizeof (
u32),
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
struct udp_encap_t_::@562::@564 ip6
The UDP encap representation.
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.
#define VLIB_NODE_FN(node)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
union udp_encap_t_::@562 ue_hdrs
The headers to paint, in packet painting order.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
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.
#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)
struct udp_encap_t_::@562::@563 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.
vlib_main_t vlib_node_runtime_t * node
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
index_t dpoi_index
the index of objects of that type
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.
A collection of combined counters.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
u16 dpoi_next_node
The next VLIB node to follow.
static u8 * format_udp6_encap_trace(u8 *s, va_list *args)
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)