numam-dpdk/drivers/net/ena
David Marchand 2449949584 net/ena: fix build with GCC 12
GCC 12 raises the following warning:

In file included from ../lib/mempool/rte_mempool.h:46,
                 from ../lib/mbuf/rte_mbuf.h:38,
                 from ../lib/net/rte_ether.h:22,
                 from ../drivers/net/ena/ena_ethdev.h:10,
                 from ../drivers/net/ena/ena_rss.c:6:
../drivers/net/ena/ena_rss.c: In function ‘ena_rss_key_fill’:
../lib/eal/x86/include/rte_memcpy.h:370:9: warning: array subscript 64 is
        outside array bounds of ‘uint8_t[40]’
        {aka ‘unsigned char[40]’} [-Warray-bounds]
  370 | rte_mov32((uint8_t *)dst + 2 * 32, (const uint8_t *)src + 2 * 32);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ena/ena_rss.c:51:24: note: while referencing ‘default_key’
   51 | static uint8_t default_key[ENA_HASH_KEY_SIZE];
      |                ^~~~~~~~~~~

This is a false positive because the copied size is checked against
ENA_HASH_KEY_SIZE in a (build) assert.
Silence this warning by calling memcpy with the minimal size.

Bugzilla ID: 849
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-06-15 10:19:18 +02:00
..
base net/ena/base: make IO memzone unique per port 2022-02-23 19:01:03 +01:00
ena_ethdev.c net/ena: update version to 2.7.0 2022-06-07 21:01:09 +02:00
ena_ethdev.h net/ena: add device argument to disable LLQ 2022-06-07 21:01:09 +02:00
ena_logs.h net/ena: use common debug options 2021-07-23 17:42:33 +02:00
ena_platform.h net/ena: remove endian swap functions 2021-05-11 15:00:44 +02:00
ena_rss.c net/ena: fix build with GCC 12 2022-06-15 10:19:18 +02:00
meson.build net/ena: rework RSS configuration 2021-07-23 17:44:09 +02:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00