Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Li Zhang
On Thu, Jun 2, 2022 at 7:31 PM Pai G, Sunil  wrote:
>
> Hi Li,
>
> My responses are inline.
>
> Thanks and Regards,
> Sunil
>
> > -Original Message-
> > From: Li Zhang 
> > Sent: Thursday, June 2, 2022 9:56 PM
> > To: Pai G, Sunil 
> > Cc: ovs-discuss@openvswitch.org
> > Subject: Re: [ovs-discuss] One question about AVX512 support
> >
> > Hi Pai,
> >
> > Thanks a lot. It helps.
> > These patches allow ovs to decide to disable or enable AVX512 if I
> > understand it correctly.
>
> Well,...not quite, they simply remove the dependency on DPDK i.e
> the decision to use AVX512/not in OVS is left to OVS only [DPDK arch 
> options/flags are simply ignored].
>

I see.

> > Is it recommended to enable AVX512? AVX512 is enabled by default.
>
> To get better performance and make the most out of the features offered by 
> the platform, I would say so, yes.
>
> > It is disabled in DPDK because it is experimental.
>
> I would recommend enabling AVX-512 in DPDK as well.
> Here is a link which describes how to: 
> https://doc.dpdk.org/guides/howto/avx512.html
>
> i.e for ovs, use the following command before launching vswitchd:
> ovs-vsctl --no-wait set Open_vSwitch . 
> other_config:dpdk-extra="--force-max-simd-bitwidth=512"
>
>
> > I wonder if I should disable it, it may cause performance worse.
>
> Here are few links I have handy that describe the performance improvements 
> seen with AVX-512 along with its impacts.
> https://networkbuilders.intel.com/solutionslibrary/open-vswitch-optimized-deployment-benchmark-technology-guide
>  .
> https://networkbuilders.intel.com/intel-technologies/3rd-gen-intel-xeon-scalable-processors-experience-kits
>  , Acceleration section.
>
> I would encourage you to go through these links.
>
 Really really thanks. It's very useful. I need to look at it.

>
> >
> > Thanks
> > Li
> >
> > On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:
> > >
> > > Hi Li,
> > >
> > > The assumption of ovs being dependent on dpdk for avx512 might not be
> > true.
> > > I found these two commits below in ovs-2.14.2 which strips out the "-
> > march" and "-mno-avx512f" flags exported by dpdk i.e removes dependency on
> > DPDK. The reason for this is rightly mentioned below as well. Hope this
> > helps.
> > >
> > >
> > > commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
> > > Author: Ian Stokes 
> > > Date:   Fri Jan 15 15:46:02 2021 +
> > >
> > > acinclude: Strip out -mno-avx512f provided by DPDK.
> > >
> > > DPDK forces '-mno-avx512f' flag for the application if the toolchain
> > > used to build DPDK had broken AVX512 support.
> > >
> > > DPDK forces '-mno-avx512f' flag for the application if the toolchain
> > > used to build DPDK had broken AVX512 support.  But OVS could be
> > built
> > > with a completely different or fixed toolchain with correct avx512
> > > support.
> > >
> > > Fix that by stripping out `-mno-avx512f` as we already do for '-
> > march'.
> > > This will allow the OVS to decide if the AVX512 can be used.
> > >
> > > Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not
> > an
> > > option since autotools might reorder them back later and it's very
> > > unpredictable.
> > >
> > > Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
> > > Signed-off-by: Ilya Maximets 
> > > Co-authored-by: Ilya Maximets 
> > > Signed-off-by: Ian Stokes 
> > >
> > > commit e9f9104d6a83ce7efd702120171835991779
> > > Author: Ian Stokes 
> > > Date:   Fri Jan 15 14:54:04 2021 +
> > >
> > > acinclude: Strip out -march provided by DPDK.
> > >
> > > DPDK flags may include -march. Forcing -march could be
> > > considered too heavy a requirement when users compile OVS from
> > > source and could override user provided options.
> > >
> > > Resolve this by stripping -march from provided DPDK flags.
> > >
> > > Signed-off-by: Ian Stokes 
> > >
> > >
> > >
> > > Thanks and Regards,
> > > Sunil
> > >
> > > > -Original Message-
> > > > From: discuss  On Behalf Of Li
> > > > Zhang
> > > > Sent: Thursday, June 2, 2022 6:35 PM
> > > > To: ovs-discuss@openvswitch.org
> > > > Subject: [ovs-discuss] One question about AVX512 support
> > > >
> > > > Hi   all,
> > > >
> > > > We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> > > > enabled by default but it's disabled in DPDK. But I think ovs is
> > > > dependent on the dpdk library, right? But why does ovs work with
> > > > avx512  disabled in DPDK?
> > > >
> > > > I am not quite sure about the relationship between OVS and DPDK, any
> > > > suggestions?
> > > >
> > > > --
> > > >
> > > > Best Regards
> > > > -Li
> > > > ___
> > > > discuss mailing list
> > > > disc...@openvswitch.org
> > > > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> >
> >
> >
> > --
> >
> > Best Regards
> > -Li



