30 #ifndef CLIB_MARCH_VARIANT 40 s =
format (s,
"ODDBUF: sw_if_index %d, next index %d, udp checksum %04x\n",
49 #define foreach_oddbuf_error \ 50 _(SWAPPED, "Mac swap packets processed") 54 #define _(sym,str) ODDBUF_ERROR_##sym, 60 #ifndef CLIB_MARCH_VARIANT 62 #define _(sym,string) string, 78 int is_ip4,
int is_trace)
81 u32 n_left_from, *from;
86 u16 save_current_length;
102 while (n_left_from > 0)
130 b0->
flags |= VLIB_BUFFER_NEXT_PRESENT;
131 b0->
flags &= ~VLIB_BUFFER_TOTAL_LENGTH_VALID;
147 clib_warning (
"OOPS, length incorrect after chunk split...");
155 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
188 #ifndef CLIB_MARCH_VARIANT 192 .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.
vl_api_wireguard_peer_flags_t flags
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
u16 current_length
Nbytes between current data and the end of this buffer.
#define foreach_oddbuf_error
#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.
static u8 * format_oddbuf_trace(u8 *s, va_list *args)
static void * ip4_next_header(ip4_header_t *i)
vl_api_fib_path_type_t type
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define VLIB_REGISTER_NODE(x,...)
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
sll srl srl sll sra u16x4 i
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
#define clib_warning(format, args...)
static uword oddbuf_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip4, int is_trace)
vlib_main_t vlib_node_runtime_t * node
u16 ip4_tcp_udp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip4_header_t *ip0)
struct _vlib_node_registration vlib_node_registration_t
static char * oddbuf_error_strings[]
u32 next_buffer
Next buffer for this linked-list of buffers.
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.
vlib_node_registration_t oddbuf_node
(constructor) VLIB_REGISTER_NODE (oddbuf_node)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
#define VLIB_NODE_FLAG_TRACE
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
oddbuf_main_t oddbuf_main