FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
l2_vtr.h File Reference
+ Include dependency graph for l2_vtr.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vtr_config_t
 Per-interface vlan tag rewrite configuration There will be one instance of this struct for each sw_if_index for both input vtr and output vtr. More...
 
struct  ptr_config_t
 

Enumerations

enum  l2_vtr_op_t {
  L2_VTR_DISABLED, L2_VTR_PUSH_1, L2_VTR_PUSH_2, L2_VTR_POP_1,
  L2_VTR_POP_2, L2_VTR_TRANSLATE_1_1, L2_VTR_TRANSLATE_1_2, L2_VTR_TRANSLATE_2_1,
  L2_VTR_TRANSLATE_2_2
}
 

Functions

static u32 l2_vtr_process (vlib_buffer_t *b0, vtr_config_t *config)
 Perform the configured tag rewrite on the packet. More...
 
static u8 l2_efp_filter_process (vlib_buffer_t *b0, vtr_config_t *in_config)
 
static u32 l2_pbb_process (vlib_buffer_t *b0, ptr_config_t *config)
 
u32 l2pbb_configure (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u8 *b_dmac, u8 *b_smac, u16 b_vlanid, u32 i_sid, u16 vlan_outer_tag)
 
u32 l2vtr_configure (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u32 push_dot1q, u32 vtr_tag1, u32 vtr_tag2)
 Configure vtag tag rewrite on the given interface. More...
 
u32 l2vtr_get (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 *vtr_op, u32 *push_dot1q, u32 *vtr_tag1, u32 *vtr_tag2)
 Get vtag tag rewrite on the given interface. More...
 
u32 l2pbb_get (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 *vtr_op, u16 *outer_tag, ethernet_header_t *eth_hdr, u16 *b_vlanid, u32 *i_sid)
 Get pbb tag rewrite on the given interface. More...
 

Enumeration Type Documentation

◆ l2_vtr_op_t

Enumerator
L2_VTR_DISABLED 
L2_VTR_PUSH_1 
L2_VTR_PUSH_2 
L2_VTR_POP_1 
L2_VTR_POP_2 
L2_VTR_TRANSLATE_1_1 
L2_VTR_TRANSLATE_1_2 
L2_VTR_TRANSLATE_2_1 
L2_VTR_TRANSLATE_2_2 

Definition at line 28 of file l2_vtr.h.

Function Documentation

◆ l2_efp_filter_process()

static u8 l2_efp_filter_process ( vlib_buffer_t b0,
vtr_config_t in_config 
)
inlinestatic

Definition at line 142 of file l2_vtr.h.

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

◆ l2_pbb_process()

static u32 l2_pbb_process ( vlib_buffer_t b0,
ptr_config_t config 
)
inlinestatic

Definition at line 202 of file l2_vtr.h.

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

◆ l2_vtr_process()

static u32 l2_vtr_process ( vlib_buffer_t b0,
vtr_config_t config 
)
inlinestatic

Perform the configured tag rewrite on the packet.

Return 0 if ok, 1 if packet should be dropped (e.g. tried to pop too many tags)

Definition at line 76 of file l2_vtr.h.

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

◆ l2pbb_configure()

u32 l2pbb_configure ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32  vtr_op,
u8 b_dmac,
u8 b_smac,
u16  b_vlanid,
u32  i_sid,
u16  vlan_outer_tag 
)

Definition at line 54 of file l2_vtr.c.

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

◆ l2pbb_get()

u32 l2pbb_get ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32 vtr_op,
u16 outer_tag,
ethernet_header_t eth_hdr,
u16 b_vlanid,
u32 i_sid 
)

Get pbb tag rewrite on the given interface.

Return 1 if there is an error, 0 if ok

Definition at line 686 of file l2_vtr.c.

+ Here is the caller graph for this function:

◆ l2vtr_configure()

u32 l2vtr_configure ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32  vtr_op,
u32  push_dot1q,
u32  vtr_tag1,
u32  vtr_tag2 
)

Configure vtag tag rewrite on the given interface.

Return 1 if there is an error, 0 if ok

Definition at line 136 of file l2_vtr.c.

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

◆ l2vtr_get()

u32 l2vtr_get ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32 vtr_op,
u32 push_dot1q,
u32 vtr_tag1,
u32 vtr_tag2 
)

Get vtag tag rewrite on the given interface.

Return 1 if there is an error, 0 if ok

Definition at line 347 of file l2_vtr.c.

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