igb_uio: fix build with kernel 4.3
authorDavid Hunt <david.hunt@intel.com>
Fri, 30 Oct 2015 12:14:17 +0000 (12:14 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Nov 2015 23:02:52 +0000 (00:02 +0100)
Fix to take this change into account: https://lkml.org/lkml/2015/7/9/101
Has been applied to Kernel 4.3.0-rc6

Linux: 4a7cc831 ("genirq/MSI: Move msi_list from struct pci_dev to struct device")

Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_eal/linuxapp/igb_uio/igb_uio.c

index 3173e93..918861a 100644 (file)
@@ -248,8 +248,13 @@ igbuio_pci_irqcontrol(struct uio_info *info, s32 irq_state)
        else if (udev->mode == RTE_INTR_MODE_MSIX) {
                struct msi_desc *desc;
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0))
                list_for_each_entry(desc, &pdev->msi_list, list)
                        igbuio_msix_mask_irq(desc, irq_state);
+#else
+               list_for_each_entry(desc, &pdev->dev.msi_list, list)
+                       igbuio_msix_mask_irq(desc, irq_state);
+#endif
        }
        pci_cfg_access_unlock(pdev);