misc: remove GNU Indent directives
[vpp.git] / src / plugins / marvell / pp2 / pp2.c
index a92b35c..030ab9b 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <vlib/vlib.h>
 #include <vlib/unix/unix.h>
-#include <vppinfra/linux/syscall.h>
 #include <vnet/plugin/plugin.h>
 #include <marvell/pp2/pp2.h>
 #include <vnet/interface/rx_queue_funcs.h>
@@ -120,7 +119,6 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif)
   mrvl_pp2_main_t *ppm = &mrvl_pp2_main;
   mrvl_pp2_outq_t *outq;
   mrvl_pp2_inq_t *inq;
-  int i;
 
   if (ppif->hw_if_index != ~0)
       ethernet_delete_interface (vnm, ppif->hw_if_index);
@@ -131,7 +129,6 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif)
       pp2_ppio_deinit (ppif->ppio);
     }
 
-  /* *INDENT-OFF* */
   /* free buffers hanging in the tx ring */
   vec_foreach (outq, ppif->outqs)
     {
@@ -164,7 +161,6 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif)
        pp2_bpool_deinit (inq->bpool);
       }
   vec_free (ppif->inqs);
-  /* *INDENT-ON* */
 
 
   pool_put (ppm->interfaces, ppif);
@@ -179,6 +175,7 @@ mrvl_pp2_create_if (mrvl_pp2_create_if_args_t * args)
   vlib_main_t *vm = vlib_get_main ();
   vnet_main_t *vnm = vnet_get_main ();
   vlib_thread_main_t *tm = vlib_get_thread_main ();
+  vnet_eth_interface_registration_t eir = {};
   mrvl_pp2_main_t *ppm = &mrvl_pp2_main;
   struct pp2_bpool_params bpool_params = { 0 };
   struct pp2_ppio_params ppio_params = { 0 };
@@ -283,16 +280,11 @@ mrvl_pp2_create_if (mrvl_pp2_create_if_args_t * args)
       goto error;
     }
 
-  args->error = ethernet_register_interface (vnm, mrvl_pp2_device_class.index,
-                                            ppif->dev_instance,
-                                            mac_addr,
-                                            &ppif->hw_if_index,
-                                            mrvl_pp2_eth_flag_change);
-  if (args->error)
-    {
-      args->rv = VNET_API_ERROR_INVALID_REGISTRATION;
-      goto error;
-    }
+  eir.dev_class_index = mrvl_pp2_device_class.index;
+  eir.dev_instance = ppif->dev_instance;
+  eir.address = mac_addr;
+  eir.cb.flag_change = mrvl_pp2_eth_flag_change;
+  ppif->hw_if_index = vnet_eth_register_interface (vnm, &eir);
 
   sw = vnet_get_hw_sw_interface (vnm, ppif->hw_if_index);
   ppif->sw_if_index = sw->sw_if_index;
@@ -381,7 +373,6 @@ static char *mrvl_pp2_tx_func_error_strings[] = {
 #undef _
 };
 
-/* *INDENT-OFF* */
 VNET_DEVICE_CLASS (mrvl_pp2_device_class,) =
 {
   .name = "Marvell PPv2 interface",
@@ -394,7 +385,6 @@ VNET_DEVICE_CLASS (mrvl_pp2_device_class,) =
   .clear_counters = mrvl_pp2_clear_interface_counters,
   .rx_redirect_to_node = mrvl_pp2_set_interface_next_node,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 mrvl_pp2_init (vlib_main_t * vm)