DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Konstantin Ananyev <konstantin.ananyev@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] acl: fix build with gcc 11
Date: Wed, 05 May 2021 12:13:00 +0200	[thread overview]
Message-ID: <37680552.IiN9YLNMxG@thomas> (raw)
In-Reply-To: <20210426133519.4777-1-konstantin.ananyev@intel.com>

26/04/2021 15:35, Konstantin Ananyev:
> gcc 11 with '-O2' complains about some variables being used without
> being initialized:
> 
> In file included from ../lib/librte_acl/acl_run_avx512x8.h:201,
>                  from ../lib/librte_acl/acl_run_avx512.c:110:
> In function ‘start_flow_avx512x8’,
>     inlined from ‘search_trie_avx512x8.constprop’ at ../lib/librte_acl/acl_run_avx512_common.h:317:2:
> ../lib/librte_acl/acl_run_avx512_common.h:210:13: warning: ‘pdata’ is used uninitialized [-Wuninitialized]
> In file included from ../lib/librte_acl/acl_run_avx512x8.h:201,
>                  from ../lib/librte_acl/acl_run_avx512.c:110:
> ../lib/librte_acl/acl_run_avx512_common.h: In function ‘search_trie_avx512x8.constprop’:
> ../lib/librte_acl/acl_run_avx512_common.h:314:32: note: ‘pdata’ declared here
> In file included from ../lib/librte_acl/acl_run_avx512x8.h:201,
>                  from ../lib/librte_acl/acl_run_avx512.c:110:
> ....
> 
> Indeed, these variables are not explicitly initialized,
> but this is done intentionally.
> We rely on constant mask value that we pass to start_flow*() functions
> as a parameter to mask out uninitialized values.
> Note that '-O3' doesn't produce this warning.
> Anyway, to support clean build with gcc-11 this patch adds
> explicit initialization for these variables.
> I checked the output binary: with '-O3' both clang and gcc 10/11
> generate no extra code for it.
> Also performance test didn't reveal any regressions.
> 
> Bugzilla ID: 673
> Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
> Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method")
> Cc: stable@dpdk.org
> 
> Reported-by: Ali Alnubani <alialnu@nvidia.com>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks




      parent reply	other threads:[~2021-05-05 10:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 13:54 [dpdk-dev] [PATCH] " Konstantin Ananyev
2021-04-26 13:35 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev
2021-04-26 15:24   ` Ali Alnubani
2021-04-26 15:30     ` Kevin Traynor
2021-04-26 15:43       ` Ali Alnubani
2021-05-05 10:13   ` Thomas Monjalon [this message]

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=37680552.IiN9YLNMxG@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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 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).