FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
l2_output.h File Reference
+ Include dependency graph for l2_output.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  l2_output_config_t
 
struct  l2_output_next_nodes_st
 
struct  l2output_main_t
 

Macros

#define foreach_l2output_feat
 
#define foreach_l2output_error
 

Enumerations

enum  l2output_feat_t { L2OUTPUT_N_FEAT }
 
enum  l2output_feat_masks_t { foreach_l2output_feat }
 
enum  l2output_next_t { L2OUTPUT_NEXT_DROP, L2OUTPUT_NEXT_BAD_INTF, L2OUTPUT_N_NEXT }
 
enum  l2output_error_t { L2OUTPUT_N_ERROR }
 

Functions

char ** l2output_get_feat_names (void)
 
u32 l2output_create_output_node_mapping (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 node_index, u32 *output_node_index_vec, u32 sw_if_index)
 The next set of functions is for use by output feature graph nodes. More...
 
static void l2output_init_output_node_vec (u32 **output_node_index_vec)
 
static u32 l2output_get_output_node (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 node_index, u32 sw_if_index, u32 **output_node_index_vec)
 Get a mapping from the output node mapping table, creating the entry if necessary. More...
 
static void l2_output_dispatch (vlib_main_t *vlib_main, vnet_main_t *vnet_main, vlib_node_runtime_t *node, u32 node_index, u32 *cached_sw_if_index, u32 *cached_next_index, l2_output_next_nodes_st *next_nodes, vlib_buffer_t *b0, u32 sw_if_index, u32 feature_bitmap, u32 *next0)
 Determine the next L2 node based on the output feature bitmap. More...
 
l2_output_config_tl2output_intf_config (u32 sw_if_index)
 Get a pointer to the config for the given interface. More...
 
void l2output_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...
 

Variables

l2output_main_t l2output_main
 

Macro Definition Documentation

#define foreach_l2output_error
Value:
_(L2OUTPUT, "L2 output packets") \
_(EFP_DROP, "L2 EFP filter pre-rewrite drops") \
_(VTR_DROP, "L2 output tag rewrite drops") \
_(SHG_DROP, "L2 split horizon drops") \
_(DROP, "L2 output drops") \
_(MAPPING_DROP, "L2 Output interface mapping in progress")
DROP
Definition: error.def:41

Definition at line 127 of file l2_output.h.

#define foreach_l2output_feat
Value:
_(OUTPUT, "interface-output") \
_(SPAN, "feature-bitmap-drop") \
_(CFM, "feature-bitmap-drop") \
_(QOS, "feature-bitmap-drop") \
_(ACL, "l2-output-acl") \
_(L2PT, "feature-bitmap-drop") \
_(EFP_FILTER, "l2-efp-filter") \
_(IPIW, "feature-bitmap-drop") \
_(STP_BLOCKED, "feature-bitmap-drop") \
_(LINESTATUS_DOWN, "feature-bitmap-drop") \
_(OUTPUT_CLASSIFY, "l2-output-classify") \
_(XCRW, "l2-xcrw")

Definition at line 96 of file l2_output.h.

Enumeration Type Documentation

Enumerator
L2OUTPUT_N_ERROR 

Definition at line 142 of file l2_output.h.

Enumerator
foreach_l2output_feat 

Definition at line 120 of file l2_output.h.

Enumerator
L2OUTPUT_N_FEAT 

Definition at line 111 of file l2_output.h.

Enumerator
L2OUTPUT_NEXT_DROP 
L2OUTPUT_NEXT_BAD_INTF 
L2OUTPUT_N_NEXT 

Definition at line 135 of file l2_output.h.

Function Documentation

static void l2_output_dispatch ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
vlib_node_runtime_t node,
u32  node_index,
u32 cached_sw_if_index,
u32 cached_next_index,
l2_output_next_nodes_st next_nodes,
vlib_buffer_t b0,
u32  sw_if_index,
u32  feature_bitmap,
u32 next0 
)
inlinestatic

Determine the next L2 node based on the output feature bitmap.

Definition at line 211 of file l2_output.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 l2output_create_output_node_mapping ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  node_index,
u32 output_node_index_vec,
u32  sw_if_index 
)

The next set of functions is for use by output feature graph nodes.

When the last bit has been cleared from the output feature bitmap, the next node is the output graph node for the TX sw_if_index. These functions help the feature nodes get that node index.

The next set of functions is for use by output feature graph nodes.

Definition at line 635 of file l2_output.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char** l2output_get_feat_names ( void  )

Definition at line 38 of file l2_output.c.

+ Here is the caller graph for this function:

static u32 l2output_get_output_node ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  node_index,
u32  sw_if_index,
u32 **  output_node_index_vec 
)
inlinestatic

Get a mapping from the output node mapping table, creating the entry if necessary.

Definition at line 184 of file l2_output.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void l2output_init_output_node_vec ( u32 **  output_node_index_vec)
inlinestatic

Definition at line 168 of file l2_output.h.

+ Here is the caller graph for this function:

void l2output_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 702 of file l2_output.c.

+ Here is the caller graph for this function:

l2_output_config_t* l2output_intf_config ( u32  sw_if_index)

Get a pointer to the config for the given interface.

Definition at line 692 of file l2_output.c.

+ Here is the caller graph for this function:

Variable Documentation

l2output_main_t l2output_main

Definition at line 91 of file l2_output.h.