Accepting request 511401 from network
1 OBS-URL: https://build.opensuse.org/request/show/511401 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dpdk?expand=0&rev=18
This commit is contained in:
commit
0aa3b297c3
66
0006-kni-fix-ethtool-build-with-kernel-4.11.patch
Normal file
66
0006-kni-fix-ethtool-build-with-kernel-4.11.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 9fb3cd2c041eeca30b6c46e5d555d857d6096ae7 Mon Sep 17 00:00:00 2001
|
||||
From: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||
Date: Wed, 3 May 2017 17:00:16 +0100
|
||||
Subject: [PATCH] kni: fix ethtool build with kernel 4.11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
build error:
|
||||
.../lib/librte_eal/linuxapp/kni/igb_main.c:1034:10:
|
||||
error: implicit declaration of function ‘pci_enable_msix’
|
||||
err = pci_enable_msix(pdev,
|
||||
^~~~~~~~~~~~~~~
|
||||
|
||||
This build error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option
|
||||
enabled.
|
||||
|
||||
Following Linux commit removes the pci_enable_msix()
|
||||
Linux: 4244de1c64de ("PCI: remove pci_enable_msix")
|
||||
|
||||
Switch to pci_enable_msix_range() for kernel > 4.8 since current Linux
|
||||
igb driver uses this function.
|
||||
|
||||
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
||||
---
|
||||
lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 7 +++++++
|
||||
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
|
||||
index c0d52db33..5f1f3a6b5 100644
|
||||
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
|
||||
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
|
||||
@@ -1031,8 +1031,15 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter, bool msix)
|
||||
for (i = 0; i < numvecs; i++)
|
||||
adapter->msix_entries[i].entry = i;
|
||||
|
||||
+#ifdef HAVE_PCI_ENABLE_MSIX
|
||||
err = pci_enable_msix(pdev,
|
||||
adapter->msix_entries, numvecs);
|
||||
+#else
|
||||
+ err = pci_enable_msix_range(pdev,
|
||||
+ adapter->msix_entries,
|
||||
+ numvecs,
|
||||
+ numvecs);
|
||||
+#endif
|
||||
if (err == 0)
|
||||
break;
|
||||
}
|
||||
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||
index 4abab4aa3..4c52da3c1 100644
|
||||
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
|
||||
@@ -3937,4 +3937,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
|
||||
#define HAVE_VF_VLAN_PROTO
|
||||
#endif /* >= 4.9.0, >= SLES12SP3 */
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
||||
+#define HAVE_PCI_ENABLE_MSIX
|
||||
+#endif
|
||||
+
|
||||
#endif /* _KCOMPAT_H_ */
|
||||
--
|
||||
2.13.2
|
||||
|
78
0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch
Normal file
78
0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 99bb58f3adc73046b538874a0944578146ee1189 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
||||
Date: Thu, 20 Apr 2017 15:11:23 +0200
|
||||
Subject: [PATCH] igb_uio: switch to new irq function for MSI-X
|
||||
|
||||
pci_enable_msix() will be removed in kernel 4.12.
|
||||
The new API pci_alloc_irq_vectors() is available
|
||||
since linux 4.8, thus let's use it.
|
||||
|
||||
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aff171641d18
|
||||
Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=4244de1c64de
|
||||
|
||||
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
||||
Reviewed-by: David Marchand <david.marchand@6wind.com>
|
||||
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||
|
||||
From 62d37a57656607a622a546c88cca5d78b23c4730 Mon Sep 17 00:00:00 2001
|
||||
From: Nirmoy Das <ndas@suse.de>
|
||||
Date: Tue, 18 Jul 2017 13:36:25 +0200
|
||||
Subject: [PATCH] backport upstream patch
|
||||
|
||||
---
|
||||
lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++++
|
||||
lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 11 +++++++++++
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h
|
||||
index 0d781e4..b800a53 100644
|
||||
--- a/lib/librte_eal/linuxapp/igb_uio/compat.h
|
||||
+++ b/lib/librte_eal/linuxapp/igb_uio/compat.h
|
||||
@@ -123,3 +123,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
#endif /* < 3.3.0 */
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
||||
+#define HAVE_PCI_ENABLE_MSIX
|
||||
+#endif
|
||||
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
|
||||
index df41e45..683cd8c 100644
|
||||
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
|
||||
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
|
||||
@@ -325,7 +325,9 @@ static int
|
||||
igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
{
|
||||
struct rte_uio_pci_dev *udev;
|
||||
+#ifdef HAVE_PCI_ENABLE_MSIX
|
||||
struct msix_entry msix_entry;
|
||||
+#endif
|
||||
int err;
|
||||
|
||||
udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
|
||||
@@ -379,6 +381,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
switch (igbuio_intr_mode_preferred) {
|
||||
case RTE_INTR_MODE_MSIX:
|
||||
/* Only 1 msi-x vector needed */
|
||||
+#ifdef HAVE_PCI_ENABLE_MSIX
|
||||
msix_entry.entry = 0;
|
||||
if (pci_enable_msix(dev, &msix_entry, 1) == 0) {
|
||||
dev_dbg(&dev->dev, "using MSI-X");
|
||||
@@ -386,6 +389,14 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
udev->mode = RTE_INTR_MODE_MSIX;
|
||||
break;
|
||||
}
|
||||
+#else
|
||||
+ if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSIX) == 1) {
|
||||
+ dev_dbg(&dev->dev, "using MSI-X");
|
||||
+ udev->info.irq = pci_irq_vector(dev, 0);
|
||||
+ udev->mode = RTE_INTR_MODE_MSIX;
|
||||
+ break;
|
||||
+ }
|
||||
+#endif
|
||||
/* fall back to INTX */
|
||||
case RTE_INTR_MODE_LEGACY:
|
||||
if (pci_intx_mask_supported(dev)) {
|
||||
--
|
||||
2.13.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 18 11:26:36 CEST 2017 - ndas@suse.de
|
||||
|
||||
- Do not use obsolete pci_enable_msix for() kernel > 4.8
|
||||
[+0006-kni-fix-ethtool-build-with-kernel-4.11.patch,
|
||||
+0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
||||
|
||||
|
@ -63,6 +63,9 @@ Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch
|
||||
#PATCH-FIX-UPSTREAM 0005-kni-fix-build-with-gcc-7.1.patch bsc#1042372
|
||||
Patch5: 0005-kni-fix-build-with-gcc-7.1.patch
|
||||
#PATCH-FIX-UPSTREAM 0006-kni-fix-ethtool-build-with-kernel-4.11.patch
|
||||
Patch6: 0006-kni-fix-ethtool-build-with-kernel-4.11.patch
|
||||
Patch7: 0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libnuma-devel
|
||||
@ -152,6 +155,8 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%patch3 -p1 -z .kni2
|
||||
%patch4 -p1 -z .thunderx
|
||||
%patch5 -p1 -z .kni3
|
||||
%patch6 -p1 -z .kni4
|
||||
%patch7 -p1 -z .igb1
|
||||
|
||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 18 11:26:36 CEST 2017 - ndas@suse.de
|
||||
|
||||
- Do not use obsolete pci_enable_msix for() kernel > 4.8
|
||||
[+0006-kni-fix-ethtool-build-with-kernel-4.11.patch,
|
||||
+0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
||||
|
||||
|
@ -61,6 +61,9 @@ Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch
|
||||
#PATCH-FIX-UPSTREAM 0005-kni-fix-build-with-gcc-7.1.patch bsc#1042372
|
||||
Patch5: 0005-kni-fix-build-with-gcc-7.1.patch
|
||||
#PATCH-FIX-UPSTREAM 0006-kni-fix-ethtool-build-with-kernel-4.11.patch
|
||||
Patch6: 0006-kni-fix-ethtool-build-with-kernel-4.11.patch
|
||||
Patch7: 0007-igb_uio-switch-to-new-irq-function-for-MSI-X.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libnuma-devel
|
||||
@ -150,6 +153,8 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%patch3 -p1 -z .kni2
|
||||
%patch4 -p1 -z .thunderx
|
||||
%patch5 -p1 -z .kni3
|
||||
%patch6 -p1 -z .kni4
|
||||
%patch7 -p1 -z .igb1
|
||||
|
||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||
|
Loading…
Reference in New Issue
Block a user