From: Mohammed Hawari Date: Wed, 20 Jan 2021 09:40:31 +0000 (+0100) Subject: marvell: adapt pp2 to new rxq framework. X-Git-Tag: v21.10-rc0~681 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=692b52dca66770e48aae550efce7145c31b0a4f6;p=vpp.git marvell: adapt pp2 to new rxq framework. Change-Id: I8759a07a24692b8b418ef8eb2025b61a62d2dda1 Type: improvement Signed-off-by: Mohammed Hawari --- diff --git a/src/plugins/marvell/pp2/pp2.c b/src/plugins/marvell/pp2/pp2.c index fdd0e85035d..a92b35c4d8b 100644 --- a/src/plugins/marvell/pp2/pp2.c +++ b/src/plugins/marvell/pp2/pp2.c @@ -25,6 +25,7 @@ #include #include #include +#include /* size of DMA memory used by musdk (not used for buffers) */ #define MV_SYS_DMA_MEM_SZ (2 << 20) @@ -122,11 +123,7 @@ mrvl_pp2_delete_if (mrvl_pp2_if_t * ppif) int i; if (ppif->hw_if_index != ~0) - { - vec_foreach_index (i, ppif->inqs) - vnet_hw_interface_unassign_rx_thread (vnm, ppif->hw_if_index, i); ethernet_delete_interface (vnm, ppif->hw_if_index); - } if (ppif->ppio) { @@ -301,11 +298,15 @@ mrvl_pp2_create_if (mrvl_pp2_create_if_args_t * args) ppif->sw_if_index = sw->sw_if_index; ppif->per_interface_next_index = ~0; args->sw_if_index = sw->sw_if_index; - vnet_hw_interface_set_input_node (vnm, ppif->hw_if_index, - mrvl_pp2_input_node.index); - vnet_hw_interface_assign_rx_thread (vnm, ppif->hw_if_index, 0, ~0); - vnet_hw_interface_set_rx_mode (vnm, ppif->hw_if_index, 0, - VNET_HW_IF_RX_MODE_POLLING); + vnet_hw_if_set_input_node (vnm, ppif->hw_if_index, + mrvl_pp2_input_node.index); + /* FIXME: only one RX queue ? */ + ppif->inqs[0].queue_index = vnet_hw_if_register_rx_queue ( + vnm, ppif->hw_if_index, 0, VNET_HW_IF_RXQ_THREAD_ANY); + + vnet_hw_if_set_rx_queue_mode (vnm, ppif->inqs[0].queue_index, + VNET_HW_IF_RX_MODE_POLLING); + vnet_hw_if_update_runtime_data (vnm, ppif->hw_if_index); vnet_hw_interface_set_flags (vnm, ppif->hw_if_index, VNET_HW_INTERFACE_FLAG_LINK_UP); goto done; diff --git a/src/plugins/marvell/pp2/pp2.h b/src/plugins/marvell/pp2/pp2.h index f8fb78f50be..abb8e573a37 100644 --- a/src/plugins/marvell/pp2/pp2.h +++ b/src/plugins/marvell/pp2/pp2.h @@ -35,6 +35,7 @@ typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); u16 size; + u32 queue_index; struct pp2_bpool *bpool; } mrvl_pp2_inq_t;