FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
gbp_policy.c File Reference
+ Include dependency graph for gbp_policy.c:

Go to the source code of this file.

Data Structures

struct  gbp_policy_main_t_
 Grouping of global data for the GBP source EPG classification feature. More...
 
struct  gbp_policy_trace_t_
 per-packet trace data More...
 

Macros

#define foreach_gbp_policy   _(DENY, "deny")
 

Typedefs

typedef struct gbp_policy_main_t_ gbp_policy_main_t
 Grouping of global data for the GBP source EPG classification feature. More...
 
typedef struct gbp_policy_trace_t_ gbp_policy_trace_t
 per-packet trace data More...
 

Enumerations

enum  gbp_policy_error_t { GBP_POLICY_N_ERROR }
 
enum  gbp_policy_next_t { GBP_POLICY_N_NEXT, GBP_POLICY_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 u8 gbp_policy_is_ethertype_allowed (const gbp_contract_t *gc0, u16 ethertype)
 
static uword gbp_policy_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_port_based)
 
static uword gbp_policy_port (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword gbp_policy_mac (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_gbp_policy_trace (u8 *s, va_list *args)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_policy_port_node, gbp_policy_port)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_policy_mac_node, gbp_policy_mac)
 
static clib_error_tgbp_policy_init (vlib_main_t *vm)
 

Variables

static gbp_policy_main_t gbp_policy_main
 
static char * gbp_policy_error_strings []
 
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...
 

Macro Definition Documentation

◆ foreach_gbp_policy

#define foreach_gbp_policy   _(DENY, "deny")

Definition at line 34 of file gbp_policy.c.

Typedef Documentation

◆ gbp_policy_main_t

Grouping of global data for the GBP source EPG classification feature.

◆ gbp_policy_trace_t

per-packet trace data

Enumeration Type Documentation

◆ gbp_policy_error_t

Enumerator
GBP_POLICY_N_ERROR 

Definition at line 37 of file gbp_policy.c.

◆ gbp_policy_next_t

Enumerator
GBP_POLICY_N_NEXT 
GBP_POLICY_DROP 
GBP_POLICY_N_NEXT 

Definition at line 51 of file gbp_policy.c.

Function Documentation

◆ ethertype_to_dpo_proto()

static dpo_proto_t ethertype_to_dpo_proto ( u16  etype)
inlinestatic

Definition at line 72 of file gbp_policy.c.

+ Here is the caller graph for this function:

◆ format_gbp_policy_trace()

static u8* format_gbp_policy_trace ( u8 s,
va_list *  args 
)
static

Definition at line 356 of file gbp_policy.c.

+ Here is the call graph for this function:

◆ gbp_policy_init()

static clib_error_t* gbp_policy_init ( vlib_main_t vm)
static

Definition at line 403 of file gbp_policy.c.

+ Here is the call 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,
u8  is_port_based 
)
static

Definition at line 123 of file gbp_policy.c.

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

◆ gbp_policy_is_ethertype_allowed()

static u8 gbp_policy_is_ethertype_allowed ( const gbp_contract_t gc0,
u16  ethertype 
)
inlinestatic

Definition at line 110 of file gbp_policy.c.

+ Here is the caller graph for this function:

◆ gbp_policy_mac()

static uword gbp_policy_mac ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 348 of file gbp_policy.c.

+ Here is the call graph for this function:

◆ gbp_policy_port()

static uword gbp_policy_port ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 341 of file gbp_policy.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 88 of file gbp_policy.c.

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

◆ VLIB_NODE_FUNCTION_MULTIARCH() [1/2]

VLIB_NODE_FUNCTION_MULTIARCH ( gbp_policy_port_node  ,
gbp_policy_port   
)

◆ VLIB_NODE_FUNCTION_MULTIARCH() [2/2]

VLIB_NODE_FUNCTION_MULTIARCH ( gbp_policy_mac_node  ,
gbp_policy_mac   
)

Variable Documentation

◆ gbp_policy_error_strings

char* gbp_policy_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_gbp_policy
Definition: gbp_policy.c:34

Definition at line 45 of file gbp_policy.c.

◆ gbp_policy_mac_node

vlib_node_registration_t gbp_policy_mac_node
Initial value:
= {
.function = gbp_policy_mac,
.name = "gbp-policy-mac",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.sibling_of = "gbp-policy-port",
}
unsigned int u32
Definition: types.h:88
static uword gbp_policy_mac(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_policy.c:348
static u8 * format_gbp_policy_trace(u8 *s, va_list *args)
Definition: gbp_policy.c:356

(constructor) VLIB_REGISTER_NODE (gbp_policy_mac_node)

Definition at line 389 of file gbp_policy.c.

◆ gbp_policy_main

gbp_policy_main_t gbp_policy_main
static

Definition at line 32 of file gbp_policy.c.

◆ gbp_policy_port_node

vlib_node_registration_t gbp_policy_port_node
Initial value:
= {
.function = gbp_policy_port,
.name = "gbp-policy-port",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_trace,
.error_strings = gbp_policy_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes = {
[GBP_POLICY_NEXT_DENY] = "error-drop",
},
}
static uword gbp_policy_port(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_policy.c:341
static char * gbp_policy_error_strings[]
Definition: gbp_policy.c:45
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62
static u8 * format_gbp_policy_trace(u8 *s, va_list *args)
Definition: gbp_policy.c:356

(constructor) VLIB_REGISTER_NODE (gbp_policy_port_node)

Definition at line 370 of file gbp_policy.c.