-- 

Best Regards
-Li
___
discuss 

Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Pai G, Sunil
Hi Li, 

My responses are inline.

Thanks and Regards,
Sunil

> -Original Message-
> From: Li Zhang 
> Sent: Thursday, June 2, 2022 9:56 PM
> To: Pai G, Sunil 
> Cc: ovs-discuss@openvswitch.org
> Subject: Re: [ovs-discuss] One question about AVX512 support
> 
> Hi Pai,
> 
> Thanks a lot. It helps.
> These patches allow ovs to decide to disable or enable AVX512 if I
> understand it correctly.

Well,...not quite, they simply remove the dependency on DPDK i.e
the decision to use AVX512/not in OVS is left to OVS only [DPDK arch 
options/flags are simply ignored].

> Is it recommended to enable AVX512? AVX512 is enabled by default.

To get better performance and make the most out of the features offered by the 
platform, I would say so, yes.

> It is disabled in DPDK because it is experimental. 

I would recommend enabling AVX-512 in DPDK as well.
Here is a link which describes how to: 
https://doc.dpdk.org/guides/howto/avx512.html

i.e for ovs, use the following command before launching vswitchd:
ovs-vsctl --no-wait set Open_vSwitch . 
other_config:dpdk-extra="--force-max-simd-bitwidth=512"


> I wonder if I should disable it, it may cause performance worse.

Here are few links I have handy that describe the performance improvements seen 
with AVX-512 along with its impacts.
https://networkbuilders.intel.com/solutionslibrary/open-vswitch-optimized-deployment-benchmark-technology-guide
 . 
https://networkbuilders.intel.com/intel-technologies/3rd-gen-intel-xeon-scalable-processors-experience-kits
 , Acceleration section.

I would encourage you to go through these links. 


