Accepting request 497858 from home:markoschandras:network
- Add upstream patch to fix building against linux kernel 4.11 [+0005-kni-fix-build-with-kernel-4.11.patch] - Add upstream patch to fix building against linux kernel 4.11 [+0005-kni-fix-build-with-kernel-4.11.patch] OBS-URL: https://build.opensuse.org/request/show/497858 OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=49
This commit is contained in:
parent
b62efd3af8
commit
012aa9aad9
76
0005-kni-fix-build-with-kernel-4.11.patch
Normal file
76
0005-kni-fix-build-with-kernel-4.11.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From d4d2380cbb02980bf0334601d9ce6ec5400413f9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||||
|
Date: Tue, 21 Mar 2017 09:54:48 +0000
|
||||||
|
Subject: [PATCH] kni: fix build with kernel 4.11
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
compile error:
|
||||||
|
.../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
|
||||||
|
error: implicit declaration of function ‘signal_pending’
|
||||||
|
[-Werror=implicit-function-declaration]
|
||||||
|
if (signal_pending(current) || ret_val <= 0) {
|
||||||
|
^~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Linux 4.11 moves signal function declarations to its own header file:
|
||||||
|
Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
|
||||||
|
sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")
|
||||||
|
|
||||||
|
Use new header file "linux/sched/signal.h" to fix the build error.
|
||||||
|
|
||||||
|
Cc: stable@dpdk.org
|
||||||
|
|
||||||
|
Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
|
||||||
|
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||||
|
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
|
||||||
|
Tested-by: Pankaj Gupta <pagupta@redhat.com>
|
||||||
|
---
|
||||||
|
lib/librte_eal/linuxapp/kni/compat.h | 6 ++++++
|
||||||
|
lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++
|
||||||
|
2 files changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
|
||||||
|
index 78da08e5e..d96275af9 100644
|
||||||
|
--- a/lib/librte_eal/linuxapp/kni/compat.h
|
||||||
|
+++ b/lib/librte_eal/linuxapp/kni/compat.h
|
||||||
|
@@ -2,6 +2,8 @@
|
||||||
|
* Minimal wrappers to allow compiling kni on older kernels.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <linux/version.h>
|
||||||
|
+
|
||||||
|
#ifndef RHEL_RELEASE_VERSION
|
||||||
|
#define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
|
||||||
|
#endif
|
||||||
|
@@ -67,3 +69,7 @@
|
||||||
|
(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)))
|
||||||
|
#undef NET_NAME_UNKNOWN
|
||||||
|
#endif
|
||||||
|
+
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||||
|
+#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
|
||||||
|
+#endif
|
||||||
|
diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h
|
||||||
|
index 002e5fa6c..72385ab4c 100644
|
||||||
|
--- a/lib/librte_eal/linuxapp/kni/kni_dev.h
|
||||||
|
+++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
|
||||||
|
@@ -30,9 +30,15 @@
|
||||||
|
#endif
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
|
+#include "compat.h"
|
||||||
|
+
|
||||||
|
#include <linux/if.h>
|
||||||
|
#include <linux/wait.h>
|
||||||
|
+#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
|
||||||
|
+#include <linux/sched/signal.h>
|
||||||
|
+#else
|
||||||
|
#include <linux/sched.h>
|
||||||
|
+#endif
|
||||||
|
#include <linux/netdevice.h>
|
||||||
|
#include <linux/spinlock.h>
|
||||||
|
#include <linux/list.h>
|
||||||
|
--
|
||||||
|
2.12.2
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 23 22:25:38 UTC 2017 - mchandras@suse.de
|
||||||
|
|
||||||
|
- Add upstream patch to fix building against linux kernel 4.11
|
||||||
|
[+0005-kni-fix-build-with-kernel-4.11.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
@ -61,6 +61,9 @@ Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
|||||||
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||||
Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
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-kernel-4.11.patch
|
||||||
|
# This patch fixes the kni build against linux kernel 4.11
|
||||||
|
Patch5: 0005-kni-fix-build-with-kernel-4.11.patch
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc6
|
BuildRequires: gcc6
|
||||||
@ -149,6 +152,8 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%patch2 -p1 -z .kni1
|
%patch2 -p1 -z .kni1
|
||||||
%patch3 -p1 -z .kni2
|
%patch3 -p1 -z .kni2
|
||||||
%patch4 -p1 -z .thunderx
|
%patch4 -p1 -z .thunderx
|
||||||
|
%patch5 -p1 -z .kni3
|
||||||
|
|
||||||
# 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 May 23 22:25:38 UTC 2017 - mchandras@suse.de
|
||||||
|
|
||||||
|
- Add upstream patch to fix building against linux kernel 4.11
|
||||||
|
[+0005-kni-fix-build-with-kernel-4.11.patch]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
Tue Apr 25 13:40:05 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
@ -59,6 +59,9 @@ Patch1: 0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
|
|||||||
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
Patch2: 0002-kni-define-HAVE_VF_VLAN_PROTO-for-SLES12SP3.patch
|
||||||
Patch3: 0003-kni-define-HAVE_TRANS_START_HELPER-for-SLES12SP3.patch
|
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-kernel-4.11.patch
|
||||||
|
# This patch fixes the kni build against linux kernel 4.11
|
||||||
|
Patch5: 0005-kni-fix-build-with-kernel-4.11.patch
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc6
|
BuildRequires: gcc6
|
||||||
@ -147,6 +150,8 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
|||||||
%patch2 -p1 -z .kni1
|
%patch2 -p1 -z .kni1
|
||||||
%patch3 -p1 -z .kni2
|
%patch3 -p1 -z .kni2
|
||||||
%patch4 -p1 -z .thunderx
|
%patch4 -p1 -z .thunderx
|
||||||
|
%patch5 -p1 -z .kni3
|
||||||
|
|
||||||
# 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