summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_input.h5
-rw-r--r--src/vnet/l2/l2_output.c13
-rw-r--r--src/vnet/l2/l2_output.h8
3 files changed, 16 insertions, 10 deletions
diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h
index 244ef445ca8..e6b3bc7f9cd 100644
--- a/src/vnet/l2/l2_input.h
+++ b/src/vnet/l2/l2_input.h
@@ -102,7 +102,7 @@ l2input_bd_config (u32 bd_index)
/* L2 input features */
-/* Mappings from feature ID to graph node name */
+/* Mappings from feature ID to graph node name in reverse order */
#define foreach_l2input_feat \
_(DROP, "feature-bitmap-drop") \
_(XCONNECT, "l2-output") \
@@ -116,7 +116,8 @@ l2input_bd_config (u32 bd_index)
_(VPATH, "vpath-input-l2") \
_(ACL, "l2-input-acl") \
_(POLICER_CLAS, "l2-policer-classify") \
- _(INPUT_CLASSIFY, "l2-input-classify")
+ _(INPUT_CLASSIFY, "l2-input-classify") \
+ _(SPAN, "span-l2-input")
/* Feature bitmap positions */
typedef enum
diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c
index b3537a355cf..fbee590c944 100644
--- a/src/vnet/l2/l2_output.c
+++ b/src/vnet/l2/l2_output.c
@@ -195,8 +195,6 @@ l2output_vtr (vlib_node_runtime_t * node, l2_output_config_t * config,
}
-static vlib_node_registration_t l2output_node;
-
static_always_inline uword
l2output_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame, int do_trace)
@@ -477,7 +475,7 @@ l2output_node_fn (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2output_node,static) = {
+VLIB_REGISTER_NODE (l2output_node) = {
.function = l2output_node_fn,
.name = "l2-output",
.vector_size = sizeof (u32),
@@ -495,6 +493,8 @@ VLIB_REGISTER_NODE (l2output_node,static) = {
[L2OUTPUT_NEXT_BAD_INTF] = "l2-output-bad-intf",
},
};
+
+VLIB_NODE_FUNCTION_MULTIARCH (l2output_node, l2output_node_fn);
/* *INDENT-ON* */
@@ -601,11 +601,12 @@ VLIB_REGISTER_NODE (l2output_bad_intf_node,static) = {
[0] = "error-drop",
},
};
-/* *INDENT-ON* */
+VLIB_NODE_FUNCTION_MULTIARCH (l2output_bad_intf_node, l2output_bad_intf_node_fn);
+/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (l2output_node, l2output_node_fn)
- clib_error_t *l2output_init (vlib_main_t * vm)
+static clib_error_t *
+l2output_init (vlib_main_t * vm)
{
l2output_main_t *mp = &l2output_main;
diff --git a/src/vnet/l2/l2_output.h b/src/vnet/l2/l2_output.h
index 6da3e303c3b..a54b8d67c93 100644
--- a/src/vnet/l2/l2_output.h
+++ b/src/vnet/l2/l2_output.h
@@ -77,12 +77,14 @@ typedef struct
l2output_main_t l2output_main;
+extern vlib_node_registration_t l2output_node;
+
/* L2 output features */
-/* Mappings from feature ID to graph node name */
+/* Mappings from feature ID to graph node name in reverse order */
#define foreach_l2output_feat \
_(OUTPUT, "interface-output") \
- _(SPAN, "feature-bitmap-drop") \
+ _(SPAN, "span-l2-output") \
_(CFM, "feature-bitmap-drop") \
_(QOS, "feature-bitmap-drop") \
_(ACL, "l2-output-acl") \
@@ -103,6 +105,8 @@ typedef enum
L2OUTPUT_N_FEAT,
} l2output_feat_t;
+STATIC_ASSERT (L2OUTPUT_N_FEAT <= 32, "too many l2 output features");
+
/* Feature bit masks */
typedef enum
{