Accepting request 511155 from home:ndas:branches:network
- Switch to pci_enable_msix_range() for kernel > 4.8 [+0006-kni-fix-ethtool-build-with-kernel-4.11.patch] - Switch to pci_enable_msix_range() for kernel > 4.8 [+0006-kni-fix-ethtool-build-with-kernel-4.11.patch] OBS-URL: https://build.opensuse.org/request/show/511155 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=53
This commit is contained in:
parent
97a5b5dfba
commit
b2c344dce4
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
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 18 11:26:36 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Switch to pci_enable_msix_range() for kernel > 4.8
|
||||||
|
[+0006-kni-fix-ethtool-build-with-kernel-4.11.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
|||||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.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
|
#PATCH-FIX-UPSTREAM 0005-kni-fix-build-with-gcc-7.1.patch bsc#1042372
|
||||||
Patch5: 0005-kni-fix-build-with-gcc-7.1.patch
|
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
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libnuma-devel
|
BuildRequires: libnuma-devel
|
||||||
@ -152,6 +154,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%patch3 -p1 -z .kni2
|
%patch3 -p1 -z .kni2
|
||||||
%patch4 -p1 -z .thunderx
|
%patch4 -p1 -z .thunderx
|
||||||
%patch5 -p1 -z .kni3
|
%patch5 -p1 -z .kni3
|
||||||
|
%patch6 -p1 -z .kni4
|
||||||
|
|
||||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 18 11:26:36 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- Switch to pci_enable_msix_range() for kernel > 4.8
|
||||||
|
[+0006-kni-fix-ethtool-build-with-kernel-4.11.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
Wed Jun 14 12:55:10 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
@ -61,6 +61,8 @@ Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
|||||||
Patch4: 0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.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
|
#PATCH-FIX-UPSTREAM 0005-kni-fix-build-with-gcc-7.1.patch bsc#1042372
|
||||||
Patch5: 0005-kni-fix-build-with-gcc-7.1.patch
|
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
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libnuma-devel
|
BuildRequires: libnuma-devel
|
||||||
@ -150,6 +152,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%patch3 -p1 -z .kni2
|
%patch3 -p1 -z .kni2
|
||||||
%patch4 -p1 -z .thunderx
|
%patch4 -p1 -z .thunderx
|
||||||
%patch5 -p1 -z .kni3
|
%patch5 -p1 -z .kni3
|
||||||
|
%patch6 -p1 -z .kni4
|
||||||
|
|
||||||
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
# This fixes CROSS compilation (broken) in the mk file for ThunderX
|
||||||
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
sed -i '/^CROSS /s/^/#/' mk/machine/thunderx/rte.vars.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user