Thread (56 messages) 56 messages, 8 authors, 2017-10-13

Re: [PATCH v5 4/5] igb_uio: use msi mask functions from kernel, little corrections

From: Markus Theil <hidden>
Date: 2017-09-04 15:16:26

On 04.09.2017 14:43, Ferruh Yigit wrote:
On 8/31/2017 10:46 PM, Markus Theil wrote:
quoted
This patch substitutes the custom MSI/MSI-X mask code and uses
already existing kernel APIs. Feedback/small corrections to the previous
patch of this series are also incorporated.

Signed-off-by: Markus Theil <redacted>
<...>
quoted
+	if (udev->mode == RTE_INTR_MODE_MSIX || udev->mode == RTE_INTR_MODE_MSI) {
+#ifdef HAVE_PCI_MSI_MASK_IRQ
+		if (irq_state == 1)
+			pci_msi_unmask_irq(irq);
+		else
+			pci_msi_mask_irq(irq);
It is an option to keep using mask_msi_irq() without #ifdef, it seems in
newer version of the kernel mask_msi_irq() is already wrapper to the
pci_msi_mask_irq().

Although this may make the code simpler, it can break it if
mask_msi_irq() wrapper removed.

I would go with using mask_msi_irq() directly, but no strong opinion...

<...>
I don't know what the comment "Conversion helpers. Should be removed
after merging" in msi.h really means. If the functions following the
comment are deleted in one of the next versions, I would not change
these lines. Otherwise I second your comment.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help