18 #ifndef included_vnet_l2_output_h 19 #define included_vnet_l2_output_h 58 u32 feat_next_node_index[32];
80 #define foreach_l2output_feat \ 81 _(SPAN, "feature-bitmap-drop") \ 82 _(CFM, "feature-bitmap-drop") \ 83 _(QOS, "feature-bitmap-drop") \ 84 _(ACL, "l2-output-acl") \ 85 _(L2PT, "feature-bitmap-drop") \ 86 _(EFP_FILTER, "l2-efp-filter") \ 87 _(IPIW, "feature-bitmap-drop") \ 88 _(STP_BLOCKED, "feature-bitmap-drop") \ 89 _(LINESTATUS_DOWN, "feature-bitmap-drop") \ 94 #define _(sym,str) L2OUTPUT_FEAT_##sym##_BIT, 102 #define _(sym,str) L2OUTPUT_FEAT_##sym = (1<<L2OUTPUT_FEAT_##sym##_BIT), 121 u32 * output_node_index_vec,
141 u32 ** output_node_index_vec)
149 next =
vec_elt(*output_node_index_vec, sw_if_index);
156 *output_node_index_vec,
170 u32 * cached_sw_if_index,
171 u32 * cached_next_index,
178 if (feature_bitmap) {
182 vnet_buffer(b0)->l2.feature_bitmap = feature_bitmap;
192 if (sw_if_index == *cached_sw_if_index) {
194 *next0 = *cached_next_index;
204 *cached_sw_if_index = sw_if_index;
205 *cached_next_index = *next0;
always_inline 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)
char ** l2output_get_feat_names(void)
void l2output_intf_bitmap_enable(u32 sw_if_index, u32 feature_bitmap, u32 enable)
always_inline void l2output_init_output_node_vec(u32 **output_node_index_vec)
l2_output_next_nodes_st next_nodes
int vlib_main(vlib_main_t *vm, unformat_input_t *input)
always_inline 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)
u32 feat_next_node_index[32]
l2output_main_t l2output_main
#define foreach_l2output_feat
#define vec_elt(v, i)
Get vector value at index i.
u32 * output_node_index_vec
l2_output_config_t * l2output_intf_config(u32 sw_if_index)
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)
always_inline u32 feat_bitmap_get_next_node_index(u32 *next_nodes, u32 bitmap)
l2_output_config_t * configs
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)