36 #define GBP_SRC_N_CLASSIFY (GBP_SRC_CLASSIFY_LPM + 1) 70 u32 n_left_from, *from, *to_next;
77 while (n_left_from > 0)
83 while (n_left_from > 0 && n_left_to_next > 0)
85 u32 next0, bi0, src_epg, sw_if_index0;
106 L2INPUT_FEAT_GBP_NULL_CLASSIFY);
117 L2INPUT_FEAT_GBP_SRC_CLASSIFY);
178 to_next, n_left_to_next,
237 .name =
"gbp-null-classify",
238 .vector_size =
sizeof (
u32),
250 .name =
"gbp-src-classify",
251 .vector_size =
sizeof (
u32),
263 .name =
"ip4-gbp-src-classify",
264 .vector_size =
sizeof (
u32),
279 .name =
"ip6-gbp-src-classify",
280 .vector_size =
sizeof (
u32),
295 .arc_name =
"ip4-unicast",
296 .node_name =
"ip4-gbp-src-classify",
301 .arc_name =
"ip6-unicast",
302 .node_name =
"ip6-gbp-src-classify",
316 u16 etype = clib_net_to_host_u16 (eh0->
type);
320 case ETHERNET_TYPE_IP4:
322 case ETHERNET_TYPE_IP6:
324 case ETHERNET_TYPE_VLAN:
330 switch (clib_net_to_host_u16 (vh0->
type))
332 case ETHERNET_TYPE_IP4:
334 case ETHERNET_TYPE_IP6:
353 u32 n_left_from, *from, *to_next;
360 while (n_left_from > 0)
366 while (n_left_from > 0 && n_left_to_next > 0)
368 u32 bi0, sw_if_index0, fib_index0, lbi0;
438 L2INPUT_FEAT_GBP_LPM_CLASSIFY);
483 to_next, n_left_to_next,
517 .name =
"ip4-gbp-lpm-classify",
518 .vector_size =
sizeof (
u32),
533 .name =
"ip6-gbp-lpm-classify",
534 .vector_size =
sizeof (
u32),
549 .name =
"l2-gbp-lpm-classify",
550 .vector_size =
sizeof (
u32),
565 .arc_name =
"ip4-unicast",
566 .node_name =
"ip4-gbp-lpm-classify",
571 .arc_name =
"ip6-unicast",
572 .node_name =
"ip6-gbp-lpm-classify",
static uword gbp_lpm_classify_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, dpo_proto_t dproto, u8 is_recirc)
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)
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
A Group Based Policy Endpoint.
enum gbp_lpm_classify_next_t_ gbp_lpm_classify_next_t
vlib_node_registration_t gbp_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_src_classify_node)
gbp_endpoint_fwd_t ge_fwd
u32 fib_table_get_index_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the index of the FIB bound to the interface.
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
vlib_node_registration_t gbp_ip6_lpm_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip6_lpm_classify_node)
static u32 ip6_fib_table_fwding_lookup(ip6_main_t *im, u32 fib_index, const ip6_address_t *dst)
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...
epg_id_t gef_epg_id
Endpoint Group's ID.
static dpo_proto_t ethertype_to_dpo_proto(const ethernet_header_t *eh0)
static_always_inline gbp_endpoint_t * gbp_endpoint_find_ip4(const ip4_address_t *ip, u32 fib_index)
#define GBP_SRC_N_CLASSIFY
#define VLIB_INIT_FUNCTION(x)
u32 gx_fib_index[DPO_PROTO_NUM]
cached FIB indices from the RD
static_always_inline gbp_endpoint_t * gbp_endpoint_find_mac(const u8 *mac, u32 bd_index)
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.
A GBP recirculation interface representation Thes interfaces join Bridge domains that are internal to...
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
vlib_node_registration_t gbp_ip4_lpm_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip4_lpm_classify_node)
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)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u32 gr_fib_index[DPO_PROTO_NUM]
FIB indices the EPG is mapped to.
static gbp_ext_itf_t * gbp_ext_itf_get(u32 sw_if_index)
dpo_type_t dpoi_type
the type
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
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.
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).
An external interface maps directly to an oflex L3ExternalInterface.
vlib_node_registration_t gbp_ip6_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip6_src_classify_node)
static_always_inline gbp_endpoint_t * gbp_endpoint_find_ip6(const ip6_address_t *ip, u32 fib_index)
static uword gbp_ip6_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VLIB_REGISTER_NODE(x,...)
static gbp_recirc_t * gbp_recirc_get(u32 sw_if_index)
Grouping of global data for the GBP source EPG classification feature.
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
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.
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 gbp_policy_dpo_t * gbp_policy_dpo_get(index_t index)
vlib_node_registration_t gbp_l2_lpm_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_l2_lpm_classify_node)
static uword gbp_l2_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword gbp_ip4_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static load_balance_t * load_balance_get(index_t lbi)
dpo_type_t gbp_policy_dpo_type
DPO type registered for these GBP FWD.
VLIB_NODE_FUNCTION_MULTIARCH(gbp_null_classify_node, gbp_null_classify)
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
#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)
index_t dpoi_index
the index of objects of that type
vlib_node_registration_t gbp_ip4_src_classify_node
(constructor) VLIB_REGISTER_NODE (gbp_ip4_src_classify_node)
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.
static uword gbp_classify_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, gbp_src_classify_type_t type, dpo_proto_t dproto)