FD.io VPP  v16.12-rc0-308-g931be3a
Vector Packet Processing
l2_input.h File Reference
+ Include dependency graph for l2_input.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  l2_input_config_t
 
struct  l2input_main_t
 

Macros

#define L2INPUT_BVI   ((u32) (~0-1))
 
#define foreach_l2input_feat
 
#define IP4_FEAT_MASK
 Masks for eliminating features that do not apply to a packet. More...
 
#define IP6_FEAT_MASK
 
#define IP_UDP_TCP_FEAT_MASK
 
#define MPLS_FEAT_MASK
 
#define MODE_L3   0
 
#define MODE_L2_BRIDGE   1
 
#define MODE_L2_XC   2
 
#define MODE_L2_CLASSIFY   3
 
#define MODE_ERROR_ETH   1
 
#define MODE_ERROR_BVI_DEF   2
 

Enumerations

enum  l2input_feat_t { L2INPUT_N_FEAT }
 
enum  l2input_feat_masks_t { foreach_l2input_feat }
 

Functions

static_always_inline l2_bridge_domain_tl2input_bd_config_from_index (l2input_main_t *l2im, u32 bd_index)
 
char ** l2input_get_feat_names (void)
 Return an array of strings containing graph node names of each feature. More...
 
static_always_inline u8 bd_feature_flood (l2_bridge_domain_t *bd_config)
 
static_always_inline u8 bd_feature_uu_flood (l2_bridge_domain_t *bd_config)
 
static_always_inline u8 bd_feature_forward (l2_bridge_domain_t *bd_config)
 
static_always_inline u8 bd_feature_learn (l2_bridge_domain_t *bd_config)
 
static_always_inline u8 bd_feature_arp_term (l2_bridge_domain_t *bd_config)
 
l2_input_config_tl2input_intf_config (u32 sw_if_index)
 Get a pointer to the config for the given interface. More...
 
u32 l2input_intf_bitmap_enable (u32 sw_if_index, u32 feature_bitmap, u32 enable)
 Enable (or disable) the feature in the bitmap for the given interface. More...
 
u32 l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value)
 
u32 set_int_l2_mode (vlib_main_t *vm, vnet_main_t *vnet_main, u32 mode, u32 sw_if_index, u32 bd_index, u32 bvi, u32 shg, u32 xc_sw_if_index)
 Set the subinterface to run in l2 or l3 mode. More...
 
static void vnet_update_l2_len (vlib_buffer_t *b)
 
static u32 vnet_l2_compute_flow_hash (vlib_buffer_t *b)
 

Variables

l2input_main_t l2input_main
 
vlib_node_registration_t l2input_node
 (constructor) VLIB_REGISTER_NODE (l2input_node) More...
 

Macro Definition Documentation

#define foreach_l2input_feat
Value:
_(DROP, "feature-bitmap-drop") \
_(XCONNECT, "l2-output") \
_(IPIW, "feature-bitmap-drop") \
_(FLOOD, "l2-flood") \
_(ARP_TERM, "arp-term-l2bd") \
_(UU_FLOOD, "l2-flood") \
_(FWD, "l2-fwd") \
_(RW, "l2-rw") \
_(LEARN, "l2-learn") \
_(VTR, "l2-input-vtr") \
_(VPATH, "vpath-input-l2") \
_(CTRL_PKT, "feature-bitmap-drop") \
_(L2PT, "feature-bitmap-drop") \
_(IGMP_SNOOP, "feature-bitmap-drop") \
_(MLD_SNOOP, "feature-bitmap-drop") \
_(DHCP_SNOOP, "feature-bitmap-drop") \
_(DAI, "feature-bitmap-drop") \
_(IPSG, "feature-bitmap-drop") \
_(ACL, "l2-input-acl") \
_(QOS, "feature-bitmap-drop") \
_(CFM, "feature-bitmap-drop") \
_(SPAN, "feature-bitmap-drop") \
_(POLICER_CLAS, "l2-policer-classify") \
_(INPUT_CLASSIFY, "l2-input-classify")
DROP
Definition: error.def:41

Definition at line 95 of file l2_input.h.

#define IP4_FEAT_MASK
Value:
~(L2INPUT_FEAT_CTRL_PKT | \
L2INPUT_FEAT_MLD_SNOOP | \
L2INPUT_FEAT_L2PT | \
L2INPUT_FEAT_CFM | \
L2INPUT_FEAT_DAI)

Masks for eliminating features that do not apply to a packet.

Definition at line 178 of file l2_input.h.

#define IP6_FEAT_MASK
Value:
~(L2INPUT_FEAT_CTRL_PKT | \
L2INPUT_FEAT_IGMP_SNOOP | \
L2INPUT_FEAT_L2PT | \
L2INPUT_FEAT_CFM | \
L2INPUT_FEAT_DAI)

