Accepting request 887814 from network
OBS-URL: https://build.opensuse.org/request/show/887814 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dpdk?expand=0&rev=47
This commit is contained in:
commit
b470799e45
49
0001-kni-fix-build-with-Linux-5.9.patch
Normal file
49
0001-kni-fix-build-with-Linux-5.9.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 87efaea6376c8ae1a69e471450744a973995726b Mon Sep 17 00:00:00 2001
|
||||
From: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||
Date: Mon, 17 Aug 2020 11:32:47 +0100
|
||||
Subject: [PATCH] kni: fix build with Linux 5.9
|
||||
|
||||
Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get
|
||||
'struct task_struct' parameter:
|
||||
commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")
|
||||
|
||||
The change reflected to the KNI with version check.
|
||||
|
||||
Cc: stable@dpdk.org
|
||||
|
||||
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
|
||||
---
|
||||
kernel/linux/kni/compat.h | 4 ++++
|
||||
kernel/linux/kni/kni_dev.h | 5 +++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
Index: dpdk-stable-19.11.4/kernel/linux/kni/compat.h
|
||||
===================================================================
|
||||
--- dpdk-stable-19.11.4.orig/kernel/linux/kni/compat.h
|
||||
+++ dpdk-stable-19.11.4/kernel/linux/kni/compat.h
|
||||
@@ -138,3 +138,7 @@
|
||||
(SLE_VERSION_CODE && SLE_VERSION_CODE == SLE_VERSION(15, 3, 0))
|
||||
#define HAVE_TX_TIMEOUT_TXQUEUE
|
||||
#endif
|
||||
+
|
||||
+#if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
|
||||
+#define HAVE_TSK_IN_GUP
|
||||
+#endif
|
||||
Index: dpdk-stable-19.11.4/kernel/linux/kni/kni_dev.h
|
||||
===================================================================
|
||||
--- dpdk-stable-19.11.4.orig/kernel/linux/kni/kni_dev.h
|
||||
+++ dpdk-stable-19.11.4/kernel/linux/kni/kni_dev.h
|
||||
@@ -101,8 +101,13 @@ static inline phys_addr_t iova_to_phys(s
|
||||
offset = iova & (PAGE_SIZE - 1);
|
||||
|
||||
/* Read one page struct info */
|
||||
+#ifdef HAVE_TSK_IN_GUP
|
||||
ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
|
||||
FOLL_TOUCH, &page, NULL, NULL);
|
||||
+#else
|
||||
+ ret = get_user_pages_remote(tsk->mm, iova, 1,
|
||||
+ FOLL_TOUCH, &page, NULL, NULL);
|
||||
+#endif
|
||||
if (ret < 0)
|
||||
return 0;
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 21 10:36:13 UTC 2021 - Matthias Gerstner <matthias.gerstner@suse.com>
|
||||
|
||||
- add 0001-kni-fix-build-with-Linux-5.9.patch: fixes the build against kernel
|
||||
>= 5.9. Also see here:
|
||||
|
||||
http://inbox.dpdk.org/users/CAJFAV8w8ozEkdSKdBHEHXJDxpChorGa1jUsNEcPMptG30bWykw@mail.gmail.com/T
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 29 09:13:17 UTC 2020 - Jaime Caamaño Ruiz <jcaamano@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package dpdk
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -69,6 +69,7 @@ Patch5: 0003-vhost-crypto-fix-missed-request-check-for-copy-mode.patch
|
||||
Patch6: 0004-vhost-crypto-fix-incorrect-write-back-source.patch
|
||||
Patch7: 0005-vhost-crypto-fix-data-length-check.patch
|
||||
Patch8: 0006-vhost-crypto-fix-possible-TOCTOU-attack.patch
|
||||
Patch9: 0001-kni-fix-build-with-Linux-5.9.patch
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libelf-devel
|
||||
@ -173,6 +174,7 @@ The DPDK Kernel NIC Interface (KNI) allows userspace applications access to the
|
||||
%patch6 -p1 -z .init
|
||||
%patch7 -p1 -z .init
|
||||
%patch8 -p1 -z .init
|
||||
%patch9 -p1 -z .init
|
||||
|
||||
# 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