18 #ifndef included_vnet_l2_output_h 19 #define included_vnet_l2_output_h 73 u32 feat_next_node_index[32];
96 #define foreach_l2output_feat \ 97 _(OUTPUT, "interface-output") \ 98 _(SPAN, "feature-bitmap-drop") \ 99 _(CFM, "feature-bitmap-drop") \ 100 _(QOS, "feature-bitmap-drop") \ 101 _(ACL, "l2-output-acl") \ 102 _(L2PT, "feature-bitmap-drop") \ 103 _(EFP_FILTER, "l2-efp-filter") \ 104 _(IPIW, "feature-bitmap-drop") \ 105 _(STP_BLOCKED, "feature-bitmap-drop") \ 106 _(LINESTATUS_DOWN, "feature-bitmap-drop") \ 107 _(OUTPUT_CLASSIFY, "l2-output-classify") \ 113 #define _(sym,str) L2OUTPUT_FEAT_##sym##_BIT, 122 #define _(sym,str) L2OUTPUT_FEAT_##sym = (1<<L2OUTPUT_FEAT_##sym##_BIT), 127 #define foreach_l2output_error \ 128 _(L2OUTPUT, "L2 output packets") \ 129 _(EFP_DROP, "L2 EFP filter pre-rewrite drops") \ 130 _(VTR_DROP, "L2 output tag rewrite drops") \ 131 _(SHG_DROP, "L2 split horizon drops") \ 132 _(DROP, "L2 output drops") \ 133 _(MAPPING_DROP, "L2 Output interface not valid") 144 #define _(sym,str) L2OUTPUT_ERROR_##sym, 172 u32 * cached_sw_if_index,
173 u32 * cached_next_index,
176 u32 sw_if_index,
u32 feature_bitmap,
u32 * next0)
189 || ((feature_bitmap & ~L2OUTPUT_FEAT_OUTPUT) != 0))
192 ASSERT (feature_bitmap != 0);
195 vnet_buffer (b0)->l2.feature_bitmap = feature_bitmap;
210 if (sw_if_index == *cached_sw_if_index)
213 *next0 = *cached_next_index;
222 b0->
error = node->
errors[L2OUTPUT_ERROR_MAPPING_DROP];
225 *cached_sw_if_index = sw_if_index;
226 *cached_next_index = *next0;
236 u32 feature_bitmap,
u32 enable);
#define foreach_l2output_error
char ** l2output_get_feat_names(void)
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.
vlib_error_t * errors
Vector of errors for this node.
l2_output_next_nodes_st next_nodes
Per-interface vlan tag rewrite configuration There will be one instance of this struct for each sw_if...
ptr_config_t output_pbb_vtr
u32 feat_next_node_index[32]
void l2output_create_output_node_mapping(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index)
The next set of functions is for use by output feature graph nodes.
l2output_main_t l2output_main
static u32 feat_bitmap_get_next_node_index(u32 *next_nodes, u32 bitmap)
Return the graph node index for the feature corresponding to the first set bit in the bitmap...
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define foreach_l2output_feat
int vlib_main(vlib_main_t *volatile vm, unformat_input_t *input)
#define vec_elt(v, i)
Get vector value at index i.
u32 * output_node_index_vec
ptr_config_t input_pbb_vtr
l2_output_config_t * l2output_intf_config(u32 sw_if_index)
Get a pointer to the config for the given interface.
l2_output_config_t * configs
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.