> 
> Thanks
> Li
> 
> On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:
> >
> > Hi Li,
> >
> > The assumption of ovs being dependent on dpdk for avx512 might not be
> true.
> > I found these two commits below in ovs-2.14.2 which strips out the "-
> march" and "-mno-avx512f" flags exported by dpdk i.e removes dependency on
> DPDK. The reason for this is rightly mentioned below as well. Hope this
> helps.
> >
> >
> > commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
> > Author: Ian Stokes 
> > Date:   Fri Jan 15 15:46:02 2021 +
> >
> > acinclude: Strip out -mno-avx512f provided by DPDK.
> >
> > DPDK forces '-mno-avx512f' flag for the application if the toolchain
> > used to build DPDK had broken AVX512 support.
> >
> > DPDK forces '-mno-avx512f' flag for the application if the toolchain
> > used to build DPDK had broken AVX512 support.  But OVS could be
> built
> > with a completely different or fixed toolchain with correct avx512
> > support.
> >
> > Fix that by stripping out `-mno-avx512f` as we already do for '-
> march'.
> > This will allow the OVS to decide if the AVX512 can be used.
> >
> > Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not
> an
> > option since autotools might reorder them back later and it's very
> > unpredictable.
> >
> > Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
> > Signed-off-by: Ilya Maximets 
> > Co-authored-by: Ilya Maximets 
> > Signed-off-by: Ian Stokes 
> >
> > commit e9f9104d6a83ce7efd702120171835991779
> > Author: Ian Stokes 
> > Date:   Fri Jan 15 14:54:04 2021 +
> >
> > acinclude: Strip out -march provided by DPDK.
> >
> > DPDK flags may include -march. Forcing -march could be
> > considered too heavy a requirement when users compile OVS from
> > source and could override user provided options.
> >
> > Resolve this by stripping -march from provided DPDK flags.
> >
> > Signed-off-by: Ian Stokes 
> >
> >
> >
> > Thanks and Regards,
> > Sunil
> >
> > > -Original Message-
> > > From: discuss  On Behalf Of Li
> > > Zhang
> > > Sent: Thursday, June 2, 2022 6:35 PM
> > > To: ovs-discuss@openvswitch.org
> > > Subject: [ovs-discuss] One question about AVX512 support
> > >
> > > Hi   all,
> > >
> > > We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> > > enabled by default but it's disabled in DPDK. But I think ovs is
> > > dependent on the dpdk library, right? But why does ovs work with
> > > avx512  disabled in DPDK?
> > >
> > > I am not quite sure about the relationship between OVS and DPDK, any
> > > suggestions?
> > >
> > > --
> > >
> > > Best Regards
> > > -Li
> > > ___
> > > discuss mailing list
> > > disc...@openvswitch.org
> > > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 
> 
> 
> --
> 
> Best Regards
> -Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Li Zhang
On Thu, Jun 2, 2022 at 6:56 PM Raymond Burkholder  wrote:
>
>
>
> On 2022-06-02 10:26, Li Zhang wrote:
> > Hi Pai,
> >
> > Thanks a lot. It helps.
> > These patches allow ovs to decide to disable or enable AVX512 if I
> > understand it correctly.
> > Is it recommended to enable AVX512?  AVX512 is enabled by default.
> > It is disabled in DPDK because it is experimental. I wonder if I
> > should disable it, it may cause performance worse.
>
> Look at https://en.wikipedia.org/wiki/AVX-512

Got it, thanks.

