summaryrefslogtreecommitdiffstats
path: root/recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch')
-rw-r--r--recipes-extended/dpdk/dpdk/0001-test-table-fix-build-with-GCC-11.patch56
1 files changed, 0 insertions, 56 deletions
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