FD.io VPP  v18.01-8-g0eacf49
Vector Packet Processing
l2_bridge_dpo.c File Reference
+ Include dependency graph for l2_bridge_dpo.c:

Go to the source code of this file.

Data Structures

struct  l2_bridge_dpo_trace_t_
 Interface DPO trace data. More...
 

Typedefs

typedef struct l2_bridge_dpo_trace_t_ l2_bridge_dpo_trace_t
 Interface DPO trace data. More...
 
typedef enum l2_bridge_dpo_next_t_ l2_bridge_dpo_next_t
 

Enumerations

enum  l2_bridge_dpo_next_t_ { L2_BRIDGE_DPO_DROP = 0, L2_BRIDGE_DPO_OUTPUT = 1 }
 

Functions

static l2_bridge_dpo_tl2_bridge_dpo_alloc (void)
 
static l2_bridge_dpo_tl2_bridge_dpo_get_from_dpo (const dpo_id_t *dpo)
 
static index_t l2_bridge_dpo_get_index (l2_bridge_dpo_t *l2b)
 
static void l2_bridge_dpo_lock (dpo_id_t *dpo)
 
static void l2_bridge_dpo_unlock (dpo_id_t *dpo)
 
void l2_bridge_dpo_add_or_lock (u32 sw_if_index, dpo_id_t *dpo)
 
static clib_error_tl2_bridge_dpo_interface_state_change (vnet_main_t *vnm, u32 sw_if_index, u32 flags)
 
 VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION (l2_bridge_dpo_interface_state_change)
 
static clib_error_tl2_bridge_dpo_hw_interface_state_change (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 Registered callback for HW interface state changes. More...
 
 VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (l2_bridge_dpo_hw_interface_state_change)
 
static clib_error_tl2_bridge_dpo_interface_delete (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (l2_bridge_dpo_interface_delete)
 
u8format_l2_bridge_dpo (u8 *s, va_list *ap)
 
static void l2_bridge_dpo_mem_show (void)
 
void l2_bridge_dpo_module_init (void)
 
static uword l2_bridge_dpo_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_l2_bridge_dpo_trace (u8 *s, va_list *args)
 
static uword l2_bridge_dpo_l2 (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

static index_tl2_bridge_dpo_db
 
static const dpo_vft_t l2_bridge_dpo_vft
 
static const char *const l2_bridge_dpo_l2_nodes []
 The per-protocol VLIB graph nodes that are assigned to a glean object. More...
 
static const char *const *const l2_bridge_dpo_nodes [DPO_PROTO_NUM]
 
vlib_node_registration_t l2_bridge_dpo_l2_node
 (constructor) VLIB_REGISTER_NODE (l2_bridge_dpo_l2_node) More...
 

Typedef Documentation

Interface DPO trace data.

Enumeration Type Documentation

Enumerator
L2_BRIDGE_DPO_DROP 
L2_BRIDGE_DPO_OUTPUT 

Definition at line 211 of file l2_bridge_dpo.c.

Function Documentation

u8* format_l2_bridge_dpo ( u8 s,
va_list *  ap 
)

Definition at line 147 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

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

Definition at line 340 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

void l2_bridge_dpo_add_or_lock ( u32  sw_if_index,
dpo_id_t dpo 
)

Definition at line 81 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static l2_bridge_dpo_t* l2_bridge_dpo_alloc ( void  )
static

Definition at line 27 of file l2_bridge_dpo.c.

+ Here is the caller graph for this function:

static l2_bridge_dpo_t* l2_bridge_dpo_get_from_dpo ( const dpo_id_t dpo)
inlinestatic

Definition at line 37 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static index_t l2_bridge_dpo_get_index ( l2_bridge_dpo_t l2b)
inlinestatic

Definition at line 45 of file l2_bridge_dpo.c.

+ Here is the caller graph for this function:

static clib_error_t* l2_bridge_dpo_hw_interface_state_change ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Registered callback for HW interface state changes.

Definition at line 125 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

static uword l2_bridge_dpo_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Definition at line 218 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* l2_bridge_dpo_interface_delete ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 136 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

static clib_error_t* l2_bridge_dpo_interface_state_change ( vnet_main_t vnm,
u32  sw_if_index,
u32  flags 
)
static

Definition at line 109 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

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

Definition at line 353 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

static void l2_bridge_dpo_lock ( dpo_id_t dpo)
static

Definition at line 51 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

static void l2_bridge_dpo_mem_show ( void  )
static

Definition at line 161 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

void l2_bridge_dpo_module_init ( void  )

Definition at line 196 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void l2_bridge_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 60 of file l2_bridge_dpo.c.

+ Here is the call graph for this function:

VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION ( l2_bridge_dpo_hw_interface_state_change  )

+ Here is the caller graph for this function:

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( l2_bridge_dpo_interface_delete  )

+ Here is the caller graph for this function:

VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION ( l2_bridge_dpo_interface_state_change  )

+ Here is the caller graph for this function:

Variable Documentation

index_t* l2_bridge_dpo_db
static

Definition at line 24 of file l2_bridge_dpo.c.

vlib_node_registration_t l2_bridge_dpo_l2_node
Initial value:
= {
.function = l2_bridge_dpo_l2,
.name = "l2-bridge-dpo",
.vector_size = sizeof (u32),
.format_trace = format_l2_bridge_dpo_trace,
.n_next_nodes = 2,
.next_nodes = {
[L2_BRIDGE_DPO_DROP] = "error-drop",
[L2_BRIDGE_DPO_OUTPUT] = "l2-output",
},
}
static u8 * format_l2_bridge_dpo_trace(u8 *s, va_list *args)
static uword l2_bridge_dpo_l2(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (l2_bridge_dpo_l2_node)

Definition at line 361 of file l2_bridge_dpo.c.

const char* const l2_bridge_dpo_l2_nodes[]
static
Initial value:
=
{
"l2-bridge-dpo",
}
#define NULL
Definition: clib.h:55

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 184 of file l2_bridge_dpo.c.

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

Definition at line 190 of file l2_bridge_dpo.c.

const dpo_vft_t l2_bridge_dpo_vft
static
Initial value:
= {
.dv_lock = l2_bridge_dpo_lock,
.dv_unlock = l2_bridge_dpo_unlock,
.dv_format = format_l2_bridge_dpo,
.dv_mem_show = l2_bridge_dpo_mem_show,
}
u8 * format_l2_bridge_dpo(u8 *s, va_list *ap)
static void l2_bridge_dpo_mem_show(void)
static void l2_bridge_dpo_unlock(dpo_id_t *dpo)
Definition: l2_bridge_dpo.c:60
static void l2_bridge_dpo_lock(dpo_id_t *dpo)
Definition: l2_bridge_dpo.c:51

Definition at line 170 of file l2_bridge_dpo.c.