123 u32 n_left_from, n_left_to_next, * from, * to_next;
128 while (n_left_from > 0)
131 to_next, n_left_to_next);
133 while (n_left_from > 0 && n_left_to_next > 0)
197 .name =
"ip4-mfib-forward-lookup",
198 .vector_size =
sizeof (
u32),
220 .function = ip6_mfib_forward_lookup,
221 .name =
"ip6-mfib-forward-lookup",
222 .vector_size =
sizeof (
u32),
233 ip6_mfib_forward_lookup)
236 typedef struct mfib_forward_rpf_trace_t_ {
254 s =
format (s,
"entry %d", t->entry_index);
255 s =
format (s,
" %d", t->sw_if_index);
303 old_flags = __sync_fetch_and_or(&mfi->
mfi_flags,
343 u32 n_left_from, n_left_to_next, * from, * to_next;
350 while (n_left_from > 0)
353 to_next, n_left_to_next);
355 while (n_left_from > 0 && n_left_to_next > 0)
454 t0->entry_index = mfei0;
455 t0->itf_flags = iflags0;
458 t0->sw_if_index = ~0;
466 to_next, n_left_to_next,
487 .name =
"ip4-mfib-forward-rpf",
488 .vector_size =
sizeof (
u32),
511 .function = ip6_mfib_forward_rpf,
512 .name =
"ip6-mfib-forward-rpf",
513 .vector_size =
sizeof (
u32),
524 ip6_mfib_forward_rpf)
fib_entry_flag_t lb_fib_entry_flags
Flags from the load-balance's associated fib_entry_t.
enum mfib_entry_flags_t_ mfib_entry_flags_t
u32 * mfib_index_by_sw_if_index
Table index indexed by software interface.
static u8 * format_mfib_forward_rpf_trace(u8 *s, va_list *args)
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.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static uword mfib_forward_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_v4)
static void mfib_forward_itf_signal(vlib_main_t *vm, const mfib_entry_t *mfe, mfib_itf_t *mfi, vlib_buffer_t *b0)
fib_node_index_t ip6_mfib_table_lookup2(const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp)
Data-plane lookup function.
static ip4_mfib_t * ip4_mfib_get(u32 index)
Get the FIB at the given index.
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
u32 * mfib_index_by_sw_if_index
Table index indexed by software interface.
#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...
enum mfib_forward_lookup_next_t_ mfib_forward_lookup_next_t
static vlib_node_registration_t ip6_mfib_forward_rpf_node
(constructor) VLIB_REGISTER_NODE (ip6_mfib_forward_rpf_node)
static uword ip4_mfib_forward_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static vlib_node_registration_t ip6_mfib_forward_lookup_node
(constructor) VLIB_REGISTER_NODE (ip6_mfib_forward_lookup_node)
dpo_id_t mfe_rep
The DPO used for forwarding; replicate, drop, etc.
static u8 * format_mfib_forward_lookup_trace(u8 *s, va_list *args)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#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).
static mfib_entry_t * mfib_entry_get(fib_node_index_t index)
mfib_forward_lookup_next_t_
mfib_itf_flags_t mfi_flags
Falags on the entry.
#define VLIB_BUFFER_IS_TRACED
static int mfib_forward_connected_check(vlib_buffer_t *b0, u32 sw_if_index, int is_v4)
u32 fib_node_index_t
A typedef of a node index.
mfib_entry_flags_t mfe_flags
Route flags.
static uword ip4_mfib_forward_rpf(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
VLIB_NODE_FUNCTION_MULTIARCH(ip4_mfib_forward_lookup_node, ip4_mfib_forward_lookup)
static load_balance_t * load_balance_get(index_t lbi)
void mfib_forward_lookup_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
An interface associated with a particular MFIB entry.
fib_node_index_t ip4_mfib_table_lookup(const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
The IPv4 Multicast-FIB.
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
#define VLIB_NODE_FLAG_TRACE
fib_rpf_id_t mfe_rpf_id
RPF-ID used when the packets ingress not from an interface.
static vlib_node_registration_t ip4_mfib_forward_rpf_node
(constructor) VLIB_REGISTER_NODE (ip4_mfib_forward_rpf_node)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vec_elt(v, i)
Get vector value at index i.
static mfib_itf_t * mfib_entry_get_itf(const mfib_entry_t *mfe, u32 sw_if_index)
index_t dpoi_index
the index of objects of that type
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u8 * format_mfib_itf_flags(u8 *s, va_list *args)
void mfib_signal_push(const mfib_entry_t *mfe, mfib_itf_t *mfi, vlib_buffer_t *b0)
static vlib_node_registration_t ip4_mfib_forward_lookup_node
(constructor) VLIB_REGISTER_NODE (ip4_mfib_forward_lookup_node)
enum mfib_itf_flags_t_ mfib_itf_flags_t
static uword mfib_forward_rpf(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_v4)
enum mfib_forward_rpf_next_t_ mfib_forward_rpf_next_t
static ip6_mfib_t * ip6_mfib_get(u32 index)
Get the FIB at the given index.
u32 mfi_sw_if_index
The SW IF index that this MFIB interface represents.
#define VLIB_REGISTER_NODE(x,...)
ip4_main_t ip4_main
Global ip4 main structure.
u16 flags
Copy of main node flags.
u16 dpoi_next_node
The next VLIB node to follow.
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.
struct mfib_forward_lookup_trace_t_ mfib_forward_lookup_trace_t