numam-dpdk/drivers
Ferruh Yigit d90141961b net/thunderx: fix build with gcc optimization on
build error gcc version 6.3.1 20161221 (Red Hat 6.3.1-1),
with EXTRA_CFLAGS="-O3":

.../drivers/net/thunderx/nicvf_ethdev.c:907:9:
   error: ‘txq’ may be used uninitialized in this function
   [-Werror=maybe-uninitialized]
  if (txq->pool_free == nicvf_single_pool_free_xmited_buffers)
      ~~~^~~~~~~~~~~
.../drivers/net/thunderx/nicvf_ethdev.c:886:20:
   note: ‘txq’ was declared here
  struct nicvf_txq *txq;
                    ^~~

Same error on function 'nicvf_eth_dev_init' and 'nicvf_dev_start', it
seems 'nicvf_set_tx_function' inlined when optimization enabled.

Initialize the txq and add NULL check before using it to fix.

Fixes: 7413feee66 ("net/thunderx: add device start/stop and close")
Cc: stable@dpdk.org

Reported-by: Richard Walsh <richard.walsh@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-07-03 01:35:58 +02:00
..
baseband baseband/turbo_sw: shorten internal buffers names 2018-05-28 03:17:14 +02:00
bus bus/pci: enable write combining during mapping 2018-06-30 00:12:58 +02:00
common common/octeontx: move mbox to common folder 2018-04-04 23:14:52 +02:00
compress compress/isal: add ISA-L decomp functionality 2018-05-10 17:46:20 +01:00
crypto crypto/qat: move to dynamic logging for data-path trace 2018-06-28 01:25:33 +02:00
event eventdev: add driver interface of crypto adapter 2018-05-10 14:07:37 +02:00
mempool mempool/bucket: add to meson build 2018-05-21 12:00:09 +02:00
net net/thunderx: fix build with gcc optimization on 2018-07-03 01:35:58 +02:00
raw raw/ifpga/base: fix an error return 2018-05-21 16:13:06 +02:00
Makefile compress/isal: add skeleton ISA-L compression PMD 2018-05-10 17:46:20 +01:00
meson.build compress/isal: add skeleton ISA-L compression PMD 2018-05-10 17:46:20 +01:00