Skip to contentSkip to conversation

interrupts: add uio type to support multiple interrupt vector

PATCH In review Tianli Lai 2 participants 2 messages Apr 7, 2022 – Apr 28, 2022

lore
Share & tools
lore

Tianli Lai

author
#0 lore raw

PATCH 1/1 interrupts: add uio type to support multiple interrupt vector

vmxnet3 device use MSI-X interrupt type.
vmxnet3 driver configure the hardware to generate MSI-X interrupts would fail when call rte_intr_cap_multiple function return zero.

---
 lib/eal/linux/eal_interrupts.c | 3 +++
 1 file changed, 3 insertions(+)
lib/eal/linux/eal_interrupts.c +3 -0
index d52ec8eb4c..4b4dffa20c 100644
@@ -1596,6 +1596,9 @@ rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
 	if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VDEV)
 		return 1;
 
+	if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_UIO)
+		return 1;
+
 	return 0;
 }
 
Signature · 1 line
2.27.0
#1 lore raw
Quoted 4 lines · Tianli Lai

vmxnet3 device use MSI-X interrupt type.
vmxnet3 driver configure the hardware to generate MSI-X interrupts would fail when call rte_intr_cap_multiple function return zero.

Iiuc, the issue is that you are using vmxnet3 devices bound to igb_uio. Out of curiosity, why not use vfio-pci?

Quoted 11 lines
---
 lib/eal/linux/eal_interrupts.c | 3 +++
 1 file changed, 3 insertions(+)
lib/eal/linux/eal_interrupts.c +0 -0
index d52ec8eb4c..4b4dffa20c 100644

lib/eal/linux/eal_interrupts.c rte_intr_cap_multiple(struct rte_intr_handle *intr_handle) · line 1601

Quoted 6 lines
lib/eal/linux/eal_interrupts.c +3 -0
@@ -1596,6 +1596,9 @@ rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
        if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VDEV)
                return 1;
 
+       if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_UIO)
+               return 1;
+

Doing this will let drivers think there are multiple fds, ok.

Though (I am not entirely sure) with this patch only, are not all vectors pointing to a single fd.
For example, did you test Rx interrupts? with more than 1 rxq?

Signature · 1 line
David Marchand