FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
gbp_policy_dpo.c File Reference
+ Include dependency graph for gbp_policy_dpo.c:

Go to the source code of this file.

Data Structures

struct  gbp_policy_dpo_trace_t_
 
struct  gbp_classify_trace_t_
 per-packet trace data More...
 

Typedefs

typedef struct gbp_policy_dpo_trace_t_ gbp_policy_dpo_trace_t
 
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_policy_next_t { GBP_POLICY_N_NEXT, GBP_POLICY_DROP, GBP_POLICY_N_NEXT }
 
enum  gbp_lpm_classify_next_t_ { GPB_LPM_CLASSIFY_DROP }
 

Functions

static gbp_policy_dpo_tgbp_policy_dpo_get_i (index_t index)
 
gbp_policy_dpo_tgbp_policy_dpo_get (index_t index)
 
static gbp_policy_dpo_tgbp_policy_dpo_alloc (void)
 
static gbp_policy_dpo_tgbp_policy_dpo_get_from_dpo (const dpo_id_t *dpo)
 
static index_t gbp_policy_dpo_get_index (gbp_policy_dpo_t *gpd)
 
static void gbp_policy_dpo_lock (dpo_id_t *dpo)
 
static void gbp_policy_dpo_unlock (dpo_id_t *dpo)
 
static u32 gbp_policy_dpo_get_urpf (const dpo_id_t *dpo)
 
void gbp_policy_dpo_add_or_lock (dpo_proto_t dproto, epg_id_t epg, u32 sw_if_index, dpo_id_t *dpo)
 
u8format_gbp_policy_dpo (u8 *s, va_list *ap)
 
dpo_type_t gbp_policy_dpo_get_type (void)
 
static clib_error_tgbp_policy_dpo_module_init (vlib_main_t *vm)
 
static uword gbp_policy_dpo_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_ip6)
 
static u8format_gbp_policy_dpo_trace (u8 *s, va_list *args)
 
static uword ip4_gbp_policy_dpo (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword ip6_gbp_policy_dpo (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword gbp_lpm_classify_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, fib_protocol_t fproto)
 
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 u8format_gbp_classify_trace (u8 *s, va_list *args)
 
 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)
 
 VNET_FEATURE_INIT (gbp_ip4_lpm_classify_feat_node, static)
 
 VNET_FEATURE_INIT (gbp_ip6_lpm_classify_feat_node, static)
 

Variables

static gbp_policy_dpo_tgbp_policy_dpo_pool
 DPO pool. More...
 
static dpo_type_t gbp_policy_dpo_type
 DPO type registered for these GBP FWD. More...
 
static const dpo_vft_t gbp_policy_dpo_vft
 
static const char *const gbp_policy_dpo_ip4_nodes []
 The per-protocol VLIB graph nodes that are assigned to a glean object. More...
 
static const char *const gbp_policy_dpo_ip6_nodes []
 
static const char *const *const gbp_policy_dpo_nodes [DPO_PROTO_NUM]
 
vlib_node_registration_t ip4_gbp_policy_dpo_node
 (constructor) VLIB_REGISTER_NODE (ip4_gbp_policy_dpo_node) More...
 
vlib_node_registration_t ip6_gbp_policy_dpo_node
 (constructor) VLIB_REGISTER_NODE (ip6_gbp_policy_dpo_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...
 

Typedef Documentation

per-packet trace data

Enumeration Type Documentation

Enumerator
GPB_LPM_CLASSIFY_DROP 

Definition at line 385 of file gbp_policy_dpo.c.

Enumerator
GBP_POLICY_N_NEXT 
GBP_POLICY_DROP 
GBP_POLICY_N_NEXT 

Definition at line 200 of file gbp_policy_dpo.c.

Function Documentation

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

Definition at line 502 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

u8* format_gbp_policy_dpo ( u8 s,
va_list *  ap 
)

Definition at line 130 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

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

Definition at line 322 of file gbp_policy_dpo.c.

+ Here is the call 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 487 of file gbp_policy_dpo.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 494 of file gbp_policy_dpo.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,
fib_protocol_t  fproto 
)
inlinestatic

Definition at line 394 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_policy_dpo_add_or_lock ( dpo_proto_t  dproto,
epg_id_t  epg,
u32  sw_if_index,
dpo_id_t dpo 
)

Definition at line 106 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_policy_dpo_t* gbp_policy_dpo_alloc ( void  )
static

Definition at line 48 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

