summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_flood.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_flood.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_flood.c')
-rw-r--r--src/vnet/l2/l2_flood.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c
index 3198d323d60..1bc528138d7 100644
--- a/src/vnet/l2/l2_flood.c
+++ b/src/vnet/l2/l2_flood.c
@@ -87,9 +87,11 @@ format_l2flood_trace (u8 * s, va_list * args)
return s;
}
-l2flood_main_t l2flood_main;
+extern l2flood_main_t l2flood_main;
-static vlib_node_registration_t l2flood_node;
+#ifndef CLIB_MARCH_VARIANT
+l2flood_main_t l2flood_main;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_l2flood_error \
_(L2FLOOD, "L2 flood packets") \
@@ -134,9 +136,8 @@ typedef enum
* could be turned into an ICMP reply. If BVI processing is not performed
* last, the modified packet would be replicated to the remaining members.
*/
-static uword
-l2flood_node_fn (vlib_main_t * vm,
- vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (l2flood_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node, vlib_frame_t * frame)
{
u32 n_left_from, *from, *to_next;
l2flood_next_t next_index;
@@ -362,8 +363,7 @@ l2flood_node_fn (vlib_main_t * vm,
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2flood_node,static) = {
- .function = l2flood_node_fn,
+VLIB_REGISTER_NODE (l2flood_node) = {
.name = "l2-flood",
.vector_size = sizeof (u32),
.format_trace = format_l2flood_trace,
@@ -380,10 +380,9 @@ VLIB_REGISTER_NODE (l2flood_node,static) = {
[L2FLOOD_NEXT_DROP] = "error-drop",
},
};
-
-VLIB_NODE_FUNCTION_MULTIARCH (l2flood_node, l2flood_node_fn)
/* *INDENT-ON* */
+#ifndef CLIB_MARCH_VARIANT
clib_error_t *
l2flood_init (vlib_main_t * vm)
{
@@ -421,6 +420,7 @@ l2flood_register_input_type (vlib_main_t * vm,
next_by_ethertype_register (&mp->l3_next, type, next_index);
}
+#endif /* CLIB_MARCH_VARIANT */
/**