DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/vdev_netvsc: remove CFLAGS -std=c11 and -pedantic
@ 2018-01-24 11:19 Ophir Munk
  2018-01-24 12:48 ` Matan Azrad
  2018-01-24 14:12 ` [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic Ophir Munk
  0 siblings, 2 replies; 9+ messages in thread
From: Ophir Munk @ 2018-01-24 11:19 UTC (permalink / raw)
  To: dev, Matan Azrad
  Cc: Thomas Monjalon, Olga Shern, Adrien Mazarguil, Ophir Munk

In order to guarantee a successful vdev_netvsc compilation on
old Linux distributions remove CFLAGS -std=c11 and -pedantic
Otherwise old GCC compilers may complain as follows:
cc1: error: unrecognized command line option -std=c11

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/vdev_netvsc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vdev_netvsc/Makefile b/drivers/net/vdev_netvsc/Makefile
index f2b2ac5..45351b8 100644
--- a/drivers/net/vdev_netvsc/Makefile
+++ b/drivers/net/vdev_netvsc/Makefile
@@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map
 # Additional compilation flags.
 CFLAGS += -O3
 CFLAGS += -g
-CFLAGS += -std=c11 -pedantic -Wall -Wextra
+CFLAGS += -Wall -Wextra
 CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += -D_BSD_SOURCE
 CFLAGS += -D_DEFAULT_SOURCE
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v1] net/vdev_netvsc: remove CFLAGS -std=c11 and -pedantic
  2018-01-24 11:19 [dpdk-dev] [PATCH v1] net/vdev_netvsc: remove CFLAGS -std=c11 and -pedantic Ophir Munk
