summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/input.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-11-06 23:25:57 +0100
committerDamjan Marion <dmarion@me.com>2021-01-21 13:20:10 +0000
commit941005336ee8cec614a856089f3d873f7d98135c (patch)
tree2a9287e8a16cfbfecac80251637658a4cf93db66 /src/plugins/avf/input.c
parent1e4309538dd178827fc2a5efb3ceb80a4b1f1a8f (diff)
interface: rx queue infra rework, part one
Type: improvement Change-Id: I4008cadfd5141f921afbdc09a3ebcd1dcf88eb29 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/input.c')
-rw-r--r--src/plugins/avf/input.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c
index 85f97ca3e49..5041f6ef4e7 100644
--- a/src/plugins/avf/input.c
+++ b/src/plugins/avf/input.c
@@ -19,7 +19,7 @@
#include <vlib/unix/unix.h>
#include <vlib/pci/pci.h>
#include <vnet/ethernet/ethernet.h>
-#include <vnet/devices/devices.h>
+#include <vnet/interface/rx_queue_funcs.h>
#include <avf/avf.h>
@@ -473,17 +473,18 @@ VLIB_NODE_FN (avf_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
u32 n_rx = 0;
- 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)
- {
- avf_device_t *ad;
- ad = avf_get_device (dq->dev_instance);
- if ((ad->flags & AVF_DEVICE_F_ADMIN_UP) == 0)
- continue;
- n_rx += avf_device_input_inline (vm, node, frame, ad, 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++)
+ {
+ avf_device_t *ad = avf_get_device (pv[i].dev_instance);
+ if ((ad->flags & AVF_DEVICE_F_ADMIN_UP) == 0)
+ continue;
+ n_rx += avf_device_input_inline (vm, node, frame, ad, pv[i].queue_id);
+ }
+
return n_rx;
}