From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: return RSS hash result in mbuf
Date: Wed, 28 Sep 2016 09:01:13 +0200 [thread overview]
Message-ID: <20160928070113.GJ32397@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <4fbbd27b-9610-4772-5cba-5ce896b4eebf@intel.com>
On Tue, Sep 27, 2016 at 06:03:51PM +0100, Ferruh Yigit wrote:
> On 9/27/2016 3:53 PM, Nelio Laranjeiro wrote:
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
>
> <...>
>
> > @@ -1286,12 +1291,13 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
> > &(*rxq->cqes)[rxq->cq_ci & cqe_cnt].cqe64;
> > unsigned int i = 0;
> > unsigned int rq_ci = rxq->rq_ci << sges_n;
> > - int len;
> >
> > while (pkts_n) {
> > unsigned int idx = rq_ci & wqe_cnt;
> > volatile struct mlx5_wqe_data_seg *wqe = &(*rxq->wqes)[idx];
> > struct rte_mbuf *rep = (*rxq->elts)[idx];
> > + int len;
>
> clang generates following warning, -it is quite detailed compiler message:
>
> .../drivers/net/mlx5/mlx5_rxtx.c:1327:7: error: variable 'len' is used
> uninitialized whenever 'if' condition is false
> [-Werror,-Wsometimes-uninitialized]
> if (!pkt) {
> ^~~~
> .../drivers/net/mlx5/mlx5_rxtx.c:1384:7: note: uninitialized use occurs here
> if (len > DATA_LEN(seg)) {
> ^~~
> .../drivers/net/mlx5/mlx5_rxtx.c:1327:3: note: remove the 'if' if its
> condition is always true
> if (!pkt) {
> ^~~~~~~~~~
> .../drivers/net/mlx5/mlx5_rxtx.c:1299:10: note: initialize the variable
> 'len' to silence this warning
> int len;
> ^
> = 0
Right, my version of clang don't report this error, the one from
ubuntu does.
I will fix it in a v3.
Thanks Ferruh,
--
Nélio Laranjeiro
6WIND
next prev parent reply other threads:[~2016-09-28 7:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 8:16 [dpdk-dev] [PATCH] " Nelio Laranjeiro
2016-09-14 8:16 ` Nelio Laranjeiro
2016-09-23 9:15 ` Adrien Mazarguil
2016-09-27 14:11 ` Bruce Richardson
2016-09-27 14:29 ` Nélio Laranjeiro
2016-09-27 14:53 ` [dpdk-dev] [PATCH v2] " Nelio Laranjeiro
2016-09-27 17:03 ` Ferruh Yigit
2016-09-28 7:01 ` Nélio Laranjeiro [this message]
2016-09-28 7:02 ` [dpdk-dev] [PATCH v3] " Nelio Laranjeiro
2016-09-28 8:59 ` Adrien Mazarguil
2016-09-28 12:11 ` [dpdk-dev] [PATCH v4] " Nelio Laranjeiro
2016-10-12 15:12 ` Bruce Richardson
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=20160928070113.GJ32397@autoinstall.dev.6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).