patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Joyce Kong <joyce.kong@arm.com>
Cc: reshma.pattan@intel.com, stephen@networkplumber.org,
	konstantin.v.ananyev@yandex.ru, dev@dpdk.org, nd@arm.com,
	stable@dpdk.org, Ruifeng Wang <ruifeng.wang@arm.com>
Subject: Re: [PATCH] pdump: fix build issue with GCC 12
Date: Tue, 28 Mar 2023 18:25:16 +0200	[thread overview]
Message-ID: <1811939.QZUTf85G27@thomas> (raw)
In-Reply-To: <20230327070712.280265-1-joyce.kong@arm.com>

27/03/2023 09:07, Joyce Kong:
> The following warning is observed with GCC12 compilation
> with release 20.11:
> 
> In function ‘__rte_ring_enqueue_elems_64’,
>     inlined from ‘__rte_ring_enqueue_elems’ at
>             ../lib/librte_ring/rte_ring_elem.h:225:3,
>     inlined from ‘__rte_ring_do_enqueue_elem’ at
>             ../lib/librte_ring/rte_ring_elem.h:424:2,
>     inlined from ‘rte_ring_mp_enqueue_burst_elem’ at
>             ../lib/librte_ring/rte_ring_elem.h:884:9,
>     inlined from ‘rte_ring_enqueue_burst_elem’ at
>             ../lib/librte_ring/rte_ring_elem.h:946:10,
>     inlined from ‘rte_ring_enqueue_burst’ at
>             ../lib/librte_ring/rte_ring.h:721:9,
>     inlined from ‘pdump_copy’ at
>             ../lib/librte_pdump/rte_pdump.c:94:13:
> ../lib/librte_ring/rte_ring_elem.h:162:40: warning: ‘*dup_bufs.36_42
> + _89’ may be used uninitialized [-Wmaybe-uninitialized]
>   162 |                         ring[idx] = obj[i];
>       |                                     ~~~^~~
> ../lib/librte_ring/rte_ring_elem.h:163:44: warning: ‘*dup_bufs.36_42
> + _98’ may be used uninitialized [-Wmaybe-uninitialized]
>   163 |                         ring[idx + 1] = obj[i + 1];
>       |                                         ~~~^~~~~~~
> ../lib/librte_ring/rte_ring_elem.h:164:44: warning: ‘*dup_bufs.36_42
> + _107’ may be used uninitialized [-Wmaybe-uninitialized]
>   164 |                         ring[idx + 2] = obj[i + 2];
>       |                                         ~~~^~~~~~~
> ../lib/librte_ring/rte_ring_elem.h:165:44: warning: ‘*dup_bufs.36_42
> + _116’ may be used uninitialized [-Wmaybe-uninitialized]
>   165 |                         ring[idx + 3] = obj[i + 3];
>       |                                         ~~~^~~~~~~
> ../lib/librte_ring/rte_ring_elem.h:169:42: warning: ‘*dup_bufs.36_42
> + _129’ may be used uninitialized [-Wmaybe-uninitialized]
>   169 |                         ring[idx++] = obj[i++]; /* fallthrough */
>       |                                       ~~~^~~~~
> ../lib/librte_ring/rte_ring_elem.h:171:42: warning: ‘*dup_bufs.36_42
> + _139’ may be used uninitialized [-Wmaybe-uninitialized]
>   171 |                         ring[idx++] = obj[i++]; /* fallthrough */
>       |                                       ~~~^~~~~
> ../lib/librte_ring/rte_ring_elem.h:173:42: warning: ‘*dup_bufs.36_42
> + _149’ may be used uninitialized [-Wmaybe-uninitialized]
>   173 |                         ring[idx++] = obj[i++];
> 
> Actually, this is an alias warning as -O3 enables strict alias.
> This patch fixes it by replacing 'dup_bufs' with '&dup_bufs[0]'
> as the compiler represents them differently.
> 
> Fixes: 278f945402c5 ("pdump: add new library for packet capture")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Applied, thanks.



  parent reply	other threads:[~2023-03-28 16:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  7:07 Joyce Kong
2023-03-27 14:19 ` Pattan, Reshma
2023-03-27 14:34 ` Tyler Retzlaff
2023-03-28  6:27   ` Joyce Kong
2023-03-28 16:25 ` Thomas Monjalon [this message]
2023-03-28 19:25 ` Stephen Hemminger

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=1811939.QZUTf85G27@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=joyce.kong@arm.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=nd@arm.com \
    --cc=reshma.pattan@intel.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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 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).