|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
35 used_elt_bmp[
i] |= match_bmp[
i];
42 else if (
n_free >= n_extracted)
65 return n_left - n_extracted;
68 void __clib_section (
".vlib_buffer_enqueue_to_next_fn")
128 void __clib_section (
".vlib_buffer_enqueue_to_single_next_fn")
133 u32 *to_next, n_left_to_next, n_enq;
140 n_left_to_next -=
count;
145 n_enq = n_left_to_next;
148 n_left_to_next -= n_enq;
164 u32 __clib_section (
".vlib_buffer_enqueue_to_thread_fn")
167 u32 *buffer_indices,
u16 *thread_indices,
u32 n_packets,
168 int drop_on_congestion)
176 u32 n_left_to_next_thread = 0, *to_next_thread = 0;
189 if (drop_on_congestion &&
194 dbi[0] = buffer_indices[0];
212 to_next_thread[0] = buffer_indices[0];
214 n_left_to_next_thread--;
216 if (n_left_to_next_thread == 0)
222 current_thread_index = ~0;
260 if (drop_on_congestion && n_drop)
263 return n_packets - n_drop;
273 u32 __clib_section (
".vlib_frame_queue_dequeue_fn")
300 fqt = &fqm->frame_queue_traces[thread_id];
315 fqh = &fqm->frame_queue_histogram[thread_id];
319 for (elix = 0; elix < fqt->
nelts; elix++)
348 msg_type =
elt->msg_type;
357 if (
b->
flags & VLIB_BUFFER_IS_TRACED)
364 vectors +=
elt->n_vectors;
370 elt->msg_type = 0xfefefefe;
389 #ifndef CLIB_MARCH_VARIANT
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
#define count_trailing_zeros(x)
vlib_buffer_enqueue_to_thread_fn_t * buffer_enqueue_to_thread_fn
nat44_ei_hairpin_src_next_t next_index
vlib_buffer_copy_indices(to, tmp, n_free)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
@ VLIB_FRAME_QUEUE_ELT_DISPATCH_FRAME
vlib_main_t vlib_node_runtime_t * node
static vlib_frame_queue_t * is_vlib_frame_queue_congested(u32 frame_queue_index, u32 index, u32 queue_hi_thresh, vlib_frame_queue_t **handoff_queue_by_worker_index)
#define CLIB_MULTIARCH_FN(fn)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static_always_inline void clib_mask_compare_u16(u16 v, u16 *a, u64 *mask, u32 n_elts)
Compare 16-bit elemments with provied value and return bitmap.
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
volatile uword check_frame_queues
vlib_buffer_enqueue_to_next_fn_t * buffer_enqueue_to_next_fn
static vlib_frame_queue_elt_t * vlib_get_worker_handoff_queue_elt(u32 frame_queue_index, u32 vlib_worker_index, vlib_frame_queue_elt_t **handoff_queue_elt_by_worker_index)
vlib_buffer_enqueue_to_single_next_fn_t * buffer_enqueue_to_single_next_fn
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static_always_inline u32 enqueue_one(vlib_main_t *vm, vlib_node_runtime_t *node, u64 *used_elt_bmp, u16 next_index, u32 *buffers, u16 *nexts, u32 n_buffers, u32 n_left, u32 *tmp)
vlib_frame_queue_elt_t ** handoff_queue_elt_by_thread_index
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_buffer_func_main_t vlib_buffer_func_main
u32 buffer_index[VLIB_FRAME_SIZE]
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define VLIB_NODE_FLAG_TRACE
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
vlib_global_main_t vlib_global_main
#define static_always_inline
CLIB_MARCH_FN_REGISTRATION(vlib_buffer_enqueue_to_next_fn)
sll srl srl sll sra u16x4 i
static u32 next_thread_index(vnet_main_t *vnm, u32 thread_index)
#define CLIB_MEMORY_BARRIER()
vlib_frame_queue_t ** congested_handoff_queue_by_thread_index
i32 n_vectors[FRAME_QUEUE_MAX_NELTS]
static clib_error_t * vlib_buffer_funcs_init(vlib_main_t *vm)
vlib_put_next_frame(vm, node, next_index, 0)
#define VLIB_INIT_FUNCTION(x)
static vlib_main_t * vlib_get_main_by_index(u32 thread_index)
u64 count[FRAME_QUEUE_MAX_NELTS]
vlib_frame_queue_elt_t * elts
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
u16 nexts[VLIB_FRAME_SIZE]
vlib_frame_queue_per_thread_data_t * per_thread_data
vlib_frame_queue_dequeue_fn_t * frame_queue_dequeue_fn
static void vlib_put_frame_queue_elt(vlib_frame_queue_elt_t *hf)
#define CLIB_MARCH_FN_POINTER(fn)
static vlib_thread_main_t * vlib_get_thread_main()
vlib_main_t ** vlib_mains
#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_frame_queue_main_t * frame_queue_mains
vlib_frame_t * vlib_get_next_frame_internal(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 allocate_new_next_frame)
static_always_inline u32 clib_compress_u32(u32 *dst, u32 *src, u64 *mask, u32 n_elts)
Compare array of 32-bit elemments into destination array based on mask.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.