>
> AVX512 is CPU model dependent.  Code will break if the instructions are
> run on a cpu without them.  Which is why they are typically not-compiled
> in.  Each environment will need to make that decision explicit.  If your
> environment supports the instructions, then I'd probably compile in for
> OVS & DPRK.  If you need code to transport all over the place, then best
> to disable them.
>
>
> >
> > Thanks
> > Li
> >
> > On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:
> >> Hi Li,
> >>
> >> The assumption of ovs being dependent on dpdk for avx512 might not be true.
> >> I found these two commits below in ovs-2.14.2 which strips out the 
> >> "-march" and "-mno-avx512f" flags exported by dpdk i.e removes dependency 
> >> on DPDK. The reason for this is rightly mentioned below as well. Hope this 
> >> helps.
> >>
> >>
> >> commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
> >> Author: Ian Stokes 
> >> Date:   Fri Jan 15 15:46:02 2021 +
> >>
> >>  acinclude: Strip out -mno-avx512f provided by DPDK.
> >>
> >>  DPDK forces '-mno-avx512f' flag for the application if the toolchain
> >>  used to build DPDK had broken AVX512 support.
> >>
> >>  DPDK forces '-mno-avx512f' flag for the application if the toolchain
> >>  used to build DPDK had broken AVX512 support.  But OVS could be built
> >>  with a completely different or fixed toolchain with correct avx512
> >>  support.
> >>
> >>  Fix that by stripping out `-mno-avx512f` as we already do for 
> >> '-march'.
> >>  This will allow the OVS to decide if the AVX512 can be used.
> >>
> >>  Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not 
> >> an
> >>  option since autotools might reorder them back later and it's very
> >>  unpredictable.
> >>
> >>  Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
> >>  Signed-off-by: Ilya Maximets 
> >>  Co-authored-by: Ilya Maximets 
> >>  Signed-off-by: Ian Stokes 
> >>
> >> commit e9f9104d6a83ce7efd702120171835991779
> >> Author: Ian Stokes 
> >> Date:   Fri Jan 15 14:54:04 2021 +
> >>
> >>  acinclude: Strip out -march provided by DPDK.
> >>
> >>  DPDK flags may include -march. Forcing -march could be
> >>  considered too heavy a requirement when users compile OVS from
> >>  source and could override user provided options.
> >>
> >>  Resolve this by stripping -march from provided DPDK flags.
> >>
> >>  Signed-off-by: Ian Stokes 
> >>
> >>
> >>
> >> Thanks and Regards,
> >> Sunil
> >>
> >>> -Original Message-
> >>> From: discuss  On Behalf Of Li Zhang
> >>> Sent: Thursday, June 2, 2022 6:35 PM
> >>> To: ovs-discuss@openvswitch.org
> >>> Subject: [ovs-discuss] One question about AVX512 support
> >>>
> >>> Hi   all,
> >>>
> >>> We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> >>> enabled by default but it's disabled in DPDK. But I think ovs is dependent
> >>> on the dpdk library, right? But why does ovs work with
> >>> avx512  disabled in DPDK?
> >>>
> >>> I am not quite sure about the relationship between OVS and DPDK, any
> >>> suggestions?
> >>>
> >>> --
> >>>
> >>> Best Regards
> >>> -Li
> >>> ___
> >>> discuss mailing list
> >>> disc...@openvswitch.org
> >>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> >
> >
>
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss



-- 

Best Regards
-Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Raymond Burkholder



On 2022-06-02 10:26, Li Zhang wrote:

Hi Pai,

Thanks a lot. It helps.
These patches allow ovs to decide to disable or enable AVX512 if I
understand it correctly.
Is it recommended to enable AVX512?  AVX512 is enabled by default.
It is disabled in DPDK because it is experimental. I wonder if I
should disable it, it may cause performance worse.


Look at https://en.wikipedia.org/wiki/AVX-512

AVX512 is CPU model dependent.  Code will break if the instructions are 
run on a cpu without them.  Which is why they are typically not-compiled 
in.  Each environment will need to make that decision explicit.  If your 
environment supports the instructions, then I'd probably compile in for 
OVS & DPRK.  If you need code to transport all over the place, then best 
to disable them.





Thanks
Li

On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:

Hi Li,

The assumption of ovs being dependent on dpdk for avx512 might not be true.
I found these two commits below in ovs-2.14.2 which strips out the "-march" and 
"-mno-avx512f" flags exported by dpdk i.e removes dependency on DPDK. The reason for this 
is rightly mentioned below as well. Hope this helps.


commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
Author: Ian Stokes 
Date:   Fri Jan 15 15:46:02 2021 +

 acinclude: Strip out -mno-avx512f provided by DPDK.

 DPDK forces '-mno-avx512f' flag for the application if the toolchain
 used to build DPDK had broken AVX512 support.

 DPDK forces '-mno-avx512f' flag for the application if the toolchain
 used to build DPDK had broken AVX512 support.  But OVS could be built
 with a completely different or fixed toolchain with correct avx512
 support.

 Fix that by stripping out `-mno-avx512f` as we already do for '-march'.
 This will allow the OVS to decide if the AVX512 can be used.

 Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an
 option since autotools might reorder them back later and it's very
 unpredictable.

 Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
 Signed-off-by: Ilya Maximets 
 Co-authored-by: Ilya Maximets 
 Signed-off-by: Ian Stokes 

