summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/device/node.c')
-rw-r--r--src/plugins/dpdk/device/node.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c
index e7d836fe0f8..2eec74eaab2 100644
--- a/src/plugins/dpdk/device/node.c
+++ b/src/plugins/dpdk/device/node.c
@@ -25,6 +25,7 @@
#include <vnet/mpls/packet.h>
#include <vnet/handoff.h>
#include <vnet/devices/devices.h>
+#include <vnet/interface/rx_queue_funcs.h>
#include <vnet/feature/feature.h>
#include <dpdk/device/dpdk_priv.h>
@@ -463,21 +464,21 @@ VLIB_NODE_FN (dpdk_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
dpdk_main_t *dm = &dpdk_main;
dpdk_device_t *xd;
uword n_rx_packets = 0;
- vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
- vnet_device_and_queue_t *dq;
+ vnet_hw_if_rxq_poll_vector_t *pv;
u32 thread_index = node->thread_index;
/*
* Poll all devices on this cpu for input/interrupts.
*/
- /* *INDENT-OFF* */
- foreach_device_and_queue (dq, rt->devices_and_queues)
+
+ pv = vnet_hw_if_get_rxq_poll_vector (vm, node);
+
+ for (int i = 0; i < vec_len (pv); i++)
{
- xd = vec_elt_at_index(dm->devices, dq->dev_instance);
- n_rx_packets += dpdk_device_input (vm, dm, xd, node, thread_index,
- dq->queue_id);
+ xd = vec_elt_at_index (dm->devices, pv[i].dev_instance);
+ n_rx_packets +=
+ dpdk_device_input (vm, dm, xd, node, thread_index, pv[i].queue_id);
}
- /* *INDENT-ON* */
return n_rx_packets;
}