DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2] bus/pci: fix automatic interrupt type selection
@ 2025-06-20 12:50 Pekka Riikonen
  0 siblings, 0 replies; only message in thread
From: Pekka Riikonen @ 2025-06-20 12:50 UTC (permalink / raw)
  To: anatoly.burakov; +Cc: Dev

Check if kernel returns 0 interrupt vectors and try another interrupt
type in that case.  Failing to check the vector count can select an
interrupt type that's unusable.

Signed-off-by: Pekka Riikonen <priikone@iki.fi>
---
  drivers/bus/pci/linux/pci_vfio.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/drivers/bus/pci/linux/pci_vfio.c 
b/drivers/bus/pci/linux/pci_vfio.c
index 5317170231..02e7d7e40b 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -237,6 +237,10 @@ pci_vfio_setup_interrupts(struct rte_pci_device 
*dev, int vfio_dev_fd)
  				continue;
  		}

+		/* If no vectors, try another one */
+		if (irq.count == 0)
+			continue;
+
  		/* Reallocate the efds and elist fields of intr_handle based
  		 * on PCI device MSIX size.
  		 */
-- 
2.34.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-20 12:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-20 12:50 [PATCH v2] bus/pci: fix automatic interrupt type selection Pekka Riikonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).