@ 2018-01-24 12:48 ` Matan Azrad
  2018-01-24 14:12 ` [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic Ophir Munk
  1 sibling, 0 replies; 9+ messages in thread
From: Matan Azrad @ 2018-01-24 12:48 UTC (permalink / raw)
  To: Ophir Munk, dev; +Cc: Thomas Monjalon, Olga Shern, Adrien Mazarguil

Hi Ophir

From: Ophir Munk, Wednesday, January 24, 2018 1:20 PM
> In order to guarantee a successful vdev_netvsc compilation on old Linux
> distributions remove CFLAGS -std=c11 and -pedantic Otherwise old GCC
> compilers may complain as follows:
> cc1: error: unrecognized command line option -std=c11
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  drivers/net/vdev_netvsc/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/vdev_netvsc/Makefile
> b/drivers/net/vdev_netvsc/Makefile
> index f2b2ac5..45351b8 100644
> --- a/drivers/net/vdev_netvsc/Makefile
> +++ b/drivers/net/vdev_netvsc/Makefile
> @@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map  #
> Additional compilation flags.
>  CFLAGS += -O3
>  CFLAGS += -g
> -CFLAGS += -std=c11 -pedantic -Wall -Wextra
> +CFLAGS += -Wall -Wextra
>  CFLAGS += -D_XOPEN_SOURCE=600
>  CFLAGS += -D_BSD_SOURCE
>  CFLAGS += -D_DEFAULT_SOURCE
> --
> 2.7.4

This patch is a fix for compilation issue so it should be with fix title.
Suggestion:
net/vdev_netvsc: fix build using C11 mode and pedantic

Also "Fixes" line should be added.

Thanks,
Matan.

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

* [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 11:19 [dpdk-dev] [PATCH v1] net/vdev_netvsc: remove CFLAGS -std=c11 and -pedantic Ophir Munk
  2018-01-24 12:48 ` Matan Azrad
@ 2018-01-24 14:12 ` Ophir Munk
  2018-01-24 14:45   ` Matan Azrad
  2018-01-24 15:39   ` Stephen Hemminger
  1 sibling, 2 replies; 9+ messages in thread
From: Ophir Munk @ 2018-01-24 14:12 UTC (permalink / raw)
  To: dev, Matan Azrad
  Cc: Thomas Monjalon, Olga Shern, Adrien Mazarguil, Ophir Munk, stable

Remove CFLAGS -std=c11 and -pedantic in order to guarantee
a successful vdev_netvsc compilation on old Linux distributions.
Otherwise old GCC compilers may complain as follows:
cc1: error: unrecognized command line option -std=c11

Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 drivers/net/vdev_netvsc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vdev_netvsc/Makefile b/drivers/net/vdev_netvsc/Makefile
index f2b2ac5..45351b8 100644
--- a/drivers/net/vdev_netvsc/Makefile
+++ b/drivers/net/vdev_netvsc/Makefile
@@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map
 # Additional compilation flags.
 CFLAGS += -O3
 CFLAGS += -g
-CFLAGS += -std=c11 -pedantic -Wall -Wextra
+CFLAGS += -Wall -Wextra
 CFLAGS += -D_XOPEN_SOURCE=600
 CFLAGS += -D_BSD_SOURCE
 CFLAGS += -D_DEFAULT_SOURCE
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 14:12 ` [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic Ophir Munk
@ 2018-01-24 14:45   ` Matan Azrad
  2018-01-24 18:06     ` Thomas Monjalon
  2018-01-24 15:39   ` Stephen Hemminger
  1 sibling, 1 reply; 9+ messages in thread
From: Matan Azrad @ 2018-01-24 14:45 UTC (permalink / raw)
  To: Ophir Munk, dev; +Cc: Thomas Monjalon, Olga Shern, Adrien Mazarguil, stable

Hi Ophir

From: Ophir Munk, Wednesday, January 24, 2018 4:12 PM
> Remove CFLAGS -std=c11 and -pedantic in order to guarantee a successful
> vdev_netvsc compilation on old Linux distributions.
> Otherwise old GCC compilers may complain as follows:
> cc1: error: unrecognized command line option -std=c11
> 
> Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform
> driver")
> Cc: stable@dpdk.org

No need to backport this fix.

> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Besides that,
Acked-by: Matan Azrad <matan@mellanox.com>

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

* Re: [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 14:12 ` [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic Ophir Munk
  2018-01-24 14:45   ` Matan Azrad
@ 2018-01-24 15:39   ` Stephen Hemminger
  2018-01-24 18:08     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  1 sibling, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2018-01-24 15:39 UTC (permalink / raw)
  To: Ophir Munk
  Cc: dev, Matan Azrad, Thomas Monjalon, Olga Shern, Adrien Mazarguil, stable

On Wed, 24 Jan 2018 14:12:13 +0000
Ophir Munk <ophirmu@mellanox.com> wrote:

> Remove CFLAGS -std=c11 and -pedantic in order to guarantee
> a successful vdev_netvsc compilation on old Linux distributions.
> Otherwise old GCC compilers may complain as follows:
> cc1: error: unrecognized command line option -std=c11
> 
> Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
>  drivers/net/vdev_netvsc/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/vdev_netvsc/Makefile b/drivers/net/vdev_netvsc/Makefile
> index f2b2ac5..45351b8 100644
> --- a/drivers/net/vdev_netvsc/Makefile
> +++ b/drivers/net/vdev_netvsc/Makefile
> @@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map
>  # Additional compilation flags.
>  CFLAGS += -O3
>  CFLAGS += -g
> -CFLAGS += -std=c11 -pedantic -Wall -Wextra
> +CFLAGS += -Wall -Wextra
>  CFLAGS += -D_XOPEN_SOURCE=600
>  CFLAGS += -D_BSD_SOURCE
>  CFLAGS += -D_DEFAULT_SOURCE

Why did this driver not use $(WERROR) like rest of DPDK drivers.

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

* Re: [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 14:45   ` Matan Azrad
@ 2018-01-24 18:06     ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2018-01-24 18:06 UTC (permalink / raw)
  To: Ophir Munk; +Cc: dev, Matan Azrad, Olga Shern, Adrien Mazarguil, stable

24/01/2018 15:45, Matan Azrad:
> Hi Ophir
> 
> From: Ophir Munk, Wednesday, January 24, 2018 4:12 PM
> > Remove CFLAGS -std=c11 and -pedantic in order to guarantee a successful
> > vdev_netvsc compilation on old Linux distributions.
> > Otherwise old GCC compilers may complain as follows:
> > cc1: error: unrecognized command line option -std=c11
> > 
> > Fixes: 6086ab3bb3d2 ("net/vdev_netvsc: introduce Hyper-V platform
> > driver")
> > Cc: stable@dpdk.org
> 
> No need to backport this fix.
> 
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> 
> Besides that,
> Acked-by: Matan Azrad <matan@mellanox.com>

Applied, thanks

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 15:39   ` Stephen Hemminger
@ 2018-01-24 18:08     ` Thomas Monjalon
  2018-01-24 18:27       ` Stephen Hemminger
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2018-01-24 18:08 UTC (permalink / raw)
  To: Stephen Hemminger, Matan Azrad
  Cc: stable, Ophir Munk, dev, Olga Shern, Adrien Mazarguil

24/01/2018 16:39, Stephen Hemminger:
> On Wed, 24 Jan 2018 14:12:13 +0000
> Ophir Munk <ophirmu@mellanox.com> wrote:
> > --- a/drivers/net/vdev_netvsc/Makefile
> > +++ b/drivers/net/vdev_netvsc/Makefile
> > @@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map
> >  # Additional compilation flags.
> >  CFLAGS += -O3
> >  CFLAGS += -g
> > -CFLAGS += -std=c11 -pedantic -Wall -Wextra
> > +CFLAGS += -Wall -Wextra
> >  CFLAGS += -D_XOPEN_SOURCE=600
> >  CFLAGS += -D_BSD_SOURCE
> >  CFLAGS += -D_DEFAULT_SOURCE
> 
> Why did this driver not use $(WERROR) like rest of DPDK drivers.

It can be a separate patch.
Matan?

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 18:08     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2018-01-24 18:27       ` Stephen Hemminger
  2018-01-25  8:24         ` Matan Azrad
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Hemminger @ 2018-01-24 18:27 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Matan Azrad, stable, Ophir Munk, dev, Olga Shern, Adrien Mazarguil

On Wed, 24 Jan 2018 19:08:02 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 24/01/2018 16:39, Stephen Hemminger:
> > On Wed, 24 Jan 2018 14:12:13 +0000
> > Ophir Munk <ophirmu@mellanox.com> wrote:  
> > > --- a/drivers/net/vdev_netvsc/Makefile
> > > +++ b/drivers/net/vdev_netvsc/Makefile
> > > @@ -12,7 +12,7 @@ EXPORT_MAP := rte_pmd_vdev_netvsc_version.map
> > >  # Additional compilation flags.
> > >  CFLAGS += -O3
> > >  CFLAGS += -g
> > > -CFLAGS += -std=c11 -pedantic -Wall -Wextra
> > > +CFLAGS += -Wall -Wextra
> > >  CFLAGS += -D_XOPEN_SOURCE=600
> > >  CFLAGS += -D_BSD_SOURCE
> > >  CFLAGS += -D_DEFAULT_SOURCE  
> > 
> > Why did this driver not use $(WERROR) like rest of DPDK drivers.  
> 
> It can be a separate patch.
> Matan?

I meant that you should use:

CFLAGS += $(WERROR_FLAGS)

instead of

CFLAGS += -Wall -Wextra

in this patch.

Also, do you really  need all the other CFLAGS? Why?

This driver has no reason to be a special case different from what is done
in virtio, vmxnet3, ixgbe, e1000, ...

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic
  2018-01-24 18:27       ` Stephen Hemminger
@ 2018-01-25  8:24         ` Matan Azrad
  0 siblings, 0 replies; 9+ messages in thread
From: Matan Azrad @ 2018-01-25  8:24 UTC (permalink / raw)
  To: Stephen Hemminger, Thomas Monjalon
  Cc: stable, Ophir Munk, dev, Olga Shern, Adrien Mazarguil

Hi Stephan

From: Stephen Hemminger, Wednesday, January 24, 2018 8:28 PM
> On Wed, 24 Jan 2018 19:08:02 +0100
> Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > 24/01/2018 16:39, Stephen Hemminger:
> > > On Wed, 24 Jan 2018 14:12:13 +0000
> > > Ophir Munk <ophirmu@mellanox.com> wrote:
> > > > --- a/drivers/net/vdev_netvsc/Makefile
> > > > +++ b/drivers/net/vdev_netvsc/Makefile
> > > > @@ -12,7 +12,7 @@ EXPORT_MAP :=
> rte_pmd_vdev_netvsc_version.map  #
> > > > Additional compilation flags.
> > > >  CFLAGS += -O3
> > > >  CFLAGS += -g
> > > > -CFLAGS += -std=c11 -pedantic -Wall -Wextra
> > > > +CFLAGS += -Wall -Wextra
> > > >  CFLAGS += -D_XOPEN_SOURCE=600
> > > >  CFLAGS += -D_BSD_SOURCE
> > > >  CFLAGS += -D_DEFAULT_SOURCE
> > >
> > > Why did this driver not use $(WERROR) like rest of DPDK drivers.
> >
> > It can be a separate patch.
> > Matan?
> 
> I meant that you should use:
> 
> CFLAGS += $(WERROR_FLAGS)
> 

These line already exists.

> instead of
> 
> CFLAGS += -Wall -Wextra
> 

-Wall is already in $(WERROR_FLAGS).
-Wextra is called also -W in the old versions and it appears in  WERROR_FLAGS as -W.
So just need to remove this line in different patch.

> in this patch.
> 
> Also, do you really  need all the other CFLAGS? Why?
> 
If you mean to the -D_BSD_SOURCE, it is needed for clang compilation.

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

end of thread, other threads:[~2018-01-25  8:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 11:19 [dpdk-dev] [PATCH v1] net/vdev_netvsc: remove CFLAGS -std=c11 and -pedantic Ophir Munk
2018-01-24 12:48 ` Matan Azrad
2018-01-24 14:12 ` [dpdk-dev] [PATCH v2] net/vdev_netvsc: fix build using C11 mode and pedantic Ophir Munk
2018-01-24 14:45   ` Matan Azrad
2018-01-24 18:06     ` Thomas Monjalon
2018-01-24 15:39   ` Stephen Hemminger
2018-01-24 18:08     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-01-24 18:27       ` Stephen Hemminger
2018-01-25  8:24         ` Matan Azrad

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