|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
29 #ifndef CLIB_MARCH_VARIANT
39 s =
format (s,
"ODDBUF: sw_if_index %d, next index %d, udp checksum %04x\n",
48 #define foreach_oddbuf_error \
49 _(SWAPPED, "Mac swap packets processed")
53 #define _(sym,str) ODDBUF_ERROR_##sym,
59 #ifndef CLIB_MARCH_VARIANT
61 #define _(sym,string) string,
77 int is_ip4,
int is_trace)
85 u16 save_current_length;
129 b0->
flags |= VLIB_BUFFER_NEXT_PRESENT;
130 b0->
flags &= ~VLIB_BUFFER_TOTAL_LENGTH_VALID;
146 clib_warning (
"OOPS, length incorrect after chunk split...");
154 if (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)
172 return frame->n_vectors;
187 #ifndef CLIB_MARCH_VARIANT
191 .vector_size =
sizeof (
u32),
u32 next_buffer
Next buffer for this linked-list of buffers.
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
static u8 * format_oddbuf_trace(u8 *s, va_list *args)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define VLIB_NODE_FN(node)
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
#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.
#define foreach_oddbuf_error
u16 ip4_tcp_udp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
sll srl srl sll sra u16x4 i
struct _vlib_node_registration vlib_node_registration_t
u16 current_length
Nbytes between current data and the end of this buffer.
static char * oddbuf_error_strings[]
vlib_node_registration_t oddbuf_node
(constructor) VLIB_REGISTER_NODE (oddbuf_node)
description fragment has unexpected format
static uword oddbuf_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4, int is_trace)
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.
oddbuf_main_t oddbuf_main
#define clib_warning(format, args...)
u16 nexts[VLIB_FRAME_SIZE]
vl_api_fib_path_type_t type
static void * ip4_next_header(ip4_header_t *i)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
vl_api_wireguard_peer_flags_t flags