gbp_policy_dpo_t* gbp_policy_dpo_get ( index_t  index)

Definition at line 42 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_policy_dpo_t* gbp_policy_dpo_get_from_dpo ( const dpo_id_t dpo)
inlinestatic

Definition at line 58 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_policy_dpo_t* gbp_policy_dpo_get_i ( index_t  index)
inlinestatic

Definition at line 36 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

static index_t gbp_policy_dpo_get_index ( gbp_policy_dpo_t gpd)
inlinestatic

Definition at line 66 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

dpo_type_t gbp_policy_dpo_get_type ( void  )

Definition at line 177 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

static u32 gbp_policy_dpo_get_urpf ( const dpo_id_t dpo)
static

Definition at line 96 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

static uword gbp_policy_dpo_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  is_ip6 
)
inlinestatic

Definition at line 207 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gbp_policy_dpo_lock ( dpo_id_t dpo)
static

Definition at line 72 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

static clib_error_t* gbp_policy_dpo_module_init ( vlib_main_t vm)
static

Definition at line 183 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

static void gbp_policy_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 81 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

static uword ip4_gbp_policy_dpo ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 335 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

static uword ip6_gbp_policy_dpo ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 342 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

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   
)
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"
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)
static uword gbp_ip4_lpm_classify(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (gbp_ip4_lpm_classify_node)

Definition at line 514 of file gbp_policy_dpo.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"
},
}
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)
static u8 * format_gbp_classify_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (gbp_ip6_lpm_classify_node)

Definition at line 530 of file gbp_policy_dpo.c.

const char* const gbp_policy_dpo_ip4_nodes[]
static
Initial value:
= {
"ip4-gbp-policy-dpo",
}
#define NULL
Definition: clib.h:57

The per-protocol VLIB graph nodes that are assigned to a glean object.

this means that these graph nodes are ones from which a glean is the parent object in the DPO-graph.

Definition at line 161 of file gbp_policy_dpo.c.

const char* const gbp_policy_dpo_ip6_nodes[]
static
Initial value:
= {
"ip6-gbp-policy-dpo",
}
#define NULL
Definition: clib.h:57

Definition at line 166 of file gbp_policy_dpo.c.

const char* const* const gbp_policy_dpo_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}
static const char *const gbp_policy_dpo_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a glean object.
static const char *const gbp_policy_dpo_ip6_nodes[]

Definition at line 171 of file gbp_policy_dpo.c.

gbp_policy_dpo_t* gbp_policy_dpo_pool
static

DPO pool.

Definition at line 28 of file gbp_policy_dpo.c.

dpo_type_t gbp_policy_dpo_type
static

DPO type registered for these GBP FWD.

Definition at line 33 of file gbp_policy_dpo.c.

const dpo_vft_t gbp_policy_dpo_vft
static
Initial value:
= {
.dv_lock = gbp_policy_dpo_lock,
.dv_unlock = gbp_policy_dpo_unlock,
.dv_format = format_gbp_policy_dpo,
.dv_get_urpf = gbp_policy_dpo_get_urpf,
}
u8 * format_gbp_policy_dpo(u8 *s, va_list *ap)
static u32 gbp_policy_dpo_get_urpf(const dpo_id_t *dpo)
static void gbp_policy_dpo_lock(dpo_id_t *dpo)
static void gbp_policy_dpo_unlock(dpo_id_t *dpo)

Definition at line 147 of file gbp_policy_dpo.c.

vlib_node_registration_t ip4_gbp_policy_dpo_node
Initial value:
= {
.function = ip4_gbp_policy_dpo,
.name = "ip4-gbp-policy-dpo",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_dpo_trace,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes =
{
[GBP_POLICY_DROP] = "ip4-drop",
}
}
static uword ip4_gbp_policy_dpo(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
static u8 * format_gbp_policy_dpo_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (ip4_gbp_policy_dpo_node)

Definition at line 349 of file gbp_policy_dpo.c.

vlib_node_registration_t ip6_gbp_policy_dpo_node
Initial value:
= {
.function = ip6_gbp_policy_dpo,
.name = "ip6-gbp-policy-dpo",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_dpo_trace,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes =
{
[GBP_POLICY_DROP] = "ip6-drop",
}
}
static u8 * format_gbp_policy_dpo_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
static uword ip6_gbp_policy_dpo(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)

(constructor) VLIB_REGISTER_NODE (ip6_gbp_policy_dpo_node)

Definition at line 360 of file gbp_policy_dpo.c.