|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
43 #define foreach_handoffdemo_error \
44 _(HANDED_OFF, "packets handed off processed") \
45 _(CONGESTION_DROP, "handoff queue congestion drops") \
46 _(COMPLETE, "completed packets")
50 #define _(sym,str) HANDOFFDEMO_ERROR_##sym,
57 #define _(sym,string) string,
71 int which,
int is_trace)
75 u32 error0 =
node->errors[HANDOFFDEMO_ERROR_COMPLETE];
92 for (
i = 0;
i <
frame->n_vectors;
i++)
95 thread_indices[
i] = 2;
97 if (is_trace && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED))
116 HANDOFFDEMO_ERROR_CONGESTION_DROP,
117 frame->n_vectors - n_enq);
119 HANDOFFDEMO_ERROR_HANDED_OFF, n_enq);
120 return frame->n_vectors;
135 if (is_trace && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED))
153 return frame->n_vectors;
171 .name =
"handoffdemo-1",
173 .vector_size =
sizeof (
u32),
204 .name =
"handoffdemo-2",
206 .vector_size =
sizeof (
u32),
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)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static uword handoffdemo_node_1_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * handoffdemo_error_strings[]
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
vlib_main_t vlib_node_runtime_t * node
static uword handoffdemo_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int which, int is_trace)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u8 * format_handoffdemo_trace(u8 *s, va_list *args)
vlib_buffer_enqueue_to_next(vm, node, from,(u16 *) nexts, frame->n_vectors)
uword handoffdemo_node_2_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
u32 vlib_frame_queue_main_init(u32 node_index, u32 frame_queue_nelts)
#define foreach_handoffdemo_error
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
vlib_node_registration_t handoffdemo_node
vlib_node_registration_t handoffdemo_node_1
(constructor) VLIB_REGISTER_NODE (handoffdemo_node_1)
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
struct _vlib_node_registration vlib_node_registration_t
vlib_node_registration_t handoffdemo_node_2
(constructor) VLIB_REGISTER_NODE (handoffdemo_node_2)
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
handoffdemo_main_t handoffdemo_main
u16 nexts[VLIB_FRAME_SIZE]
static clib_error_t * handoffdemo_node_init(vlib_main_t *vm)
vl_api_fib_path_type_t type
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)
vl_api_wireguard_peer_flags_t flags