32 #define foreach_gbp_fwd \ 38 #define _(sym,str) GBP_FWD_ERROR_##sym, 45 #define _(sym,string) string, 52 #define _(sym,str) GBP_FWD_NEXT_##sym, 71 u32 n_left_from, *from, *to_next;
78 while (n_left_from > 0)
84 while (n_left_from > 0 && n_left_to_next > 0)
86 u32 bi0, sw_if_index0, src_epg;
90 next0 = GBP_FWD_NEXT_DROP;
107 if (~0 != sw_if_index0)
111 next0 = GBP_FWD_NEXT_OUTPUT;
127 to_next, n_left_to_next,
154 .vector_size =
sizeof (
u32),
164 [GBP_FWD_NEXT_DROP] =
"error-drop",
165 [GBP_FWD_NEXT_OUTPUT] =
"l2-output",
static gbp_fwd_main_t gbp_fwd_main
struct gbp_fwd_main_t_ gbp_fwd_main_t
Grouping of global data for the GBP source EPG classification feature.
struct gbp_fwd_trace_t_ gbp_fwd_trace_t
per-packet trace data
static u32 gbp_epg_itf_lookup(epg_id_t epg)
static char * gbp_fwd_error_strings[]
#define VLIB_INIT_FUNCTION(x)
static clib_error_t * gbp_fwd_init(vlib_main_t *vm)
static uword gbp_fwd(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#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 VLIB_REGISTER_NODE(x,...)
VLIB_NODE_FUNCTION_MULTIARCH(gbp_fwd_node, gbp_fwd)
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
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.
static u8 * format_gbp_fwd_trace(u8 *s, va_list *args)
vlib_node_registration_t gbp_fwd_node
(constructor) VLIB_REGISTER_NODE (gbp_fwd_node)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Grouping of global data for the GBP source EPG classification feature.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
u32 l2_input_feat_next[32]
Next nodes for L2 output features.