summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2021-08-27 23:39:00 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2021-08-28 00:39:36 +0800
commit6c1b9b6cfe495ed5e62e1d2b8f75f24a790ee696 (patch)
tree2b26375385fcc971d8bfcdfa7b0b0271f75b3514
parent84709a1281172140661c49bca86b248fe68301cc (diff)
downloadmeta-dpdk-6c1b9b6cfe495ed5e62e1d2b8f75f24a790ee696.tar.gz
dpdk/19.11: upgrade 19.11.5 -> 19.11.9honister
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-extended/dpdk/dpdk/0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch54
-rw-r--r--recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch56
-rw-r--r--recipes-extended/dpdk/dpdk/usertools-devbind-fix-binding-for-built-in-kernel-dr.patch54
-rw-r--r--recipes-extended/dpdk/dpdk_19.11.9.bb (renamed from recipes-extended/dpdk/dpdk_19.11.5.bb)7
4 files changed, 2 insertions, 169 deletions
diff --git a/recipes-extended/dpdk/dpdk/0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch b/recipes-extended/dpdk/dpdk/0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch
deleted file mode 100644
index ad6fd93..0000000
--- a/recipes-extended/dpdk/dpdk/0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From 7e0102a6d29732b92c25ca4793d641ce6c98e95a Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 23 Sep 2020 11:00:03 +0800
4Subject: [PATCH] Starting from Linux 5.9 'get_user_pages_remote()' API doesn't
5 get 'struct task_struct' parameter: commit 64019a2e467a ("mm/gup: remove
6 task_struct pointer for all gup code")
7
8The change reflected to the KNI with version check.
9
10Cc: stable@dpdk.org
11
12Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
13
14Upstream-Status: Backport [https://patches.dpdk.org/patch/75577/]
15
16Signed-off-by: He Zhe <zhe.he@windriver.com>
17---
18 kernel/linux/kni/compat.h | 4 ++++
19 kernel/linux/kni/kni_dev.h | 5 +++++
20 2 files changed, 9 insertions(+)
21
22diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
23index 9ee45dbf6..d515b2766 100644
24--- a/kernel/linux/kni/compat.h
25+++ b/kernel/linux/kni/compat.h
26@@ -134,3 +134,7 @@
27 #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
28 #define HAVE_TX_TIMEOUT_TXQUEUE
29 #endif
30+
31+#if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
32+#define HAVE_TSK_IN_GUP
33+#endif
34diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
35index ca5f92a47..c15da311b 100644
36--- a/kernel/linux/kni/kni_dev.h
37+++ b/kernel/linux/kni/kni_dev.h
38@@ -101,8 +101,13 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
39 offset = iova & (PAGE_SIZE - 1);
40
41 /* Read one page struct info */
42+#ifdef HAVE_TSK_IN_GUP
43 ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
44 FOLL_TOUCH, &page, NULL, NULL);
45+#else
46+ ret = get_user_pages_remote(tsk->mm, iova, 1,
47+ FOLL_TOUCH, &page, NULL, NULL);
48+#endif
49 if (ret < 0)
50 return 0;
51
52--
532.17.1
54
diff --git a/recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch b/recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch
deleted file mode 100644
index 4f76290..0000000
--- a/recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 33c12ac5ba5f09727c6de807e71403dd260a7bbc Mon Sep 17 00:00:00 2001
2From: Ferruh Yigit <ferruh.yigit@intel.com>
3Date: Mon, 17 May 2021 16:57:39 +0100
4Subject: [PATCH] test/table: fix build with GCC 11
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Build error:
10../app/test/test_table_tables.c: In function ‘test_table_stub’:
11../app/test/test_table_tables.c:31:9:
12 warning: ‘memset’ offset [0, 31] is out of the bounds [0, 0]
13 [-Warray-bounds]
14 memset((uint8_t *)mbuf + sizeof(struct rte_mbuf) + 32, 0, 32); \
15 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16../app/test/test_table_tables.c:151:25:
17 note: in expansion of macro ‘PREPARE_PACKET’
18 151 | PREPARE_PACKET(mbufs[i], 0xadadadad);
19 | ^~~~~~~~~~~~~~
20
21'key' points to mbuf header + 32 bytes, and memset clears next 32 bytes
22of 'key', so overall there needs to be 64 bytes after mbuf header.
23Adding a mbuf size check before memset.
24
25The original code has an assumption that mbuf data buffer follows mbuf
26header, this patch accepts same assumption.
27
28Bugzilla ID: 677
29Fixes: 5205954791cb ("app/test: packet framework unit tests")
30Cc: stable@dpdk.org
31
32Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/33c12ac5ba5f09727c6de807e71403dd260a7bbc]
33
34Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
35Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
36---
37 app/test/test_table_tables.c | 3 ++-
38 1 file changed, 2 insertions(+), 1 deletion(-)
39
40diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
41index 1aa269f95..4ff6ab16a 100644
42--- a/app/test/test_table_tables.c
43+++ b/app/test/test_table_tables.c
44@@ -28,7 +28,8 @@ table_test table_tests[] = {
45 APP_METADATA_OFFSET(0)); \
46 key = RTE_MBUF_METADATA_UINT8_PTR(mbuf, \
47 APP_METADATA_OFFSET(32)); \
48- memset(key, 0, 32); \
49+ if (mbuf->priv_size + mbuf->buf_len >= 64) \
50+ memset(key, 0, 32); \
51 k32 = (uint32_t *) key; \
52 k32[0] = (value); \
53 *signature = pipeline_test_hash(key, NULL, 0, 0); \
54--
552.17.1
56
diff --git a/recipes-extended/dpdk/dpdk/usertools-devbind-fix-binding-for-built-in-kernel-dr.patch b/recipes-extended/dpdk/dpdk/usertools-devbind-fix-binding-for-built-in-kernel-dr.patch
deleted file mode 100644
index 7eb28f8..0000000
--- a/recipes-extended/dpdk/dpdk/usertools-devbind-fix-binding-for-built-in-kernel-dr.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From b2a1d7a4661dc78a4c070de5542bf2c201762cb2 Mon Sep 17 00:00:00 2001
2From: Yongxin Liu <yongxin.liu@windriver.com>
3Date: Mon, 23 Nov 2020 11:02:52 +0800
4Subject: [PATCH] usertools/devbind: fix binding for built-in kernel drivers
5
6A driver can be loaded as a dynamic module or a built-in module.
7In commit 681a67288655 ("usertools: check if module is loaded
8before binding"), script only checks modules in /sys/module/.
9
10However, for built-in kernel driver, it only shows up in /sys/module/,
11if it has a version or at least one parameter. So add check for
12modules in /lib/modules/$(uname -r)/modules.builtin.
13
14Upstream-Status: Submitted [https://patches.dpdk.org/patch/84454]
15
16Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
17---
18 usertools/dpdk-devbind.py | 13 ++++++++++++-
19 1 file changed, 12 insertions(+), 1 deletion(-)
20
21diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
22index b1d149876..89a0ab1c9 100755
23--- a/usertools/dpdk-devbind.py
24+++ b/usertools/dpdk-devbind.py
25@@ -8,6 +8,7 @@
26 import os
27 import getopt
28 import subprocess
29+import platform
30 from os.path import exists, abspath, dirname, basename
31
32 # The PCI base class for all devices
33@@ -172,7 +173,17 @@ def module_is_loaded(module):
34
35 loaded_modules = sysfs_mods
36
37- return module in sysfs_mods
38+ # add built-in modules as loaded
39+ release = platform.uname().release
40+ filename = os.path.join("/lib/modules/", release, "modules.builtin")
41+ if os.path.exists(filename):
42+ try:
43+ with open(filename) as f:
44+ loaded_modules += [os.path.splitext(os.path.basename(mod))[0] for mod in f]
45+ except IOError:
46+ print("Warning: cannot read list of built-in kernel modules")
47+
48+ return module in loaded_modules
49
50
51 def check_modules():
52--
532.14.4
54
diff --git a/recipes-extended/dpdk/dpdk_19.11.5.bb b/recipes-extended/dpdk/dpdk_19.11.9.bb
index 41f56b0..3c3f035 100644
--- a/recipes-extended/dpdk/dpdk_19.11.5.bb
+++ b/recipes-extended/dpdk/dpdk_19.11.9.bb
@@ -3,14 +3,11 @@ include dpdk.inc
3SRC_URI += " \ 3SRC_URI += " \
4 file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ 4 file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
5 file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \ 5 file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \
6 file://0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch \ 6 "
7 file://usertools-devbind-fix-binding-for-built-in-kernel-dr.patch \
8 file://0001-test-table-fix-build-with-GCC-11.patch"
9
10 7
11STABLE = "-stable" 8STABLE = "-stable"
12BRANCH = "19.11" 9BRANCH = "19.11"
13SRCREV = "1d28832feb881d4512993791d30d695cc9c7160b" 10SRCREV = "a3d97ddaead03cb19b5160bc78e724659795aea7"
14S = "${WORKDIR}/git" 11S = "${WORKDIR}/git"
15 12
16COMPATIBLE_MACHINE = "null" 13COMPATIBLE_MACHINE = "null"