FD.io VPP  v19.01.2-3-gf61a1a8
Vector Packet Processing
gbp_classify.c File Reference
+ Include dependency graph for gbp_classify.c:

Go to the source code of this file.

Data Structures

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

Macros

#define GBP_SRC_N_CLASSIFY   (GBP_SRC_CLASSIFY_LPM + 1)
 

Typedefs

typedef enum gbp_src_classify_type_t_ gbp_src_classify_type_t
 
typedef struct gbp_src_classify_main_t_ gbp_src_classify_main_t
 Grouping of global data for the GBP source EPG classification feature. More...
 
typedef struct gbp_classify_trace_t_ gbp_classify_trace_t
 per-packet trace data More...
 
typedef enum gbp_lpm_classify_next_t_ gbp_lpm_classify_next_t
 

Enumerations

enum  gbp_src_classify_type_t_ { GBP_SRC_CLASSIFY_NULL, GBP_SRC_CLASSIFY_PORT, GBP_SRC_CLASSIFY_LPM }
 
enum  gbp_lpm_classify_next_t_ { GPB_LPM_CLASSIFY_DROP }
 

Functions

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)
 
static uword gbp_src_classify (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword gbp_null_classify (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
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)
 
static u8format_gbp_classify_trace (u8 *s, va_list *args)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_null_classify_node, gbp_null_classify)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_src_classify_node, gbp_src_classify)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_ip4_src_classify_node, gbp_ip4_src_classify)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_ip6_src_classify_node, gbp_ip6_src_classify)
 
 VNET_FEATURE_INIT (gbp_ip4_src_classify_feat_node, static)
 
 VNET_FEATURE_INIT (gbp_ip6_src_classify_feat_node, static)
 
static dpo_proto_t ethertype_to_dpo_proto (const ethernet_header_t *eh0)
 
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 uword gbp_ip4_lpm_classify (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword gbp_ip6_lpm_classify (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword gbp_l2_lpm_classify (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_ip4_lpm_classify_node, gbp_ip4_lpm_classify)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_ip6_lpm_classify_node, gbp_ip6_lpm_classify)
 
 VLIB_NODE_FUNCTION_MULTIARCH (gbp_l2_lpm_classify_node, gbp_l2_lpm_classify)
 
 VNET_FEATURE_INIT (gbp_ip4_lpm_classify_feat_node, static)
 
 VNET_FEATURE_INIT (gbp_ip6_lpm_classify_feat_node, static)
 
static clib_error_tgbp_src_classify_init (vlib_main_t *vm)
 

Variables

static gbp_src_classify_main_t gbp_src_classify_main
 
vlib_node_registration_t gbp_null_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_null_classify_node) More...
 
vlib_node_registration_t gbp_src_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_src_classify_node) More...
 
vlib_node_registration_t gbp_ip4_src_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_ip4_src_classify_node) More...
 
vlib_node_registration_t gbp_ip6_src_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_ip6_src_classify_node) More...
 
vlib_node_registration_t gbp_ip4_lpm_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_ip4_lpm_classify_node) More...
 
vlib_node_registration_t gbp_ip6_lpm_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_ip6_lpm_classify_node) More...
 
vlib_node_registration_t gbp_l2_lpm_classify_node
 (constructor) VLIB_REGISTER_NODE (gbp_l2_lpm_classify_node) More...
 

Macro Definition Documentation

#define GBP_SRC_N_CLASSIFY   (GBP_SRC_CLASSIFY_LPM + 1)

Definition at line 36 of file gbp_classify.c.

Typedef Documentation

per-packet trace data

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

Enumeration Type Documentation

Enumerator
GPB_LPM_CLASSIFY_DROP 

Definition at line 308 of file gbp_classify.c.

Enumerator
GBP_SRC_CLASSIFY_NULL 
GBP_SRC_CLASSIFY_PORT 
GBP_SRC_CLASSIFY_LPM 

Definition at line 29 of file gbp_classify.c.

Function Documentation

static dpo_proto_t ethertype_to_dpo_proto ( const ethernet_header_t eh0)
inlinestatic

Definition at line 314 of file gbp_classify.c.

+ Here is the caller graph for this function:

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

Definition at line 223 of file gbp_classify.c.

+ Here is the call graph for this function:

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 
)
inlinestatic

Definition at line 64 of file gbp_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 494 of file gbp_classify.c.

+ Here is the call graph for this function:

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

Definition at line 205 of file gbp_classify.c.

+ Here is the call graph for this function:

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

Definition at line 501 of file gbp_classify.c.

+ Here is the call graph for this function:

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

Definition at line 213 of file gbp_classify.c.

+ Here is the call graph for this function:

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

