summaryrefslogtreecommitdiffstats
path: root/src/vlib/linux
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-06 00:06:26 +0000
committerDamjan Marion <damarion@cisco.com>2023-11-06 00:09:23 +0000
commit60529a8ef81d08c7aa0f7eaea402435b3c6d1eb6 (patch)
tree25ce448f702f295d35acdee379bee027d3c0d728 /src/vlib/linux
parent9c6fd897fdad825b83e2eb8ff68e6b8f03312f3e (diff)
pci: fix VFIO set IRQ code
Type: fix Fixes: 599a16b Change-Id: I954e037ab944028798f9aa2a93f45322c8c7b4bb Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/linux')
-rw-r--r--src/vlib/linux/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index 69d26fd7d64..62db8204182 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -1002,9 +1002,9 @@ vlib_pci_enable_msix_irq (vlib_main_t * vm, vlib_pci_dev_handle_t h,
return clib_error_return (0, "vfio driver is needed for MSI-X interrupt "
"support");
- for (i = start; i < start + count; i++)
+ for (i = 0; i < count; i++)
{
- linux_pci_irq_t *irq = vec_elt_at_index (p->msix_irqs, i);
+ linux_pci_irq_t *irq = vec_elt_at_index (p->msix_irqs, start + i);
fds[i] = irq->fd;
}