net/virtio-user: fix Rx interrupts with multi-queue
authorYuan Wang <yuanx.wang@intel.com>
Mon, 4 Jul 2022 07:04:28 +0000 (15:04 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 4 Jul 2022 08:28:05 +0000 (10:28 +0200)
The callfds[] array stores eventfds sequentially for Rx and Tx vq.

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Cc: stable@dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
drivers/net/virtio/virtio_user/virtio_user_dev.c

index 35aa76b..f9cada0 100644 (file)
@@ -417,7 +417,7 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
        for (i = 0; i < dev->max_queue_pairs; ++i) {
                if (rte_intr_efds_index_set(eth_dev->intr_handle, i,
-                               dev->callfds[i]))
+                               dev->callfds[2 * i + VTNET_SQ_RQ_QUEUE_IDX]))
                        return -rte_errno;
        }