19 #define foreach_gbp_fwd \ 25 #define _(sym,str) GBP_FWD_ERROR_##sym, 32 #define _(sym,string) string, 39 #define _(sym,str) GBP_FWD_NEXT_##sym, 58 u32 n_left_from, *from, *to_next;
62 n_left_from = frame->n_vectors;
65 while (n_left_from > 0)
71 while (n_left_from > 0 && n_left_to_next > 0)
73 u32 bi0, sw_if_index0;
78 next0 = GBP_FWD_NEXT_DROP;
95 if (~0 != sw_if_index0)
99 next0 = GBP_FWD_NEXT_OUTPUT;
115 to_next, n_left_to_next,
122 return frame->n_vectors;
141 .vector_size =
sizeof (
u32),
151 [GBP_FWD_NEXT_DROP] =
"error-drop",
152 [GBP_FWD_NEXT_OUTPUT] =
"l2-output",
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
#define VLIB_NODE_FN(node)
static char * gbp_fwd_error_strings[]
vl_api_fib_path_type_t type
#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).
vlib_node_registration_t gbp_fwd_node
(constructor) VLIB_REGISTER_NODE (gbp_fwd_node)
#define VLIB_REGISTER_NODE(x,...)
static u32 gbp_epg_itf_lookup_sclass(sclass_t sclass)
struct gbp_fwd_trace_t_ gbp_fwd_trace_t
per-packet trace data
static u8 * format_gbp_fwd_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.
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.