38 s =
format (s,
"MCAST_PREP: group %d, next index %d, tx_sw_if_index %d",
47 #define foreach_mcast_prep_error \ 48 _(MCASTS, "Multicast Packets") 51 #define _(sym,str) MCAST_PREP_ERROR_##sym, 58 #define _(sym,string) string, 73 u32 n_left_from, * from, * to_next;
86 while (n_left_from > 0)
91 to_next, n_left_to_next);
93 while (0 && n_left_from >= 4 && n_left_to_next >= 2)
98 u32 sw_if_index0, sw_if_index1;
115 to_next[0] = bi0 = from[0];
116 to_next[1] = bi1 = from[1];
152 to_next, n_left_to_next,
153 bi0, bi1, next0, next1);
156 while (n_left_from > 0 && n_left_to_next > 0)
160 u32 next0, adj_index0;
218 to_next, n_left_to_next,
225 em->
counters[node_counter_base_index + MCAST_PREP_ERROR_MCASTS] +=
233 .name =
"mcast_prep",
234 .vector_size =
sizeof (
u32),
263 "MCAST_R: group %d, current member %d next (node) index %d, tx_sw_if_index %d",
268 #define foreach_mcast_recycle_error \ 269 _(RECYCLES, "Multicast Recycles") 272 #define _(sym,str) MCAST_RECYCLE_ERROR_##sym, 279 #define _(sym,string) string, 294 u32 n_left_from, * from, * to_next;
305 while (n_left_from > 0)
310 to_next, n_left_to_next);
312 while (0 && n_left_from >= 4 && n_left_to_next >= 2)
317 u32 sw_if_index0, sw_if_index1;
334 to_next[0] = bi0 = from[0];
335 to_next[1] = bi1 = from[1];
371 to_next, n_left_to_next,
372 bi0, bi1, next0, next1);
375 while (n_left_from > 0 && n_left_to_next > 0)
403 current_member0 =
vnet_buffer(b0)->mcast.mcast_current_index;
425 to_next, n_left_to_next,
431 em->
counters[node_counter_base_index + MCAST_RECYCLE_ERROR_RECYCLES] +=
439 .name =
"mcast-recycle",
440 .vector_size =
sizeof (
u32),
464 u32 n_left_to_next = 0;
465 u32 n_this_frame = 0;
474 for (i = 0; i < 2; i++)
487 while (n_left_from > 0)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
sll srl srl sll sra u16x4 i
vlib_node_registration_t mcast_recycle_node
(constructor) VLIB_REGISTER_NODE (mcast_recycle_node)
always_inline vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
u32 free_list_index
Buffer free list that this buffer was allocated from and will be freed to.
u32 mcast_recycle_list_index
struct _vlib_node_registration vlib_node_registration_t
vlib_buffer_main_t * buffer_main
ip_lookup_main_t lookup_main
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
mcast_group_member_t * members
#define foreach_mcast_prep_error
void(* buffers_added_to_freelist_function)(struct vlib_main_t *vm, struct vlib_buffer_free_list_t *fl)
vnet_main_t * vnet_get_main(void)
#define foreach_mcast_recycle_error
static u8 * format_mcast_prep_trace(u8 *s, va_list *args)
#define vlib_prefetch_buffer_with_index(vm, bi, type)
Prefetch buffer metadata by buffer index The first 64 bytes of buffer contains most header informatio...
#define VLIB_INIT_FUNCTION(x)
always_inline void * vlib_frame_vector_args(vlib_frame_t *f)
#define VLIB_BUFFER_NEXT_PRESENT
static void mcast_recycle_callback(vlib_main_t *vm, vlib_buffer_free_list_t *fl)
#define pool_elt_at_index(p, i)
vlib_error_main_t error_main
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
u32 vlib_buffer_create_free_list(vlib_main_t *vm, u32 n_data_bytes, char *fmt,...)
#define CLIB_PREFETCH(addr, size, type)
u32 prep_and_recycle_node_next_index
static uword mcast_prep_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * mcast_recycle_error_strings[]
clib_error_t * mcast_init(vlib_main_t *vm)
static char * mcast_prep_error_strings[]
static uword mcast_recycle_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
u32 next_buffer
Next buffer for this linked-list of buffers.
u32 clone_count
Specifies whether this buffer should be reinitialized when freed.
static u8 * format_mcast_recycle_trace(u8 *s, va_list *args)
#define VLIB_NODE_FLAG_TRACE
#define VLIB_BUFFER_IS_TRACED
always_inline ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)
always_inline void vlib_buffer_set_known_state(vlib_main_t *vm, u32 buffer_index, vlib_buffer_known_state_t state)
vlib_node_registration_t mcast_prep_node
(constructor) VLIB_REGISTER_NODE (mcast_prep_node)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_buffer_free_list_t * buffer_free_list_pool
always_inline void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
#define CLIB_CACHE_LINE_BYTES
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
always_inline vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.