commit e9f9104d6a83ce7efd702120171835991779
Author: Ian Stokes 
Date:   Fri Jan 15 14:54:04 2021 +

 acinclude: Strip out -march provided by DPDK.

 DPDK flags may include -march. Forcing -march could be
 considered too heavy a requirement when users compile OVS from
 source and could override user provided options.

 Resolve this by stripping -march from provided DPDK flags.

 Signed-off-by: Ian Stokes 



Thanks and Regards,
Sunil


-Original Message-
From: discuss  On Behalf Of Li Zhang
Sent: Thursday, June 2, 2022 6:35 PM
To: ovs-discuss@openvswitch.org
Subject: [ovs-discuss] One question about AVX512 support

Hi   all,

We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
enabled by default but it's disabled in DPDK. But I think ovs is dependent
on the dpdk library, right? But why does ovs work with
avx512  disabled in DPDK?

I am not quite sure about the relationship between OVS and DPDK, any
suggestions?

--

Best Regards
-Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss





___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Li Zhang
On Thu, Jun 2, 2022 at 6:30 PM Raymond Burkholder  wrote:
>
>
>
> On 2022-06-02 10:26, Li Zhang wrote:
> > Hi Pai,
> >
> > Thanks a lot. It helps.
> > These patches allow ovs to decide to disable or enable AVX512 if I
> > understand it correctly.
> > Is it recommended to enable AVX512?  AVX512 is enabled by default.
> > It is disabled in DPDK because it is experimental. I wonder if I
> > should disable it, it may cause performance worse.
>
> AVX512 is CPU model dependent.  Code will break if the instructions are
> run on a cpu without them.  Which is why they are typically not-compiled
> in.  Each environment will need to make that decision explicit.  If your
> environment supports the instructions, then I'd probably compile in for
> OVS & DPRK.  If you need code to transport all over the place, then best
> to disable them.

Got it, thanks!

>
> >
> > Thanks
> > Li
> >
> > On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:
> >> Hi Li,
> >>
> >> The assumption of ovs being dependent on dpdk for avx512 might not be true.
> >> I found these two commits below in ovs-2.14.2 which strips out the 
> >> "-march" and "-mno-avx512f" flags exported by dpdk i.e removes dependency 
> >> on DPDK. The reason for this is rightly mentioned below as well. Hope this 
> >> helps.
> >>
> >>
> >> commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
> >> Author: Ian Stokes 
> >> Date:   Fri Jan 15 15:46:02 2021 +
> >>
> >>  acinclude: Strip out -mno-avx512f provided by DPDK.
> >>
> >>  DPDK forces '-mno-avx512f' flag for the application if the toolchain
> >>  used to build DPDK had broken AVX512 support.
> >>
> >>  DPDK forces '-mno-avx512f' flag for the application if the toolchain
> >>  used to build DPDK had broken AVX512 support.  But OVS could be built
> >>  with a completely different or fixed toolchain with correct avx512
> >>  support.
> >>
> >>  Fix that by stripping out `-mno-avx512f` as we already do for 
> >> '-march'.
> >>  This will allow the OVS to decide if the AVX512 can be used.
> >>
> >>  Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not 
> >> an
> >>  option since autotools might reorder them back later and it's very
> >>  unpredictable.
> >>
> >>  Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
> >>  Signed-off-by: Ilya Maximets 
> >>  Co-authored-by: Ilya Maximets 
> >>  Signed-off-by: Ian Stokes 
> >>
> >> commit e9f9104d6a83ce7efd702120171835991779
> >> Author: Ian Stokes 
> >> Date:   Fri Jan 15 14:54:04 2021 +
> >>
> >>  acinclude: Strip out -march provided by DPDK.
> >>
> >>  DPDK flags may include -march. Forcing -march could be
> >>  considered too heavy a requirement when users compile OVS from
> >>  source and could override user provided options.
> >>
> >>  Resolve this by stripping -march from provided DPDK flags.
> >>
> >>  Signed-off-by: Ian Stokes 
> >>
> >>
> >>
> >> Thanks and Regards,
> >> Sunil
> >>
> >>> -Original Message-
> >>> From: discuss  On Behalf Of Li Zhang
> >>> Sent: Thursday, June 2, 2022 6:35 PM
> >>> To: ovs-discuss@openvswitch.org
> >>> Subject: [ovs-discuss] One question about AVX512 support
> >>>
> >>> Hi   all,
> >>>
> >>> We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> >>> enabled by default but it's disabled in DPDK. But I think ovs is dependent
> >>> on the dpdk library, right? But why does ovs work with
> >>> avx512  disabled in DPDK?
> >>>
> >>> I am not quite sure about the relationship between OVS and DPDK, any
> >>> suggestions?
> >>>
> >>> --
> >>>
> >>> Best Regards
> >>> -Li
> >>> ___
> >>> discuss mailing list
> >>> disc...@openvswitch.org
> >>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> >
> >
>


