FD.io VPP  v19.04.4-rc0-5-ge88582fac
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_
 

Typedefs

typedef struct gbp_policy_dpo_trace_t_ gbp_policy_dpo_trace_t
 

Enumerations

enum  gbp_policy_dpo_error_t { GBP_POLICY_N_ERROR }
 
enum  gbp_policy_next_t { GBP_POLICY_DROP, GBP_POLICY_N_NEXT, GBP_POLICY_NEXT_DROP, GBP_POLICY_N_NEXT }
 

Functions

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, sclass_t sclass, u32 sw_if_index, dpo_id_t *dpo)
 
u8format_gbp_policy_dpo (u8 *s, va_list *ap)
 
static void gbp_policy_dpo_interpose (const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
 Interpose a policy DPO. More...
 
dpo_type_t gbp_policy_dpo_get_type (void)
 
static clib_error_tgbp_policy_dpo_module_init (vlib_main_t *vm)
 
static u32 gbp_rule_l3_redirect (const gbp_rule_t *gu, vlib_buffer_t *b0, int is_ip6)
 
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)
 
VLIB_NODE_FN() ip4_gbp_policy_dpo_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() ip6_gbp_policy_dpo_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

gbp_policy_dpo_tgbp_policy_dpo_pool
 DPO pool. More...
 
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]
 
static char * gbp_policy_dpo_error_strings []
 
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...
 

Typedef Documentation

◆ gbp_policy_dpo_trace_t

Enumeration Type Documentation

◆ gbp_policy_dpo_error_t

Enumerator
GBP_POLICY_N_ERROR 

Definition at line 220 of file gbp_policy_dpo.c.

◆ gbp_policy_next_t

Enumerator
GBP_POLICY_DROP 
GBP_POLICY_N_NEXT 
GBP_POLICY_NEXT_DROP 
GBP_POLICY_N_NEXT 

Definition at line 243 of file gbp_policy_dpo.c.

Function Documentation

◆ format_gbp_policy_dpo()

u8* format_gbp_policy_dpo ( u8 s,
va_list *  ap 
)

Definition at line 124 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ format_gbp_policy_dpo_trace()

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

Definition at line 457 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_policy_dpo_add_or_lock()

void gbp_policy_dpo_add_or_lock ( dpo_proto_t  dproto,
sclass_t  sclass,
u32  sw_if_index,
dpo_id_t dpo 
)

Definition at line 95 of file gbp_policy_dpo.c.

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

◆ gbp_policy_dpo_alloc()

static gbp_policy_dpo_t* gbp_policy_dpo_alloc ( void  )
static

Definition at line 37 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

◆ gbp_policy_dpo_get_from_dpo()

static gbp_policy_dpo_t* gbp_policy_dpo_get_from_dpo ( const dpo_id_t dpo)
inlinestatic

Definition at line 47 of file gbp_policy_dpo.c.

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

◆ gbp_policy_dpo_get_index()

static index_t gbp_policy_dpo_get_index ( gbp_policy_dpo_t gpd)
inlinestatic

Definition at line 55 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

◆ gbp_policy_dpo_get_type()

dpo_type_t gbp_policy_dpo_get_type ( void  )

Definition at line 203 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_get_urpf()

static u32 gbp_policy_dpo_get_urpf ( const dpo_id_t dpo)
static

Definition at line 85 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_policy_dpo_inline()

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 267 of file gbp_policy_dpo.c.

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

◆ gbp_policy_dpo_interpose()

static void gbp_policy_dpo_interpose ( const dpo_id_t original,
const dpo_id_t parent,
dpo_id_t clone 
)
static

Interpose a policy DPO.

Definition at line 145 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_policy_dpo_lock()

static void gbp_policy_dpo_lock ( dpo_id_t dpo)
static

Definition at line 61 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_policy_dpo_module_init()

static clib_error_t* gbp_policy_dpo_module_init ( vlib_main_t vm)
static

Definition at line 209 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_policy_dpo_unlock()

static void gbp_policy_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 70 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ gbp_rule_l3_redirect()

static u32 gbp_rule_l3_redirect ( const gbp_rule_t gu,
vlib_buffer_t b0,
int  is_ip6 
)
inlinestatic

Definition at line 250 of file gbp_policy_dpo.c.

+ Here is the caller graph for this function:

◆ ip4_gbp_policy_dpo_node()

VLIB_NODE_FN() ip4_gbp_policy_dpo_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 470 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

◆ ip6_gbp_policy_dpo_node()

VLIB_NODE_FN() ip6_gbp_policy_dpo_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 477 of file gbp_policy_dpo.c.

+ Here is the call graph for this function:

Variable Documentation

◆ gbp_policy_dpo_error_strings

char* gbp_policy_dpo_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_gbp_policy_error
Definition: gbp_contract.h:21

Definition at line 228 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_ip4_nodes

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

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 187 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_ip6_nodes

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

Definition at line 192 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_nodes

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 197 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_pool

gbp_policy_dpo_t* gbp_policy_dpo_pool

DPO pool.

Definition at line 29 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_type

dpo_type_t gbp_policy_dpo_type

DPO type registered for these GBP FWD.

Types exposed for the Data-plane.

Definition at line 34 of file gbp_policy_dpo.c.

◆ gbp_policy_dpo_vft

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,
.dv_mk_interpose = gbp_policy_dpo_interpose,
}
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)
static void gbp_policy_dpo_interpose(const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
Interpose a policy DPO.

Definition at line 172 of file gbp_policy_dpo.c.

◆ ip4_gbp_policy_dpo_node

vlib_node_registration_t ip4_gbp_policy_dpo_node
Initial value:
= {
.name = "ip4-gbp-policy-dpo",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_dpo_trace,
.error_strings = gbp_policy_dpo_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes =
{
[GBP_POLICY_DROP] = "ip4-drop",
}
}
static char * gbp_policy_dpo_error_strings[]
static u8 * format_gbp_policy_dpo_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62

(constructor) VLIB_REGISTER_NODE (ip4_gbp_policy_dpo_node)

Definition at line 485 of file gbp_policy_dpo.c.

◆ ip6_gbp_policy_dpo_node

vlib_node_registration_t ip6_gbp_policy_dpo_node
Initial value:
= {
.name = "ip6-gbp-policy-dpo",
.vector_size = sizeof (u32),
.format_trace = format_gbp_policy_dpo_trace,
.error_strings = gbp_policy_dpo_error_strings,
.n_next_nodes = GBP_POLICY_N_NEXT,
.next_nodes =
{
[GBP_POLICY_DROP] = "ip6-drop",
}
}
static char * gbp_policy_dpo_error_strings[]
static u8 * format_gbp_policy_dpo_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:62

(constructor) VLIB_REGISTER_NODE (ip6_gbp_policy_dpo_node)

Definition at line 499 of file gbp_policy_dpo.c.