aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/marvell
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2021-01-08 17:19:09 +0100
committerDamjan Marion <dmarion@me.com>2021-01-26 21:45:20 +0000
commitb85b0df2a039b694fb2f3c09a01decfb89d7bce2 (patch)
treed8389bcfbb657fe03d161c0cc9fadee86f497473 /src/plugins/marvell
parent832a31652607244331f2acafbcda158b7577a919 (diff)
interface: remove vnet_device_input_runtime_t
Change-Id: I85a463b4ca15baf11e3eb70189f5190ba2585170 Type: refactor Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Diffstat (limited to 'src/plugins/marvell')
-rw-r--r--src/plugins/marvell/pp2/input.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/marvell/pp2/input.c b/src/plugins/marvell/pp2/input.c
index ec3d376714d..d4a53fb627e 100644
--- a/src/plugins/marvell/pp2/input.c
+++ b/src/plugins/marvell/pp2/input.c
@@ -357,17 +357,18 @@ mrvl_pp2_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
{
u32 n_rx = 0;
mrvl_pp2_main_t *ppm = &mrvl_pp2_main;
- vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
- vnet_device_and_queue_t *dq;
-
- foreach_device_and_queue (dq, rt->devices_and_queues)
- {
- mrvl_pp2_if_t *ppif;
- ppif = vec_elt_at_index (ppm->interfaces, dq->dev_instance);
- if (ppif->flags & MRVL_PP2_IF_F_ADMIN_UP)
- n_rx += mrvl_pp2_device_input_inline (vm, node, frame, ppif,
- dq->queue_id);
- }
+ vnet_hw_if_rxq_poll_vector_t *pv;
+
+ pv = vnet_hw_if_get_rxq_poll_vector (vm, node);
+
+ for (int i = 0; i < vec_len (pv); i++)
+ {
+ mrvl_pp2_if_t *ppif;
+ ppif = vec_elt_at_index (ppm->interfaces, pv[i].dev_instance);
+ if (ppif->flags & MRVL_PP2_IF_F_ADMIN_UP)
+ n_rx +=
+ mrvl_pp2_device_input_inline (vm, node, frame, ppif, pv[i].queue_id);
+ }
return n_rx;
}