DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson
@ 2020-01-24 15:37 Bruce Richardson
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bruce Richardson @ 2020-01-24 15:37 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

While icc can compile DPDK successfully using a meson/ninja build, there
are a lot of warnings issued in the process, which means that any use of
werror flag will break the build, and the output just looks messy and
possibly worrying to the user.

To improve this situation, we can fix the warnings about unsupported
compiler flags, and just maintain a list of icc warnings to ignore.

Bruce Richardson (2):
  net/octeontx2: check compiler flag before use
  build: remove warnings for builds with icc

 config/meson.build                | 6 ++++++
 drivers/net/octeontx2/meson.build | 4 +---
 2 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use
  2020-01-24 15:37 [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Bruce Richardson
@ 2020-01-24 15:37 ` Bruce Richardson
  2020-01-28 16:55   ` Jerin Jacob
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc Bruce Richardson
  2020-02-06  2:23 ` [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Thomas Monjalon
  2 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2020-01-24 15:37 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, jerinj

Rather than assuming all compilers support the -flax-vector-extensions
flag, we should test this before using it, thereby potentially avoiding
warnings.

Cc: jerinj@marvell.com

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/octeontx2/meson.build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build
index fad3076a3..bde19678f 100644
--- a/drivers/net/octeontx2/meson.build
+++ b/drivers/net/octeontx2/meson.build
@@ -26,9 +26,7 @@ sources = files('otx2_rx.c',
 
 deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2']
 
-cflags += ['-flax-vector-conversions']
-
-extra_flags = []
+extra_flags = ['-flax-vector-conversions']
 # This integrated controller runs only on a arm64 machine, remove 32bit warnings
 if not dpdk_conf.get('RTE_ARCH_64')
 	extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc
  2020-01-24 15:37 [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Bruce Richardson
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use Bruce Richardson
@ 2020-01-24 15:37 ` Bruce Richardson
  2020-01-24 15:51   ` Burakov, Anatoly
  2020-02-06  2:23 ` [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Thomas Monjalon
  2 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2020-01-24 15:37 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

While icc builds without the "werror" setting build successfully, there are
a lot of warnings. To make the output cleaner, and to allow building with
warnings enabled, we can add a list of warning ids to ignore.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 28a57f56f..6c46767e3 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -197,6 +197,12 @@ if not dpdk_conf.get('RTE_ARCH_64')
 # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
 	warning_flags += '-Wno-pointer-to-int-cast'
 endif
+if cc.get_id() == 'intel'
+	warning_ids = [188, 2203, 2279, 2557, 3179, 3656]
+	foreach i:warning_ids
+		warning_flags += '-diag-disable=@0@'.format(i)
+	endforeach
+endif
 foreach arg: warning_flags
 	if cc.has_argument(arg)
 		add_project_arguments(arg, language: 'c')
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc Bruce Richardson
@ 2020-01-24 15:51   ` Burakov, Anatoly
  2020-01-24 16:34     ` Bruce Richardson
  0 siblings, 1 reply; 7+ messages in thread
From: Burakov, Anatoly @ 2020-01-24 15:51 UTC (permalink / raw)
  To: Bruce Richardson, dev

On 24-Jan-20 3:37 PM, Bruce Richardson wrote:
> While icc builds without the "werror" setting build successfully, there are
> a lot of warnings. To make the output cleaner, and to allow building with
> warnings enabled, we can add a list of warning ids to ignore.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   config/meson.build | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/config/meson.build b/config/meson.build
> index 28a57f56f..6c46767e3 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -197,6 +197,12 @@ if not dpdk_conf.get('RTE_ARCH_64')
>   # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
>   	warning_flags += '-Wno-pointer-to-int-cast'
>   endif
> +if cc.get_id() == 'intel'
> +	warning_ids = [188, 2203, 2279, 2557, 3179, 3656]

Maybe worth it to add short warning descriptions in comments? e.g.

# 188: unused blah
# 2203: wrong foo

> +	foreach i:warning_ids
> +		warning_flags += '-diag-disable=@0@'.format(i)
> +	endforeach
> +endif
>   foreach arg: warning_flags
>   	if cc.has_argument(arg)
>   		add_project_arguments(arg, language: 'c')
> 


-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc
  2020-01-24 15:51   ` Burakov, Anatoly
@ 2020-01-24 16:34     ` Bruce Richardson
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2020-01-24 16:34 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev

On Fri, Jan 24, 2020 at 03:51:16PM +0000, Burakov, Anatoly wrote:
> On 24-Jan-20 3:37 PM, Bruce Richardson wrote:
> > While icc builds without the "werror" setting build successfully, there are
> > a lot of warnings. To make the output cleaner, and to allow building with
> > warnings enabled, we can add a list of warning ids to ignore.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >   config/meson.build | 6 ++++++
> >   1 file changed, 6 insertions(+)
> > 
> > diff --git a/config/meson.build b/config/meson.build
> > index 28a57f56f..6c46767e3 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -197,6 +197,12 @@ if not dpdk_conf.get('RTE_ARCH_64')
> >   # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
> >   	warning_flags += '-Wno-pointer-to-int-cast'
> >   endif
> > +if cc.get_id() == 'intel'
> > +	warning_ids = [188, 2203, 2279, 2557, 3179, 3656]
> 
> Maybe worth it to add short warning descriptions in comments? e.g.
> 
> # 188: unused blah
> # 2203: wrong foo
> 
Yeah, I started doing it that way, but then I decided that it was making
the block rather long and that the extra benefit it would give is quite
small. But if people think it's worthwhile, I can rework to do so.

/Bruce 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use Bruce Richardson
@ 2020-01-28 16:55   ` Jerin Jacob
  0 siblings, 0 replies; 7+ messages in thread
From: Jerin Jacob @ 2020-01-28 16:55 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk-dev, Jerin Jacob

On Fri, Jan 24, 2020 at 9:10 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Rather than assuming all compilers support the -flax-vector-extensions
> flag, we should test this before using it, thereby potentially avoiding
> warnings.
>
> Cc: jerinj@marvell.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  drivers/net/octeontx2/meson.build | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build
> index fad3076a3..bde19678f 100644
> --- a/drivers/net/octeontx2/meson.build
> +++ b/drivers/net/octeontx2/meson.build
> @@ -26,9 +26,7 @@ sources = files('otx2_rx.c',
>
>  deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2']
>
> -cflags += ['-flax-vector-conversions']
> -
> -extra_flags = []
> +extra_flags = ['-flax-vector-conversions']
>  # This integrated controller runs only on a arm64 machine, remove 32bit warnings
>  if not dpdk_conf.get('RTE_ARCH_64')
>         extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson
  2020-01-24 15:37 [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Bruce Richardson
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use Bruce Richardson
  2020-01-24 15:37 ` [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc Bruce Richardson
@ 2020-02-06  2:23 ` Thomas Monjalon
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2020-02-06  2:23 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

24/01/2020 16:37, Bruce Richardson:
> While icc can compile DPDK successfully using a meson/ninja build, there
> are a lot of warnings issued in the process, which means that any use of
> werror flag will break the build, and the output just looks messy and
> possibly worrying to the user.
> 
> To improve this situation, we can fix the warnings about unsupported
> compiler flags, and just maintain a list of icc warnings to ignore.
> 
> Bruce Richardson (2):
>   net/octeontx2: check compiler flag before use
>   build: remove warnings for builds with icc

Applied, thanks




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-06  2:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 15:37 [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Bruce Richardson
2020-01-24 15:37 ` [dpdk-dev] [PATCH 1/2] net/octeontx2: check compiler flag before use Bruce Richardson
2020-01-28 16:55   ` Jerin Jacob
2020-01-24 15:37 ` [dpdk-dev] [PATCH 2/2] build: remove warnings for builds with icc Bruce Richardson
2020-01-24 15:51   ` Burakov, Anatoly
2020-01-24 16:34     ` Bruce Richardson
2020-02-06  2:23 ` [dpdk-dev] [PATCH 0/2] remove compiler warnings with icc using meson Thomas Monjalon

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).