FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
gbp_policy_node.c File Reference
+ Include dependency graph for gbp_policy_node.c:

Go to the source code of this file.

Enumerations

enum  gbp_policy_next_t { GBP_POLICY_DROP, GBP_POLICY_N_NEXT, GBP_POLICY_NEXT_DROP, GBP_POLICY_N_NEXT }
 

Functions

static dpo_proto_t ethertype_to_dpo_proto (u16 etype)
 
static u32 gbp_rule_l2_redirect (const gbp_rule_t *gu, vlib_buffer_t *b0)
 
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)
 
static uword gbp_policy_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, const gbp_policy_type_t type)
 
VLIB_NODE_FN() gbp_policy_port_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gbp_policy_mac_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() gbp_policy_lpm_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t gbp_policy_port_node
 (constructor) VLIB_REGISTER_NODE (gbp_policy_port_node) More...
 
vlib_node_registration_t gbp_policy_mac_node
 (constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node) More...
 
vlib_node_registration_t gbp_policy_lpm_node
 (constructor) VLIB_REGISTER_NODE (gbp_policy_lpm_node) More...
 

Enumeration Type Documentation

◆ gbp_policy_next_t

Enumerator
GBP_POLICY_DROP 
GBP_POLICY_N_NEXT 
GBP_POLICY_NEXT_DROP 
GBP_POLICY_N_NEXT 

Definition at line 27 of file gbp_policy_node.c.

Function Documentation

◆ ethertype_to_dpo_proto()

static dpo_proto_t ethertype_to_dpo_proto ( u16  etype)
inlinestatic

Definition at line 34 of file gbp_policy_node.c.

+ Here is the caller graph for this function:

◆ gbp_policy_inline()

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

Definition at line 96 of file gbp_policy_node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_policy_l2_feature_next()

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 
)

Definition at line 72 of file gbp_policy_node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gbp_policy_lpm_node()

VLIB_NODE_FN() gbp_policy_lpm_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 280 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_policy_mac_node()

VLIB_NODE_FN() gbp_policy_mac_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 273 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_policy_port_node()

VLIB_NODE_FN() gbp_policy_port_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 266 of file gbp_policy_node.c.

+ Here is the call graph for this function:

◆ gbp_rule_l2_redirect()

static u32 gbp_rule_l2_redirect ( const gbp_rule_t gu,
vlib_buffer_t b0 
)
inlinestatic

Definition at line 50 of file gbp_policy_node.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ gbp_policy_lpm_node

vlib_node_registration_t gbp_policy_lpm_node
Initial value:
= {
.name = "gbp-policy-lpm",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_contract_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (gbp_policy_lpm_node)

Definition at line 318 of file gbp_policy_node.c.

◆ gbp_policy_mac_node

vlib_node_registration_t gbp_policy_mac_node
Initial value:
= {
.name = "gbp-policy-mac",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_contract_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node)

Definition at line 303 of file gbp_policy_node.c.

◆ gbp_policy_port_node

vlib_node_registration_t gbp_policy_port_node
Initial value:
= {
.name = "gbp-policy-port",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_contract_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (gbp_policy_port_node)

Definition at line 288 of file gbp_policy_node.c.

gbp_contract_error_strings
char * gbp_contract_error_strings[]
Definition: gbp_contract.c:27
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
GBP_POLICY_N_NEXT
@ GBP_POLICY_N_NEXT
Definition: gbp_policy_node.c:30
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
u32
unsigned int u32
Definition: types.h:88
GBP_POLICY_NEXT_DROP
@ GBP_POLICY_NEXT_DROP
Definition: gbp_policy_node.c:29
format_gbp_policy_trace
u8 * format_gbp_policy_trace(u8 *s, va_list *args)
Definition: gbp_policy.c:24
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123