-- 

Best Regards
-Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Li Zhang
Hi Pai,

Thanks a lot. It helps.
These patches allow ovs to decide to disable or enable AVX512 if I
understand it correctly.
Is it recommended to enable AVX512?  AVX512 is enabled by default.
It is disabled in DPDK because it is experimental. I wonder if I
should disable it, it may cause performance worse.

Thanks
Li

On Thu, Jun 2, 2022 at 4:00 PM Pai G, Sunil  wrote:
>
> Hi Li,
>
> The assumption of ovs being dependent on dpdk for avx512 might not be true.
> I found these two commits below in ovs-2.14.2 which strips out the "-march" 
> and "-mno-avx512f" flags exported by dpdk i.e removes dependency on DPDK. The 
> reason for this is rightly mentioned below as well. Hope this helps.
>
>
> commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
> Author: Ian Stokes 
> Date:   Fri Jan 15 15:46:02 2021 +
>
> acinclude: Strip out -mno-avx512f provided by DPDK.
>
> DPDK forces '-mno-avx512f' flag for the application if the toolchain
> used to build DPDK had broken AVX512 support.
>
> DPDK forces '-mno-avx512f' flag for the application if the toolchain
> used to build DPDK had broken AVX512 support.  But OVS could be built
> with a completely different or fixed toolchain with correct avx512
> support.
>
> Fix that by stripping out `-mno-avx512f` as we already do for '-march'.
> This will allow the OVS to decide if the AVX512 can be used.
>
> Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an
> option since autotools might reorder them back later and it's very
> unpredictable.
>
> Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
> Signed-off-by: Ilya Maximets 
> Co-authored-by: Ilya Maximets 
> Signed-off-by: Ian Stokes 
>
> commit e9f9104d6a83ce7efd702120171835991779
> Author: Ian Stokes 
> Date:   Fri Jan 15 14:54:04 2021 +
>
> acinclude: Strip out -march provided by DPDK.
>
> DPDK flags may include -march. Forcing -march could be
> considered too heavy a requirement when users compile OVS from
> source and could override user provided options.
>
> Resolve this by stripping -march from provided DPDK flags.
>
> Signed-off-by: Ian Stokes 
>
>
>
> Thanks and Regards,
> Sunil
>
> > -Original Message-
> > From: discuss  On Behalf Of Li Zhang
> > Sent: Thursday, June 2, 2022 6:35 PM
> > To: ovs-discuss@openvswitch.org
> > Subject: [ovs-discuss] One question about AVX512 support
> >
> > Hi   all,
> >
> > We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> > enabled by default but it's disabled in DPDK. But I think ovs is dependent
> > on the dpdk library, right? But why does ovs work with
> > avx512  disabled in DPDK?
> >
> > I am not quite sure about the relationship between OVS and DPDK, any
> > suggestions?
> >
> > --
> >
> > Best Regards
> > -Li
> > ___
> > discuss mailing list
> > disc...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss



