numam-dpdk/app
Ferruh Yigit 33c12ac5ba test/table: fix build with GCC 11
Build error:
../app/test/test_table_tables.c: In function ‘test_table_stub’:
../app/test/test_table_tables.c:31:9:
	warning: ‘memset’ offset [0, 31] is out of the bounds [0, 0]
	[-Warray-bounds]
         memset((uint8_t *)mbuf + sizeof(struct rte_mbuf) + 32, 0, 32); \
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../app/test/test_table_tables.c:151:25:
	note: in expansion of macro ‘PREPARE_PACKET’
  151 |                         PREPARE_PACKET(mbufs[i], 0xadadadad);
      |                         ^~~~~~~~~~~~~~

'key' points to mbuf header + 32 bytes, and memset clears next 32 bytes
of 'key', so overall there needs to be 64 bytes after mbuf header.
Adding a mbuf size check before memset.

The original code has an assumption that mbuf data buffer follows mbuf
header, this patch accepts same assumption.

Bugzilla ID: 677
Fixes: 5205954791 ("app/test: packet framework unit tests")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-05-18 10:52:45 +02:00
..
pdump
proc-info
test test/table: fix build with GCC 11 2021-05-18 10:52:45 +02:00
test-acl
test-bbdev app/bbdev: fix HARQ error messages 2021-05-05 15:57:59 +02:00
test-cmdline
test-compress-perf app: reduce indentation in build files 2021-04-21 14:04:09 +02:00
test-crypto-perf app/crypto-perf: check memory allocation 2021-05-12 18:14:19 +02:00
test-eventdev app/eventdev: fix lcore parsing skipping last core 2021-05-09 18:00:18 +02:00
test-fib
test-flow-perf ethdev: add pre-defined meter policy API 2021-04-21 12:22:17 +02:00
test-pipeline app: reduce indentation in build files 2021-04-21 14:04:09 +02:00
test-pmd app/testpmd: support action meter color 2021-05-12 14:06:27 +02:00
test-regex app/regex: fix usage text 2021-04-09 14:31:41 +02:00
test-sad
meson.build app: reduce indentation in build files 2021-04-21 14:04:09 +02:00