28 #define GBP_SRC_N_CLASSIFY (GBP_SRC_CLASSIFY_PORT + 1) 62 u32 n_left_from, *from, *to_next;
69 while (n_left_from > 0)
75 while (n_left_from > 0 && n_left_to_next > 0)
77 u32 next0, bi0, src_epg, sw_if_index0;
97 L2INPUT_FEAT_GBP_NULL_CLASSIFY);
114 L2INPUT_FEAT_GBP_SRC_CLASSIFY);
128 to_next, n_left_to_next,
183 .name =
"gbp-null-classify",
184 .vector_size =
sizeof (
u32),
196 .name =
"gbp-src-classify",
197 .vector_size =
sizeof (
u32),
209 .name =
"ip4-gbp-src-classify",
210 .vector_size =
sizeof (
u32),
225 .name =
"ip6-gbp-src-classify",
226 .vector_size =
sizeof (
u32),
241 .arc_name =
"ip4-unicast",
242 .node_name =
"ip4-gbp-src-classify",
247 .arc_name =
"ip6-unicast",
248 .node_name =
"ip6-gbp-src-classify",
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
static uword gbp_null_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
A Group Based Policy Endpoint.
vlib_node_registration_t gbp_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_src_classify_node)
static gbp_src_classify_main_t gbp_src_classify_main
static uword gbp_src_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
struct gbp_classify_trace_t_ gbp_classify_trace_t
per-packet trace data
static u32 vnet_l2_feature_next(vlib_buffer_t *b, u32 *next_nodes, u32 feat_bit)
Return the graph node index for the feature corresponding to the next set bit after clearing the curr...
#define GBP_SRC_N_CLASSIFY
#define VLIB_INIT_FUNCTION(x)
static uword gbp_classify_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, gbp_src_classify_type_t type, u8 is_l3)
static clib_error_t * gbp_src_classify_init(vlib_main_t *vm)
struct gbp_src_classify_main_t_ gbp_src_classify_main_t
Grouping of global data for the GBP source EPG classification feature.
static uword gbp_ip4_src_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword gbp_ip6_src_classify(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.
enum gbp_src_classify_type_t_ gbp_src_classify_type_t
#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_ip6_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip6_src_classify_node)
#define VLIB_REGISTER_NODE(x,...)
Grouping of global data for the GBP source EPG classification feature.
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.
u32 l2_input_feat_next[GBP_SRC_N_CLASSIFY][32]
Next nodes for L2 output features.
static gbp_endpoint_t * gbp_endpoint_get_itf(u32 sw_if_index)
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.
VLIB_NODE_FUNCTION_MULTIARCH(gbp_null_classify_node, gbp_null_classify)
#define VNET_FEATURES(...)
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 gbp_ip4_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip4_src_classify_node)
epg_id_t ge_epg_id
The endpoint's designated EPG.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
VNET_FEATURE_INIT(gbp_ip4_src_classify_feat_node, static)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
vlib_node_registration_t gbp_null_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_null_classify_node)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.