FD.io VPP  v18.07-rc0-415-g6c78436
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

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 27 of file l2_vtr.h.

Function Documentation

static u8 l2_efp_filter_process ( vlib_buffer_t b0,
vtr_config_t in_config 
)
inlinestatic

Definition at line 141 of file l2_vtr.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 l2_pbb_process ( vlib_buffer_t b0,
ptr_config_t config 
)
inlinestatic

Definition at line 201 of file l2_vtr.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 75 of file l2_vtr.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

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:

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:

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: