misc: remove GNU Indent directives
[vpp.git] / src / vnet / l2 / l2_input_vtr.c
index 9470752..ccf3efa 100644 (file)
@@ -57,9 +57,9 @@ format_l2_invtr_trace (u8 * s, va_list * args)
   return s;
 }
 
+#ifndef CLIB_MARCH_VARIANT
 l2_invtr_main_t l2_invtr_main;
-
-static vlib_node_registration_t l2_invtr_node;
+#endif /* CLIB_MARCH_VARIANT */
 
 #define foreach_l2_invtr_error                 \
 _(L2_INVTR,    "L2 inverter packets")          \
@@ -86,9 +86,9 @@ typedef enum
 } l2_invtr_next_t;
 
 
-static uword
-l2_invtr_node_fn (vlib_main_t * vm,
-                 vlib_node_runtime_t * node, vlib_frame_t * frame)
+VLIB_NODE_FN (l2_invtr_node) (vlib_main_t * vm,
+                             vlib_node_runtime_t * node,
+                             vlib_frame_t * frame)
 {
   u32 n_left_from, *from, *to_next;
   l2_invtr_next_t next_index;
@@ -126,8 +126,8 @@ l2_invtr_node_fn (vlib_main_t * vm,
            vlib_prefetch_buffer_header (p4, LOAD);
            vlib_prefetch_buffer_header (p5, LOAD);
 
-           CLIB_PREFETCH (p4->data, CLIB_CACHE_LINE_BYTES, STORE);
-           CLIB_PREFETCH (p5->data, CLIB_CACHE_LINE_BYTES, STORE);
+           clib_prefetch_store (p4->data);
+           clib_prefetch_store (p5->data);
 
            /*
             * Prefetch the input config for the N+1 loop iteration
@@ -222,9 +222,9 @@ l2_invtr_node_fn (vlib_main_t * vm,
                    vlib_add_trace (vm, node, b0, sizeof (*t));
                  ethernet_header_t *h0 = vlib_buffer_get_current (b0);
                  t->sw_if_index = sw_if_index0;
-                 clib_memcpy (t->src, h0->src_address, 6);
-                 clib_memcpy (t->dst, h0->dst_address, 6);
-                 clib_memcpy (t->raw, &h0->type, sizeof (t->raw));
+                 clib_memcpy_fast (t->src, h0->src_address, 6);
+                 clib_memcpy_fast (t->dst, h0->dst_address, 6);
+                 clib_memcpy_fast (t->raw, &h0->type, sizeof (t->raw));
                }
              if (b1->flags & VLIB_BUFFER_IS_TRACED)
                {
@@ -232,9 +232,9 @@ l2_invtr_node_fn (vlib_main_t * vm,
                    vlib_add_trace (vm, node, b1, sizeof (*t));
                  ethernet_header_t *h1 = vlib_buffer_get_current (b1);
                  t->sw_if_index = sw_if_index0;
-                 clib_memcpy (t->src, h1->src_address, 6);
-                 clib_memcpy (t->dst, h1->dst_address, 6);
-                 clib_memcpy (t->raw, &h1->type, sizeof (t->raw));
+                 clib_memcpy_fast (t->src, h1->src_address, 6);
+                 clib_memcpy_fast (t->dst, h1->dst_address, 6);
+                 clib_memcpy_fast (t->raw, &h1->type, sizeof (t->raw));
                }
            }
 
@@ -301,9 +301,9 @@ l2_invtr_node_fn (vlib_main_t * vm,
                vlib_add_trace (vm, node, b0, sizeof (*t));
              ethernet_header_t *h0 = vlib_buffer_get_current (b0);
              t->sw_if_index = sw_if_index0;
-             clib_memcpy (t->src, h0->src_address, 6);
-             clib_memcpy (t->dst, h0->dst_address, 6);
-             clib_memcpy (t->raw, &h0->type, sizeof (t->raw));
+             clib_memcpy_fast (t->src, h0->src_address, 6);
+             clib_memcpy_fast (t->dst, h0->dst_address, 6);
+             clib_memcpy_fast (t->raw, &h0->type, sizeof (t->raw));
            }
 
          /* verify speculative enqueue, maybe switch current next frame */
@@ -319,9 +319,7 @@ l2_invtr_node_fn (vlib_main_t * vm,
 }
 
 
-/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2_invtr_node,static) = {
-  .function = l2_invtr_node_fn,
+VLIB_REGISTER_NODE (l2_invtr_node) = {
   .name = "l2-input-vtr",
   .vector_size = sizeof (u32),
   .format_trace = format_l2_invtr_trace,
@@ -337,10 +335,10 @@ VLIB_REGISTER_NODE (l2_invtr_node,static) = {
        [L2_INVTR_NEXT_DROP]  = "error-drop",
   },
 };
-/* *INDENT-ON* */
 
-VLIB_NODE_FUNCTION_MULTIARCH (l2_invtr_node, l2_invtr_node_fn)
-     clib_error_t *l2_invtr_init (vlib_main_t * vm)
+#ifndef CLIB_MARCH_VARIANT
+clib_error_t *
+l2_invtr_init (vlib_main_t * vm)
 {
   l2_invtr_main_t *mp = &l2_invtr_main;
 
@@ -358,6 +356,7 @@ VLIB_NODE_FUNCTION_MULTIARCH (l2_invtr_node, l2_invtr_node_fn)
 }
 
 VLIB_INIT_FUNCTION (l2_invtr_init);
+#endif /* CLIB_MARCH_VARIANT */
 
 
 /*