Definition at line 184 of file l2_input.h.

#define IP_UDP_TCP_FEAT_MASK
Value:
~(L2INPUT_FEAT_CTRL_PKT | \
L2INPUT_FEAT_L2PT | \
L2INPUT_FEAT_IGMP_SNOOP | \
L2INPUT_FEAT_MLD_SNOOP | \
L2INPUT_FEAT_DHCP_SNOOP | \
L2INPUT_FEAT_CFM | \
L2INPUT_FEAT_DAI)

Definition at line 190 of file l2_input.h.

#define L2INPUT_BVI   ((u32) (~0-1))

Definition at line 90 of file l2_input.h.

#define MODE_ERROR_BVI_DEF   2

Definition at line 224 of file l2_input.h.

#define MODE_ERROR_ETH   1

Definition at line 223 of file l2_input.h.

#define MODE_L2_BRIDGE   1

Definition at line 219 of file l2_input.h.

#define MODE_L2_CLASSIFY   3

Definition at line 221 of file l2_input.h.

#define MODE_L2_XC   2

Definition at line 220 of file l2_input.h.

#define MODE_L3   0

Definition at line 218 of file l2_input.h.

#define MPLS_FEAT_MASK
Value:
~(L2INPUT_FEAT_CTRL_PKT | \
L2INPUT_FEAT_L2PT | \
L2INPUT_FEAT_IGMP_SNOOP | \
L2INPUT_FEAT_MLD_SNOOP | \
L2INPUT_FEAT_DHCP_SNOOP | \
L2INPUT_FEAT_CFM | \
L2INPUT_FEAT_DAI)

Definition at line 198 of file l2_input.h.

Enumeration Type Documentation

Enumerator
foreach_l2input_feat 

Definition at line 131 of file l2_input.h.

Enumerator
L2INPUT_N_FEAT 

Definition at line 122 of file l2_input.h.

Function Documentation

static_always_inline u8 bd_feature_arp_term ( l2_bridge_domain_t bd_config)

Definition at line 170 of file l2_input.h.

+ Here is the caller graph for this function:

static_always_inline u8 bd_feature_flood ( l2_bridge_domain_t bd_config)

Definition at line 143 of file l2_input.h.

+ Here is the caller graph for this function:

static_always_inline u8 bd_feature_forward ( l2_bridge_domain_t bd_config)

Definition at line 157 of file l2_input.h.

+ Here is the caller graph for this function:

static_always_inline u8 bd_feature_learn ( l2_bridge_domain_t bd_config)

Definition at line 163 of file l2_input.h.

+ Here is the caller graph for this function:

static_always_inline u8 bd_feature_uu_flood ( l2_bridge_domain_t bd_config)

Definition at line 150 of file l2_input.h.

+ Here is the caller graph for this function:

static_always_inline l2_bridge_domain_t* l2input_bd_config_from_index ( l2input_main_t l2im,
u32  bd_index 
)

Definition at line 81 of file l2_input.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char** l2input_get_feat_names ( void  )

Return an array of strings containing graph node names of each feature.

Definition at line 57 of file l2_input.c.

+ Here is the caller graph for this function:

u32 l2input_intf_bitmap_enable ( u32  sw_if_index,
u32  feature_bitmap,
u32  enable 
)

Enable (or disable) the feature in the bitmap for the given interface.

Definition at line 514 of file l2_input.c.

+ Here is the caller graph for this function:

l2_input_config_t* l2input_intf_config ( u32  sw_if_index)

Get a pointer to the config for the given interface.

Definition at line 504 of file l2_input.c.

+ Here is the caller graph for this function:

u32 l2input_set_bridge_features ( u32  bd_index,
u32  feat_mask,
u32  feat_value 
)

Definition at line 535 of file l2_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 set_int_l2_mode ( vlib_main_t vm,
vnet_main_t vnet_main,
u32  mode,
u32  sw_if_index,
u32  bd_index,
u32  bvi,
u32  shg,
u32  xc_sw_if_index 
)

Set the subinterface to run in l2 or l3 mode.

For L3 mode, just the sw_if_index is specified. For bridged mode, the bd id and bvi flag are also specified. For xconnect mode, the peer sw_if_index is also specified. Return 0 if ok, or non-0 if there was an error.

Definition at line 555 of file l2_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 vnet_l2_compute_flow_hash ( vlib_buffer_t b)
inlinestatic

Definition at line 273 of file l2_input.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vnet_update_l2_len ( vlib_buffer_t b)
inlinestatic

Definition at line 233 of file l2_input.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

l2input_main_t l2input_main

Definition at line 87 of file l2_input.c.

(constructor) VLIB_REGISTER_NODE (l2input_node)

Definition at line 452 of file l2_input.c.