|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
18 #define foreach_punt_error \
19 _(DISPATCHED, "dispatched") \
20 _(NO_REASON, "No such punt reason") \
21 _(NO_REG, "No registrations") \
22 _(REP_FAIL, "Replication Failure")
26 #define _(v,s) PUNT_ERROR_##v,
33 #define _(v,s) [PUNT_ERROR_##v] = s,
52 #ifndef CLIB_MARCH_VARIANT
78 u32 * n_left_to_next,
u32 ** to_next,
u32 * n_dispatched)
81 u16 n_clones0, n_cloned0, clone0;
93 b0->
error =
node->errors[PUNT_ERROR_REP_FAIL];
96 for (clone0 = 1; clone0 < n_cloned0; clone0++)
102 *n_left_to_next -= 1;
117 *to_next, *n_left_to_next, ci0, next0);
123 *n_dispatched = *n_dispatched + n_cloned0;
143 u32 * n_left_to_next,
u32 ** to_next,
u32 * n_dispatched)
154 b0->
error =
node->errors[PUNT_ERROR_NO_REASON];
169 *n_dispatched = *n_dispatched + 1;
175 b0->
error =
node->errors[PUNT_ERROR_NO_REG];
235 bi0 = to_next[0] =
from[0];
236 bi1 = to_next[1] =
from[1];
242 &to_next, &n_dispatched);
245 &to_next, &n_dispatched);
251 to_next, n_left_to_next,
252 bi0, bi1, next0, next1);
259 bi0 = to_next[0] =
from[0];
265 &to_next, &n_dispatched);
271 to_next, n_left_to_next,
278 PUNT_ERROR_DISPATCHED, n_dispatched);
280 return frame->n_vectors;
285 .name =
"punt-dispatch",
286 .vector_size =
sizeof (
u32),
298 #ifndef CLIB_MARCH_VARIANT
enum vlib_punt_reason_t_ vlib_punt_reason_t
The 'syatem' defined punt reasons.
u32 ** punt_clones
Per-thread clone vectors.
static u32 vlib_num_workers()
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
nat44_ei_hairpin_src_next_t next_index
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
clib_error_t * punt_node_init(vlib_main_t *vm)
vlib_main_t vlib_node_runtime_t * node
#define foreach_punt_error
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
u8 * format_vlib_punt_reason(u8 *s, va_list *args)
Format a punt reason.
vlib_node_registration_t punt_dispatch_node
(constructor) VLIB_REGISTER_NODE (punt_dispatch_node)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
vlib_combined_counter_main_t punt_counters
Counters per punt-reason.
#define VLIB_NODE_FN(node)
vlib_punt_reason_t pt_reason
static u32 punt_replicate(vlib_main_t *vm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, u32 bi0, vlib_punt_reason_t pr0, u32 *next_index, u32 *n_left_to_next, u32 **to_next, u32 *n_dispatched)
static_always_inline uword vlib_get_thread_index(void)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u16 ** punt_dp_db
A DB used in the DP per-reason to dispatch packets to the requested nodes.
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
static u16 vlib_buffer_clone(vlib_main_t *vm, u32 src_buffer, u32 *buffers, u16 n_buffers, u16 head_end_offset)
Create multiple clones of buffer and store them in the supplied array.
vnet_feature_config_main_t * cm
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
#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.
description fragment has unexpected format
A collection of combined counters.
vlib_put_next_frame(vm, node, next_index, 0)
static u8 * format_punt_trace(u8 *s, va_list *args)
#define VLIB_INIT_FUNCTION(x)
static char * punt_error_strings[]
static u32 punt_dispatch_one(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_combined_counter_main_t *cm, u32 thread_index, u32 bi0, u32 *next_index, u32 *n_left_to_next, u32 **to_next, u32 *n_dispatched)
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)
#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 punt_trace_t_ punt_trace_t
#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_increment_combined_counter(ccm, ti, sw_if_index, n_buffers, n_bytes)
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,...)