numam-dpdk/drivers/net/enetfec
David Marchand 7c3c0d0f29 net/enetfec: fix build with GCC 12
GCC 12 raises the following warning:

../drivers/net/enetfec/enet_ethdev.c: In function
        ‘enetfec_rx_queue_setup’:
../drivers/net/enetfec/enet_ethdev.c:473:9: error: array
        subscript 1 is
    above array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’}
        [-Werror=array-bounds]
  473 | rte_write32(rte_cpu_to_le_32(fep->bd_addr_p_r[queue_idx]),
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  474 |     (uint8_t *)fep->hw_baseaddr_v + ENETFEC_RD_START(queue_idx));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/enetfec/enet_ethdev.c:9:
../drivers/net/enetfec/enet_ethdev.h:113:33: note: while referencing
        ‘bd_addr_p_r’
  113 | uint32_t                bd_addr_p_r[ENETFEC_MAX_Q];
      |                                 ^~~~~~~~~~~

This driver properly announces that it only supports 1 rxq.
Silence this warning by adding an explicit check on the queue id.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
2022-06-15 10:19:34 +02:00
..
enet_ethdev.c net/enetfec: fix build with GCC 12 2022-06-15 10:19:34 +02:00
enet_ethdev.h net: add macro for VLAN header length 2021-11-17 20:17:04 +01:00
enet_pmd_logs.h net/enetfec: introduce driver 2021-11-15 16:26:15 +01:00
enet_regs.h fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
enet_rxtx.c net: add macro for VLAN header length 2021-11-17 20:17:04 +01:00
enet_uio.c net/enetfec: support UIO 2021-11-15 16:26:17 +01:00
enet_uio.h net/enetfec: support UIO 2021-11-15 16:26:17 +01:00
meson.build net/enetfec: support Rx/Tx 2021-11-15 16:26:17 +01:00
version.map net/enetfec: introduce driver 2021-11-15 16:26:15 +01:00