|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
36 etype = clib_net_to_host_u16 (etype);
40 case ETHERNET_TYPE_IP4:
42 case ETHERNET_TYPE_IP6:
61 dpo = &gu->
gu_dpo[GBP_POLICY_NODE_L2][dproto];
80 feat_bit = L2OUTPUT_FEAT_GBP_POLICY_PORT;
83 feat_bit = L2OUTPUT_FEAT_GBP_POLICY_MAC;
86 feat_bit = L2OUTPUT_FEAT_GBP_POLICY_LPM;
104 u32 n_allow_intra, n_allow_a_bit, n_allow_sclass_1;
109 n_allow_intra = n_allow_a_bit = n_allow_sclass_1 = 0;
126 u32 bi0, sw_if_index0;
175 const ip6_address_t *
ip6 = 0;
204 b0->
error =
node->errors[GBP_CONTRACT_ERROR_DROP_NO_DCLASS];
228 case GBP_RULE_PERMIT:
232 case GBP_RULE_REDIRECT:
248 to_next, n_left_to_next,
256 GBP_CONTRACT_ERROR_ALLOW_INTRA, n_allow_intra);
258 GBP_CONTRACT_ERROR_ALLOW_A_BIT, n_allow_a_bit);
260 GBP_CONTRACT_ERROR_ALLOW_SCLASS_1,
263 return frame->n_vectors;
289 .name =
"gbp-policy-port",
290 .vector_size =
sizeof (
u32),
304 .name =
"gbp-policy-mac",
305 .vector_size =
sizeof (
u32),
319 .name =
"gbp-policy-lpm",
320 .vector_size =
sizeof (
u32),
u32 gx_fib_index[DPO_PROTO_NUM]
cached FIB indices from the RD
u16 dpoi_next_node
The next VLIB node to follow.
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
index_t dpoi_index
the index of objects of that type
gbp_endpoint_fwd_t ge_fwd
vlib_node_registration_t gbp_policy_port_node
(constructor) VLIB_REGISTER_NODE (gbp_policy_port_node)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static u32 gbp_rule_l2_redirect(const gbp_rule_t *gu, vlib_buffer_t *b0)
vlib_node_registration_t gbp_policy_lpm_node
(constructor) VLIB_REGISTER_NODE (gbp_policy_lpm_node)
static u32 vxlan_gbp_tunnel_by_sw_if_index(u32 sw_if_index)
sclass_t gef_sclass
Endpoint Group's sclass.
nat44_ei_hairpin_src_next_t next_index
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
char * gbp_contract_error_strings[]
@ VLIB_NODE_TYPE_INTERNAL
@ GBP_CLASSIFY_GET_IP_DST
vlib_main_t vlib_node_runtime_t * node
static_always_inline void gbp_policy_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, const gbp_contract_key_t *key, gbp_rule_action_t action, u32 acl_match, u32 rule_match)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static gbp_scope_t gbp_bridge_domain_get_scope(u32 bd_index)
vlib_parse_match_function_t rule_match
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
static uword gbp_policy_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, const gbp_policy_type_t type)
static_always_inline gbp_endpoint_t * gbp_endpoint_find_mac(const u8 *mac, u32 bd_index)
sclass_t gpd_sclass
SClass.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 l2_output_feat_next[GBP_N_POLICY][32]
Next nodes for L2 output features.
#define static_always_inline
enum gbp_policy_type_t_ gbp_policy_type_t
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
sclass_t gck_src
source and destination EPGs for which the ACL applies
vlib_node_registration_t gbp_policy_mac_node
(constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node)
struct _vlib_node_registration vlib_node_registration_t
static gbp_ext_itf_t * gbp_ext_itf_get(u32 sw_if_index)
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...
static_always_inline gbp_rule_action_t gbp_contract_apply(vlib_main_t *vm, gbp_main_t *gm, gbp_contract_key_t *key, vlib_buffer_t *b, gbp_rule_t **rule, u32 *intra, u32 *sclass1, u32 *acl_match, u32 *rule_match, gbp_contract_error_t *err, gbp_contract_apply_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.
enum gbp_rule_action_t_ gbp_rule_action_t
vlib_put_next_frame(vm, node, next_index, 0)
Grouping of global data for the GBP source EPG classification feature.
dpo_id_t gu_dpo[GBP_POLICY_N_NODES][FIB_PROTOCOL_IP_MAX]
DPO of the load-balance object used to redirect.
static_always_inline gbp_policy_next_t gbp_policy_l2_feature_next(gbp_policy_main_t *gpm, vlib_buffer_t *b, const gbp_policy_type_t type)
const static_always_inline gbp_policy_dpo_t * gbp_classify_get_gpd(const ip4_address_t *ip4, const ip6_address_t *ip6, const u32 fib_index)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
An external interface maps directly to an oflex L3ExternalInterface.
A Group Based Policy Endpoint.
static dpo_proto_t ethertype_to_dpo_proto(u16 etype)
u8 * format_gbp_policy_trace(u8 *s, va_list *args)
#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).
Group Base Policy (GBP) defines:
static_always_inline gbp_endpoint_t * gbp_endpoint_find_itf(u32 sw_if_index)
static_always_inline dpo_proto_t gbp_classify_get_ip_address(const ethernet_header_t *eh0, const ip4_address_t **ip4, const ip6_address_t **ip6, const enum gbp_classify_get_ip_way way)
vl_api_fib_path_type_t type
gbp_policy_main_t gbp_policy_main
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)