l2: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I8370c06150ce4499475e9d6dc6b3ab8be2016202
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c
index ac83483..85a53aa 100644
--- a/src/vnet/l2/l2_rw.c
+++ b/src/vnet/l2/l2_rw.c
@@ -26,9 +26,9 @@
  */
 
 
+#ifndef CLIB_MARCH_VARIANT
 l2_rw_main_t l2_rw_main;
-
-vlib_node_registration_t l2_rw_node;
+#endif /* CLIB_MARCH_VARIANT */
 
 typedef struct
 {
@@ -156,9 +156,8 @@
     }
 }
 
-static uword
-l2_rw_node_fn (vlib_main_t * vm,
-	       vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (l2_rw_node) (vlib_main_t * vm,
+			   vlib_node_runtime_t * node, vlib_frame_t * frame)
 {
   l2_rw_main_t *rw = &l2_rw_main;
   u32 n_left_from, *from, *to_next, next_index;
@@ -347,6 +346,7 @@
   return frame->n_vectors;
 }
 
+#ifndef CLIB_MARCH_VARIANT
 int
 l2_rw_mod_entry (u32 * index,
 		 u8 * mask, u8 * value, u32 len, u32 skip, u8 is_del)
@@ -395,6 +395,7 @@
 
   return 0;
 }
+#endif /* CLIB_MARCH_VARIANT */
 
 static clib_error_t *
 l2_rw_entry_cli_fn (vlib_main_t * vm,
@@ -453,6 +454,7 @@
 };
 /* *INDENT-ON* */
 
+#ifndef CLIB_MARCH_VARIANT
 int
 l2_rw_interface_set_table (u32 sw_if_index, u32 table_index, u32 miss_index)
 {
@@ -470,6 +472,7 @@
 
   return 0;
 }
+#endif /* CLIB_MARCH_VARIANT */
 
 static clib_error_t *
 l2_rw_interface_cli_fn (vlib_main_t * vm,
@@ -594,7 +597,7 @@
 };
 /* *INDENT-ON* */
 
-int
+static int
 l2_rw_enable_disable (u32 bridge_domain, u8 disable)
 {
   u32 mask = L2INPUT_FEAT_RW;
@@ -686,7 +689,6 @@
 
 /* *INDENT-OFF* */
 VLIB_REGISTER_NODE (l2_rw_node) = {
-  .function = l2_rw_node_fn,
   .name = "l2-rw",
   .vector_size = sizeof (u32),
   .format_trace = format_l2_rw_trace,
@@ -699,7 +701,6 @@
 };
 /* *INDENT-ON* */
 
-VLIB_NODE_FUNCTION_MULTIARCH (l2_rw_node, l2_rw_node_fn)
 /*
  * fd.io coding-style-patch-verification: ON
  *