diff options
Diffstat (limited to 'recipes-extended')
-rw-r--r-- | recipes-extended/dpdk/dpdk/0001-Starting-from-Linux-5.9-get_user_pages_remote-API-do.patch | 54 | ||||
-rw-r--r-- | recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch | 56 | ||||
-rw-r--r-- | recipes-extended/dpdk/dpdk/usertools-devbind-fix-binding-for-built-in-kernel-dr.patch | 54 | ||||
-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 @@ | |||
1 | From 7e0102a6d29732b92c25ca4793d641ce6c98e95a Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Wed, 23 Sep 2020 11:00:03 +0800 | ||
4 | Subject: [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 | |||
8 | The change reflected to the KNI with version check. | ||
9 | |||
10 | Cc: stable@dpdk.org | ||
11 | |||
12 | Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> | ||
13 | |||
14 | Upstream-Status: Backport [https://patches.dpdk.org/patch/75577/] | ||
15 | |||
16 | Signed-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 | |||
22 | diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h | ||
23 | index 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 | ||
34 | diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h | ||
35 | index 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 | -- | ||
53 | 2.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 @@ | |||
1 | From 33c12ac5ba5f09727c6de807e71403dd260a7bbc Mon Sep 17 00:00:00 2001 | ||
2 | From: Ferruh Yigit <ferruh.yigit@intel.com> | ||
3 | Date: Mon, 17 May 2021 16:57:39 +0100 | ||
4 | Subject: [PATCH] test/table: fix build with GCC 11 | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Build 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 | ||
22 | of 'key', so overall there needs to be 64 bytes after mbuf header. | ||
23 | Adding a mbuf size check before memset. | ||
24 | |||
25 | The original code has an assumption that mbuf data buffer follows mbuf | ||
26 | header, this patch accepts same assumption. | ||
27 | |||
28 | Bugzilla ID: 677 | ||
29 | Fixes: 5205954791cb ("app/test: packet framework unit tests") | ||
30 | Cc: stable@dpdk.org | ||
31 | |||
32 | Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/33c12ac5ba5f09727c6de807e71403dd260a7bbc] | ||
33 | |||
34 | Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> | ||
35 | Signed-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 | |||
40 | diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c | ||
41 | index 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 | -- | ||
55 | 2.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 @@ | |||
1 | From b2a1d7a4661dc78a4c070de5542bf2c201762cb2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yongxin Liu <yongxin.liu@windriver.com> | ||
3 | Date: Mon, 23 Nov 2020 11:02:52 +0800 | ||
4 | Subject: [PATCH] usertools/devbind: fix binding for built-in kernel drivers | ||
5 | |||
6 | A driver can be loaded as a dynamic module or a built-in module. | ||
7 | In commit 681a67288655 ("usertools: check if module is loaded | ||
8 | before binding"), script only checks modules in /sys/module/. | ||
9 | |||
10 | However, for built-in kernel driver, it only shows up in /sys/module/, | ||
11 | if it has a version or at least one parameter. So add check for | ||
12 | modules in /lib/modules/$(uname -r)/modules.builtin. | ||
13 | |||
14 | Upstream-Status: Submitted [https://patches.dpdk.org/patch/84454] | ||
15 | |||
16 | Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> | ||
17 | --- | ||
18 | usertools/dpdk-devbind.py | 13 ++++++++++++- | ||
19 | 1 file changed, 12 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py | ||
22 | index 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 | -- | ||
53 | 2.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 | |||
3 | SRC_URI += " \ | 3 | SRC_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 | ||
11 | STABLE = "-stable" | 8 | STABLE = "-stable" |
12 | BRANCH = "19.11" | 9 | BRANCH = "19.11" |
13 | SRCREV = "1d28832feb881d4512993791d30d695cc9c7160b" | 10 | SRCREV = "a3d97ddaead03cb19b5160bc78e724659795aea7" |
14 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
15 | 12 | ||
16 | COMPATIBLE_MACHINE = "null" | 13 | COMPATIBLE_MACHINE = "null" |