-- 

Best Regards
-Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] One question about AVX512 support

2022-06-02 Thread Pai G, Sunil
Hi Li, 

The assumption of ovs being dependent on dpdk for avx512 might not be true.
I found these two commits below in ovs-2.14.2 which strips out the "-march" and 
"-mno-avx512f" flags exported by dpdk i.e removes dependency on DPDK. The 
reason for this is rightly mentioned below as well. Hope this helps.


commit bb8f0e2a810889241f1d886d160ccee9b96c4d63
Author: Ian Stokes 
Date:   Fri Jan 15 15:46:02 2021 +

acinclude: Strip out -mno-avx512f provided by DPDK.

DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.

DPDK forces '-mno-avx512f' flag for the application if the toolchain
used to build DPDK had broken AVX512 support.  But OVS could be built
with a completely different or fixed toolchain with correct avx512
support.

Fix that by stripping out `-mno-avx512f` as we already do for '-march'.
This will allow the OVS to decide if the AVX512 can be used.

Reordering of CFLAGS (i.e. adding DPDK flags before OVS ones) is not an
option since autotools might reorder them back later and it's very
unpredictable.

Reported-at: https://github.com/openvswitch/ovs-issues/issues/201
Signed-off-by: Ilya Maximets 
Co-authored-by: Ilya Maximets 
Signed-off-by: Ian Stokes 

commit e9f9104d6a83ce7efd702120171835991779
Author: Ian Stokes 
Date:   Fri Jan 15 14:54:04 2021 +

acinclude: Strip out -march provided by DPDK.

DPDK flags may include -march. Forcing -march could be
considered too heavy a requirement when users compile OVS from
source and could override user provided options.

Resolve this by stripping -march from provided DPDK flags.

Signed-off-by: Ian Stokes 



Thanks and Regards,
Sunil

> -Original Message-
> From: discuss  On Behalf Of Li Zhang
> Sent: Thursday, June 2, 2022 6:35 PM
> To: ovs-discuss@openvswitch.org
> Subject: [ovs-discuss] One question about AVX512 support
> 
> Hi   all,
> 
> We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
> enabled by default but it's disabled in DPDK. But I think ovs is dependent
> on the dpdk library, right? But why does ovs work with
> avx512  disabled in DPDK?
> 
> I am not quite sure about the relationship between OVS and DPDK, any
> suggestions?
> 
> --
> 
> Best Regards
> -Li
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] ovs-tcpdump doesn't work on patch ports?

2022-06-02 Thread Lars Kellogg-Stedman
Thanks, that's exactly what I was looking for!

On Thu, Jun 2, 2022 at 9:31 AM Lewis Denny  wrote:

> Hi Lars,
>
> I had a similar question recently, the answer I got is the following:
>
> "A patch port is not the same as a veth pair. It is not used to "send" and
> "receive" traffic. When we process an upcall and have to determine what
> actions
> to perform on a packet, a patch_port is is basically an equivalent to
> "continue
> processing openflow flows on this other bridge"
>
> The following blog post goes into some detail on the topic:
> https://arthurchiao.art/blog/ovs-deep-dive-4-patch-port/
>
> I hope this helps.
>
> On Thu, Jun 2, 2022 at 11:03 PM Lars Kellogg-Stedman 
> wrote:
>
>> Given two OVS bridges connected by a patch port, I would like to run
>> `tcpdump` on either of the patch interfaces to see traffic passing between
>> the switches. The command runs without error, but doesn't see any of the
>> expected traffic.
>>
>> The basic configuration looks something like this:
>>
>> ovs-vsctl add-br br0
>> ovs-vsctl add-br br1
>> ovs-vsctl add-port br0 patch-br1 -- set interface patch-br1
>> type=patch options:peer=patch-br0
>> ovs-vsctl add-port br1 patch-br0 -- set interface patch-br0
>> type=patch options:peer=patch-br1
>>
>> I want to run `ovs-tcpdump -i patch-br1 -n`, but it doesn't seem to work.
>> I see the same behavior if I manually set up a mirror port and run
>> `tcpdump` on it.
>>
>> Is it possible to set up mirrors for patch ports?
>>
>>
>> --
>> Lars Kellogg-Stedman 
>>
>> ___
>> discuss mailing list
>> disc...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>>
>
>
> --
>
> Lewis Denny, RHCE
>
> OpenStack
>
> Software Maintenance Engineer
>
> Red Hat APAC 
> 
>


