aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_input.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-03-11 04:26:37 -0700
committerDamjan Marion <dmarion@me.com>2019-03-12 19:07:42 +0000
commit44f0f71b6b1e6dac466452664817abc388662efd (patch)
tree7c17c324b7e941c10a8a6ffa00feb8055f35a4d6 /src/vnet/l2/l2_input.c
parentc4be9850f21ce59b7b8b830661db0f0437dd1063 (diff)
l2: migrate old MULTIARCH macros to VLIB_NODE_FN
Change-Id: I8370c06150ce4499475e9d6dc6b3ab8be2016202 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/l2/l2_input.c')
-rw-r--r--src/vnet/l2/l2_input.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index b66a7446d66..704223a3d75 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -49,6 +49,8 @@
* For interfaces in Layer 3 mode, the packets will be routed.
*/
+#ifndef CLIB_MARCH_VARIANT
+
/* Feature graph node names */
static char *l2input_feat_names[] = {
#define _(sym,name) name,
@@ -94,6 +96,7 @@ format_l2_input_features (u8 * s, va_list * args)
}
return s;
}
+#endif /* CLIB_MARCH_VARIANT */
typedef struct
{
@@ -119,7 +122,11 @@ format_l2input_trace (u8 * s, va_list * args)
return s;
}
+extern l2input_main_t l2input_main;
+
+#ifndef CLIB_MARCH_VARIANT
l2input_main_t l2input_main;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_l2input_error \
_(L2INPUT, "L2 input packets") \
@@ -455,9 +462,8 @@ l2input_node_inline (vlib_main_t * vm,
return frame->n_vectors;
}
-static uword
-l2input_node_fn (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (l2input_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node, vlib_frame_t * frame)
{
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
return l2input_node_inline (vm, node, frame, 1 /* do_trace */ );
@@ -466,7 +472,6 @@ l2input_node_fn (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (l2input_node) = {
- .function = l2input_node_fn,
.name = "l2-input",
.vector_size = sizeof (u32),
.format_trace = format_l2input_trace,
@@ -487,8 +492,9 @@ VLIB_REGISTER_NODE (l2input_node) = {
};
/* *INDENT-ON* */
-VLIB_NODE_FUNCTION_MULTIARCH (l2input_node, l2input_node_fn)
- clib_error_t *l2input_init (vlib_main_t * vm)
+#ifndef CLIB_MARCH_VARIANT
+clib_error_t *
+l2input_init (vlib_main_t * vm)
{
l2input_main_t *mp = &l2input_main;
@@ -851,6 +857,7 @@ set_int_l2_mode (vlib_main_t * vm, vnet_main_t * vnet_main, /* */
return 0;
}
+#endif /* CLIB_MARCH_VARIANT */
/**
* Set subinterface in bridging mode with a bridge-domain ID.
@@ -1213,6 +1220,7 @@ _(l2output_init) \
_(l2_patch_init) \
_(l2_xcrw_init)
+#ifndef CLIB_MARCH_VARIANT
clib_error_t *
l2_init (vlib_main_t * vm)
{
@@ -1227,6 +1235,7 @@ while (0);
}
VLIB_INIT_FUNCTION (l2_init);
+#endif /* CLIB_MARCH_VARIANT */
/*
* fd.io coding-style-patch-verification: ON