Definition at line 508 of file gbp_classify.c.

+ Here is the call graph for this function:

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 
)
inlinestatic

Definition at line 347 of file gbp_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 197 of file gbp_classify.c.

+ Here is the call graph for this function:

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

Definition at line 189 of file gbp_classify.c.

+ Here is the call graph for this function:

static clib_error_t* gbp_src_classify_init ( vlib_main_t vm)
static

Definition at line 579 of file gbp_classify.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( gbp_null_classify_node  ,
gbp_null_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_src_classify_node  ,
gbp_src_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_ip4_src_classify_node  ,
gbp_ip4_src_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_ip6_src_classify_node  ,
gbp_ip6_src_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_ip4_lpm_classify_node  ,
gbp_ip4_lpm_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_ip6_lpm_classify_node  ,
gbp_ip6_lpm_classify   
)
VLIB_NODE_FUNCTION_MULTIARCH ( gbp_l2_lpm_classify_node  ,
gbp_l2_lpm_classify   
)
VNET_FEATURE_INIT ( gbp_ip4_src_classify_feat_node  ,
static   
)
VNET_FEATURE_INIT ( gbp_ip6_src_classify_feat_node  ,
static   
)
VNET_FEATURE_INIT ( gbp_ip4_lpm_classify_feat_node  ,
static   
)
VNET_FEATURE_INIT ( gbp_ip6_lpm_classify_feat_node  ,
static   
)

Variable Documentation

vlib_node_registration_t gbp_ip4_lpm_classify_node
Initial value:
= {
.function = gbp_ip4_lpm_classify,
.name = "ip4-gbp-lpm-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[GPB_LPM_CLASSIFY_DROP] = "ip4-drop"
},
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
unsigned int u32
Definition: types.h:88
static uword gbp_ip4_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:494

(constructor) VLIB_REGISTER_NODE (gbp_ip4_lpm_classify_node)

Definition at line 515 of file gbp_classify.c.

vlib_node_registration_t gbp_ip4_src_classify_node
Initial value:
= {
.function = gbp_ip4_src_classify,
.name = "ip4-gbp-src-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-lookup"
},
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
unsigned int u32
Definition: types.h:88
static uword gbp_ip4_src_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:205

(constructor) VLIB_REGISTER_NODE (gbp_ip4_src_classify_node)

Definition at line 261 of file gbp_classify.c.

vlib_node_registration_t gbp_ip6_lpm_classify_node
Initial value:
= {
.function = gbp_ip6_lpm_classify,
.name = "ip6-gbp-lpm-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[GPB_LPM_CLASSIFY_DROP] = "ip6-drop"
},
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
unsigned int u32
Definition: types.h:88
static uword gbp_ip6_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:501

(constructor) VLIB_REGISTER_NODE (gbp_ip6_lpm_classify_node)

Definition at line 531 of file gbp_classify.c.

vlib_node_registration_t gbp_ip6_src_classify_node
Initial value:
= {
.function = gbp_ip6_src_classify,
.name = "ip6-gbp-src-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-lookup"
},
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
unsigned int u32
Definition: types.h:88
static uword gbp_ip6_src_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:213

(constructor) VLIB_REGISTER_NODE (gbp_ip6_src_classify_node)

Definition at line 277 of file gbp_classify.c.

vlib_node_registration_t gbp_l2_lpm_classify_node
Initial value:
= {
.function = gbp_l2_lpm_classify,
.name = "l2-gbp-lpm-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 1,
.next_nodes = {
[GPB_LPM_CLASSIFY_DROP] = "error-drop"
},
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
unsigned int u32
Definition: types.h:88
static uword gbp_l2_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:508

(constructor) VLIB_REGISTER_NODE (gbp_l2_lpm_classify_node)

Definition at line 547 of file gbp_classify.c.

vlib_node_registration_t gbp_null_classify_node
Initial value:
= {
.function = gbp_null_classify,
.name = "gbp-null-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 0,
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
static uword gbp_null_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:197
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (gbp_null_classify_node)

Definition at line 235 of file gbp_classify.c.

gbp_src_classify_main_t gbp_src_classify_main
static

Definition at line 49 of file gbp_classify.c.

vlib_node_registration_t gbp_src_classify_node
Initial value:
= {
.function = gbp_src_classify,
.name = "gbp-src-classify",
.vector_size = sizeof (u32),
.format_trace = format_gbp_classify_trace,
.n_errors = 0,
.n_next_nodes = 0,
}
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
Definition: gbp_classify.c:223
static uword gbp_src_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: gbp_classify.c:189
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (gbp_src_classify_node)

Definition at line 248 of file gbp_classify.c.