-- 
Lars Kellogg-Stedman 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] ovs-tcpdump doesn't work on patch ports?

2022-06-02 Thread Lewis Denny
Hi Lars,

I had a similar question recently, the answer I got is the following:

"A patch port is not the same as a veth pair. It is not used to "send" and
"receive" traffic. When we process an upcall and have to determine what
actions
to perform on a packet, a patch_port is is basically an equivalent to
"continue
processing openflow flows on this other bridge"

The following blog post goes into some detail on the topic:
https://arthurchiao.art/blog/ovs-deep-dive-4-patch-port/

I hope this helps.

On Thu, Jun 2, 2022 at 11:03 PM Lars Kellogg-Stedman 
wrote:

> Given two OVS bridges connected by a patch port, I would like to run
> `tcpdump` on either of the patch interfaces to see traffic passing between
> the switches. The command runs without error, but doesn't see any of the
> expected traffic.
>
> The basic configuration looks something like this:
>
> ovs-vsctl add-br br0
> ovs-vsctl add-br br1
> ovs-vsctl add-port br0 patch-br1 -- set interface patch-br1 type=patch
> options:peer=patch-br0
> ovs-vsctl add-port br1 patch-br0 -- set interface patch-br0 type=patch
> options:peer=patch-br1
>
> I want to run `ovs-tcpdump -i patch-br1 -n`, but it doesn't seem to work.
> I see the same behavior if I manually set up a mirror port and run
> `tcpdump` on it.
>
> Is it possible to set up mirrors for patch ports?
>
>
> --
> Lars Kellogg-Stedman 
>
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>


-- 

Lewis Denny, RHCE

OpenStack

Software Maintenance Engineer

Red Hat APAC 

___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] One question about AVX512 support

2022-06-02 Thread Li Zhang
Hi   all,

We are using openvswitch 2.14.2, and dpdk-19.11.4. I found avx512 is
enabled by default but it's disabled in DPDK. But I think ovs is
dependent on the dpdk library, right? But why does ovs work with
avx512  disabled in DPDK?

I am not quite sure about the relationship between OVS and DPDK, any
suggestions?

-- 

Best Regards
-Li
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] ovs-tcpdump doesn't work on patch ports?

2022-06-02 Thread Lars Kellogg-Stedman
Given two OVS bridges connected by a patch port, I would like to run
`tcpdump` on either of the patch interfaces to see traffic passing between
the switches. The command runs without error, but doesn't see any of the
expected traffic.

The basic configuration looks something like this:

ovs-vsctl add-br br0
ovs-vsctl add-br br1
ovs-vsctl add-port br0 patch-br1 -- set interface patch-br1 type=patch
options:peer=patch-br0
ovs-vsctl add-port br1 patch-br0 -- set interface patch-br0 type=patch
options:peer=patch-br1

I want to run `ovs-tcpdump -i patch-br1 -n`, but it doesn't seem to work. I
see the same behavior if I manually set up a mirror port and run `tcpdump`
on it.

Is it possible to set up mirrors for patch ports?


-- 
Lars Kellogg-Stedman 
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss