diff options
Diffstat (limited to 'src/plugins/marvell/pp2/pp2.c')
-rw-r--r-- | src/plugins/marvell/pp2/pp2.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/plugins/marvell/pp2/pp2.c b/src/plugins/marvell/pp2/pp2.c index dfe5c157018..030ab9b4496 100644 --- a/src/plugins/marvell/pp2/pp2.c +++ b/src/plugins/marvell/pp2/pp2.c @@ -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> @@ -130,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) { @@ -163,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); @@ -178,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 }; @@ -282,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; @@ -380,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", @@ -393,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) |