All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>,
	dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/thunderx: fix build with gcc optimization on
Date: Sun, 24 Jun 2018 17:47:24 +0530	[thread overview]
Message-ID: <20180624121723.GA7776@jerin> (raw)
In-Reply-To: <20180621181450.91425-1-ferruh.yigit@intel.com>

-----Original Message-----
> Date: Thu, 21 Jun 2018 19:14:50 +0100
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Maciej Czekaj
>  <maciej.czekaj@caviumnetworks.com>
> CC: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
> Subject: [PATCH] net/thunderx: fix build with gcc optimization on
> X-Mailer: git-send-email 2.17.1
> 
> 
> 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: 7413feee662d ("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>

> ---
> 
> Btw, no compiler optimization enabled, only nicvf_rxtx.c has -Ofast,
> is this intentional?

Yes. At least in our setup, -Ofast turns out to be super set of -O3.

  reply	other threads:[~2018-06-24 12:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 18:14 [PATCH] net/thunderx: fix build with gcc optimization on Ferruh Yigit
2018-06-24 12:17 ` Jerin Jacob [this message]
2018-06-26  9:17   ` Ferruh Yigit
2018-06-26  9:52     ` Jerin Jacob
2018-06-26 17:10   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180624121723.GA7776@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=maciej.czekaj@caviumnetworks.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.