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;
219 to_next, n_left_to_next,
226 em->
counters[node_counter_base_index + MCAST_PREP_ERROR_MCASTS] +=
234 .name =
"mcast_prep",
235 .vector_size =
sizeof (
u32),
264 "MCAST_R: group %d, current member %d next (node) index %d, tx_sw_if_index %d",
269 #define foreach_mcast_recycle_error \ 270 _(RECYCLES, "Multicast Recycles") 273 #define _(sym,str) MCAST_RECYCLE_ERROR_##sym, 280 #define _(sym,string) string, 295 u32 n_left_from, * from, * to_next;
306 while (n_left_from > 0)
311 to_next, n_left_to_next);
313 while (0 && n_left_from >= 4 && n_left_to_next >= 2)
318 u32 sw_if_index0, sw_if_index1;
335 to_next[0] = bi0 = from[0];
336 to_next[1] = bi1 = from[1];
372 to_next, n_left_to_next,
373 bi0, bi1, next0, next1);
376 while (n_left_from > 0 && n_left_to_next > 0)
405 current_member0 =
vnet_buffer(b0)->mcast.mcast_current_index;
427 to_next, n_left_to_next,
433 em->
counters[node_counter_base_index + MCAST_RECYCLE_ERROR_RECYCLES] +=
441 .name =
"mcast-recycle",
442 .vector_size =
sizeof (
u32),
466 u32 n_left_to_next = 0;
467 u32 n_this_frame = 0;
476 for (i = 0; i < 2; i++)
489 while (n_left_from > 0)
523 vlib_buffer_set_known_state (vm, bi0, VLIB_BUFFER_KNOWN_ALLOCATED);
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
sll srl srl sll sra u16x4 i
vlib_node_registration_t mcast_recycle_node
(constructor) VLIB_REGISTER_NODE (mcast_recycle_node)
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
u32 recycle_count
Used by L2 path recycle code.
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
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)
#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)
Returns pointer to element at given index.
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)
Finish enqueueing two buffers forward in the graph.
#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.
#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).
#define CLIB_PREFETCH(addr, size, type)
u16 mcast_group_index
Force re-lookup in a different FIB.
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[]
#define VLIB_BUFFER_RECYCLE
void(* buffers_added_to_freelist_function)(struct vlib_main_t *vm, struct vlib_buffer_free_list_t *fl)
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.
static u8 * format_mcast_recycle_trace(u8 *s, va_list *args)
#define VLIB_NODE_FLAG_TRACE
#define VLIB_BUFFER_IS_TRACED
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
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
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
#define VLIB_REGISTER_NODE(x,...)
ip4_main_t ip4_main
Global ip4 main structure.
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
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.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
u32 vlib_buffer_create_free_list(vlib_main_t *vm, u32 n_data_bytes, char *fmt,...)
static ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)