dpdk: use common interface placement infra
[vpp.git] / src / plugins / dpdk / device / node.c
index 0549ba5..5cc611c 100644 (file)
@@ -631,16 +631,17 @@ dpdk_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * f)
   dpdk_main_t *dm = &dpdk_main;
   dpdk_device_t *xd;
   uword n_rx_packets = 0;
-  dpdk_device_and_queue_t *dq;
-  u32 thread_index = vlib_get_thread_index ();
+  vnet_device_input_runtime_t *rt = (void *) node->runtime_data;
+  vnet_device_and_queue_t *dq;
+  u32 thread_index = node->thread_index;
 
   /*
    * Poll all devices on this cpu for input/interrupts.
    */
   /* *INDENT-OFF* */
-  vec_foreach (dq, dm->devices_by_cpu[thread_index])
+  foreach_device_and_queue (dq, rt->devices_and_queues)
     {
-      xd = vec_elt_at_index(dm->devices, dq->device);
+      xd = vec_elt_at_index(dm->devices, dq->dev_instance);
       if (xd->flags & DPDK_DEVICE_FLAG_MAYBE_MULTISEG)
         n_rx_packets += dpdk_device_input (dm, xd, node, thread_index, dq->queue_id, /* maybe_multiseg */ 1);
       else