Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-07 Thread Richardson, Bruce



> -Original Message-
> From: David Marchand 
> Sent: Thursday, January 6, 2022 10:42 AM
> To: Ilya Maximets 
> Cc: Eelco Chaudron ; Eli Britstein
> ; ovs dev ; Richardson, Bruce
> ; Luca Boccassi ; Thomas
> Monjalon 
> Subject: Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from
> CI
> 
> On Tue, Jan 4, 2022 at 8:55 PM Ilya Maximets  wrote:
> > On 1/4/22 16:53, Eelco Chaudron wrote:
> > > On 4 Jan 2022, at 16:44, Eli Britstein wrote:
> > >> On 1/4/2022 4:56 PM, Eelco Chaudron wrote:
> > >>> On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:
> > >>>
> > >>>> Following [1]-[3] in DPDK, there are no more such warnings from
> DPDK.
> > >>>> Remove ignoring them if they occur.
> > >>>>
> > >>>> GitHub actions:
> > >>>> v1: https://github.com/elibritstein/OVS/actions/runs/1540651133
> > >>>>
> > >>>> [1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert
> function")
> > >>>> [2] da0333c8790b ("mbuf: avoid cast-align warning in data offset
> macro")
> > >>>> [3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy
> functions")
> > >>>
> 
> [snip]
> 
> > Thanks, Eli and Eelco!
> >
> > Since we're already on 21.11, I rebased this patch and applied
> > directly to master.
> >
> > Speaking of cast-align, it would be great to have something like
> > this on the DPDK side:
> >
> > diff --git a/config/meson.build b/config/meson.build
> > index 805d5d51d0..4c47b2d63c 100644
> > --- a/config/meson.build
> > +++ b/config/meson.build
> > @@ -251,6 +251,7 @@ warning_flags = [
> >  '-Wextra',
> >
> >  # additional warnings in alphabetical order
> > +'-Wcast-align',
> >  '-Wcast-qual',
> >  '-Wdeprecated',
> >  '-Wformat',
> > ---
> >
> > But I don't know if that will cause any problems.
> 
> This is something that DPDK had in the past, when building with make +
> gcc.
> It did not get to meson because of clang.
> https://git.dpdk.org/dpdk/commit?id=524a0d5d66b9a54242623aab9ace9ce4a7ec13
> 47
> 
> On DPDK side, we would have to analyze/fix issues with clang, or
> enable this check only for gcc.
> Copied some people in case they have more input on this topic.
> 

It would be nice to get the issues fixed and the flag added to DPDK builds. In 
the absence of having those fixed, my personal preference is *not* to enable 
for gcc only, on the basis that I don't want us to start having different lists 
of warning flags to enable for different compilers. I prefer the scheme of 
having a list of flags and then enabling them based on availability rather than 
on compiler or compiler version.

/Bruce
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-06 Thread David Marchand
On Tue, Jan 4, 2022 at 8:55 PM Ilya Maximets  wrote:
> On 1/4/22 16:53, Eelco Chaudron wrote:
> > On 4 Jan 2022, at 16:44, Eli Britstein wrote:
> >> On 1/4/2022 4:56 PM, Eelco Chaudron wrote:
> >>> On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:
> >>>
>  Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
>  Remove ignoring them if they occur.
> 
>  GitHub actions:
>  v1: https://github.com/elibritstein/OVS/actions/runs/1540651133
> 
>  [1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert 
>  function")
>  [2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
>  [3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy 
>  functions")
> >>>

[snip]

> Thanks, Eli and Eelco!
>
> Since we're already on 21.11, I rebased this patch and applied
> directly to master.
>
> Speaking of cast-align, it would be great to have something like
> this on the DPDK side:
>
> diff --git a/config/meson.build b/config/meson.build
> index 805d5d51d0..4c47b2d63c 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -251,6 +251,7 @@ warning_flags = [
>  '-Wextra',
>
>  # additional warnings in alphabetical order
> +'-Wcast-align',
>  '-Wcast-qual',
>  '-Wdeprecated',
>  '-Wformat',
> ---
>
> But I don't know if that will cause any problems.

This is something that DPDK had in the past, when building with make + gcc.
It did not get to meson because of clang.
https://git.dpdk.org/dpdk/commit?id=524a0d5d66b9a54242623aab9ace9ce4a7ec1347

On DPDK side, we would have to analyze/fix issues with clang, or
enable this check only for gcc.
Copied some people in case they have more input on this topic.


-- 
David Marchand

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-04 Thread Ilya Maximets
On 1/4/22 16:53, Eelco Chaudron wrote:
> 
> 
> On 4 Jan 2022, at 16:44, Eli Britstein wrote:
> 
>> On 1/4/2022 4:56 PM, Eelco Chaudron wrote:
>>> External email: Use caution opening links or attachments
>>>
>>>
>>> On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:
>>>
 Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
 Remove ignoring them if they occur.

 GitHub actions:
 v1: https://github.com/elibritstein/OVS/actions/runs/1540651133

 [1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
 [2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
 [3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")
>>>
>>> Changes look fine to me, maybe you can include the fixes tags to mention 
>>> the commits added these?!
>>
>> It was inevitable from day 1, since DPDK always had those issues (until 
>> now), so it was not a "bug" to fix now.
>>
>> For utilities/ovs-dev.py, the "-W" is there from the first commit that added 
>> dpdk support:
>>
>> 25dfecf88742 ("ovs-dev.py: Add support for dpdk builds.")
>>
>> For .ci/linux-build.sh, it's added in this commit:
>>
>> ecc3c395b5a6 ("travis: Fix DPDK build and treat bad-function-cast warning as 
>> non-error")
>>
>> See in its commit message:
>>
>>     Due to incorrect casts in the DPDK headers, we have to disable
>>     bad-function-cast and cast-align warnings as being treated as errors
>>     for now.
> 
> Thanks for finding out the commit ids. Guess Ilya (or whichever maintainer 
> commits this patch) can add them if they feel the need!
> 
> Cheers,
> 
> Eelco
> 
>>>
>>> Acked-by: Eelco Chaudron 
>>>
>>>
 Signed-off-by: Eli Britstein 

Thanks, Eli and Eelco!

Since we're already on 21.11, I rebased this patch and applied
directly to master.

Speaking of cast-align, it would be great to have something like
this on the DPDK side:

diff --git a/config/meson.build b/config/meson.build
index 805d5d51d0..4c47b2d63c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -251,6 +251,7 @@ warning_flags = [
 '-Wextra',
 
 # additional warnings in alphabetical order
+'-Wcast-align',
 '-Wcast-qual',
 '-Wdeprecated',
 '-Wformat',
---

But I don't know if that will cause any problems.

Best regards, Ilya Maximets.

 ---
   .ci/linux-build.sh   | 4 
   utilities/ovs-dev.py | 1 -
   2 files changed, 5 deletions(-)

 diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
 index e20cc6ad0..65578880b 100755
 --- a/.ci/linux-build.sh
 +++ b/.ci/linux-build.sh
 @@ -226,10 +226,6 @@ if [ "$DPDK" ]; then
   DPDK_VER="20.11.1"
   fi
   install_dpdk $DPDK_VER
 -if [ "$CC" = "clang" ]; then
 -# Disregard cast alignment errors until DPDK is fixed
 -CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-cast-align"
 -fi
   if [ -n "$DPDK_EXPERIMENTAL" ]; then
   CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -DALLOW_EXPERIMENTAL_API"
   fi
 diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
 index c45788acd..534c5e7f1 100755
 --- a/utilities/ovs-dev.py
 +++ b/utilities/ovs-dev.py
 @@ -90,7 +90,6 @@ def conf():

   if options.with_dpdk:
   configure.append("--with-dpdk=" + options.with_dpdk)
 -cflags += " -Wno-cast-align -Wno-bad-function-cast"  # DPDK 
 warnings.
>>> Guess this script only works with older kernels due to always including the 
>>> --with-linux= option.

Yeah.  I'm actually not sure if anyone uses this script.

>>>
   if options.optimize is None:
   options.optimize = 0
 --
 2.28.0.2311.g225365fb51

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-04 Thread Eelco Chaudron


On 4 Jan 2022, at 16:44, Eli Britstein wrote:

> On 1/4/2022 4:56 PM, Eelco Chaudron wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:
>>
>>> Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
>>> Remove ignoring them if they occur.
>>>
>>> GitHub actions:
>>> v1: https://github.com/elibritstein/OVS/actions/runs/1540651133
>>>
>>> [1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
>>> [2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
>>> [3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")
>>
>> Changes look fine to me, maybe you can include the fixes tags to mention the 
>> commits added these?!
>
> It was inevitable from day 1, since DPDK always had those issues (until now), 
> so it was not a "bug" to fix now.
>
> For utilities/ovs-dev.py, the "-W" is there from the first commit that added 
> dpdk support:
>
> 25dfecf88742 ("ovs-dev.py: Add support for dpdk builds.")
>
> For .ci/linux-build.sh, it's added in this commit:
>
> ecc3c395b5a6 ("travis: Fix DPDK build and treat bad-function-cast warning as 
> non-error")
>
> See in its commit message:
>
>     Due to incorrect casts in the DPDK headers, we have to disable
>     bad-function-cast and cast-align warnings as being treated as errors
>     for now.

Thanks for finding out the commit ids. Guess Ilya (or whichever maintainer 
commits this patch) can add them if they feel the need!

Cheers,

Eelco

>>
>> Acked-by: Eelco Chaudron 
>>
>>
>>> Signed-off-by: Eli Britstein 
>>> ---
>>>   .ci/linux-build.sh   | 4 
>>>   utilities/ovs-dev.py | 1 -
>>>   2 files changed, 5 deletions(-)
>>>
>>> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
>>> index e20cc6ad0..65578880b 100755
>>> --- a/.ci/linux-build.sh
>>> +++ b/.ci/linux-build.sh
>>> @@ -226,10 +226,6 @@ if [ "$DPDK" ]; then
>>>   DPDK_VER="20.11.1"
>>>   fi
>>>   install_dpdk $DPDK_VER
>>> -if [ "$CC" = "clang" ]; then
>>> -# Disregard cast alignment errors until DPDK is fixed
>>> -CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-cast-align"
>>> -fi
>>>   if [ -n "$DPDK_EXPERIMENTAL" ]; then
>>>   CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -DALLOW_EXPERIMENTAL_API"
>>>   fi
>>> diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
>>> index c45788acd..534c5e7f1 100755
>>> --- a/utilities/ovs-dev.py
>>> +++ b/utilities/ovs-dev.py
>>> @@ -90,7 +90,6 @@ def conf():
>>>
>>>   if options.with_dpdk:
>>>   configure.append("--with-dpdk=" + options.with_dpdk)
>>> -cflags += " -Wno-cast-align -Wno-bad-function-cast"  # DPDK 
>>> warnings.
>> Guess this script only works with older kernels due to always including the 
>> --with-linux= option.
>>
>>>   if options.optimize is None:
>>>   options.optimize = 0
>>> --
>>> 2.28.0.2311.g225365fb51
>>>
>>> ___
>>> dev mailing list
>>> d...@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-04 Thread Eli Britstein via dev


On 1/4/2022 4:56 PM, Eelco Chaudron wrote:

External email: Use caution opening links or attachments


On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:


Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
Remove ignoring them if they occur.

GitHub actions:
v1: https://github.com/elibritstein/OVS/actions/runs/1540651133

[1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
[2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
[3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")


Changes look fine to me, maybe you can include the fixes tags to mention the 
commits added these?!


It was inevitable from day 1, since DPDK always had those issues (until 
now), so it was not a "bug" to fix now.


For utilities/ovs-dev.py, the "-W" is there from the first commit that 
added dpdk support:


25dfecf88742 ("ovs-dev.py: Add support for dpdk builds.")

For .ci/linux-build.sh, it's added in this commit:

ecc3c395b5a6 ("travis: Fix DPDK build and treat bad-function-cast 
warning as non-error")


See in its commit message:

    Due to incorrect casts in the DPDK headers, we have to disable
    bad-function-cast and cast-align warnings as being treated as errors
    for now.



Acked-by: Eelco Chaudron 



Signed-off-by: Eli Britstein 
---
  .ci/linux-build.sh   | 4 
  utilities/ovs-dev.py | 1 -
  2 files changed, 5 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index e20cc6ad0..65578880b 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -226,10 +226,6 @@ if [ "$DPDK" ]; then
  DPDK_VER="20.11.1"
  fi
  install_dpdk $DPDK_VER
-if [ "$CC" = "clang" ]; then
-# Disregard cast alignment errors until DPDK is fixed
-CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-cast-align"
-fi
  if [ -n "$DPDK_EXPERIMENTAL" ]; then
  CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -DALLOW_EXPERIMENTAL_API"
  fi
diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
index c45788acd..534c5e7f1 100755
--- a/utilities/ovs-dev.py
+++ b/utilities/ovs-dev.py
@@ -90,7 +90,6 @@ def conf():

  if options.with_dpdk:
  configure.append("--with-dpdk=" + options.with_dpdk)
-cflags += " -Wno-cast-align -Wno-bad-function-cast"  # DPDK warnings.

Guess this script only works with older kernels due to always including the 
--with-linux= option.


  if options.optimize is None:
  options.optimize = 0
--
2.28.0.2311.g225365fb51

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2022-01-04 Thread Eelco Chaudron



On 5 Dec 2021, at 8:34, Eli Britstein via dev wrote:

> Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
> Remove ignoring them if they occur.
>
> GitHub actions:
> v1: https://github.com/elibritstein/OVS/actions/runs/1540651133
>
> [1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
> [2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
> [3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")


Changes look fine to me, maybe you can include the fixes tags to mention the 
commits added these?!

Acked-by: Eelco Chaudron 


> Signed-off-by: Eli Britstein 
> ---
>  .ci/linux-build.sh   | 4 
>  utilities/ovs-dev.py | 1 -
>  2 files changed, 5 deletions(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index e20cc6ad0..65578880b 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -226,10 +226,6 @@ if [ "$DPDK" ]; then
>  DPDK_VER="20.11.1"
>  fi
>  install_dpdk $DPDK_VER
> -if [ "$CC" = "clang" ]; then
> -# Disregard cast alignment errors until DPDK is fixed
> -CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-cast-align"
> -fi
>  if [ -n "$DPDK_EXPERIMENTAL" ]; then
>  CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -DALLOW_EXPERIMENTAL_API"
>  fi
> diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
> index c45788acd..534c5e7f1 100755
> --- a/utilities/ovs-dev.py
> +++ b/utilities/ovs-dev.py
> @@ -90,7 +90,6 @@ def conf():
>
>  if options.with_dpdk:
>  configure.append("--with-dpdk=" + options.with_dpdk)
> -cflags += " -Wno-cast-align -Wno-bad-function-cast"  # DPDK warnings.

Guess this script only works with older kernels due to always including the 
--with-linux= option.

>  if options.optimize is None:
>  options.optimize = 0
> -- 
> 2.28.0.2311.g225365fb51
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH dpdk-latest] ci: Remove -Wno-cast-align from CI

2021-12-04 Thread Eli Britstein via dev
Following [1]-[3] in DPDK, there are no more such warnings from DPDK.
Remove ignoring them if they occur.

GitHub actions:
v1: https://github.com/elibritstein/OVS/actions/runs/1540651133

[1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
[2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
[3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")

Signed-off-by: Eli Britstein 
---
 .ci/linux-build.sh   | 4 
 utilities/ovs-dev.py | 1 -
 2 files changed, 5 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index e20cc6ad0..65578880b 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -226,10 +226,6 @@ if [ "$DPDK" ]; then
 DPDK_VER="20.11.1"
 fi
 install_dpdk $DPDK_VER
-if [ "$CC" = "clang" ]; then
-# Disregard cast alignment errors until DPDK is fixed
-CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -Wno-cast-align"
-fi
 if [ -n "$DPDK_EXPERIMENTAL" ]; then
 CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} -DALLOW_EXPERIMENTAL_API"
 fi
diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
index c45788acd..534c5e7f1 100755
--- a/utilities/ovs-dev.py
+++ b/utilities/ovs-dev.py
@@ -90,7 +90,6 @@ def conf():
 
 if options.with_dpdk:
 configure.append("--with-dpdk=" + options.with_dpdk)
-cflags += " -Wno-cast-align -Wno-bad-function-cast"  # DPDK warnings.
 
 if options.optimize is None:
 options.optimize = 0
-- 
2.28.0.2311.g225365fb51

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev