On Thu, Jun 2, 2022 at 6:56 PM Raymond Burkholder <r...@oneunified.net> 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 <sunil.pa...@intel.com> 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 <ian.sto...@intel.com> > >> Date: Fri Jan 15 15:46:02 2021 +0000 > >> > >> 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 <i.maxim...@ovn.org> > >> Co-authored-by: Ilya Maximets <i.maxim...@ovn.org> > >> Signed-off-by: Ian Stokes <ian.sto...@intel.com> > >> > >> commit e9f9104d00006a83ce7efd702120171835991779 > >> Author: Ian Stokes <ian.sto...@intel.com> > >> Date: Fri Jan 15 14:54:04 2021 +0000 > >> > >> 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 <ian.sto...@intel.com> > >> > >> > >> > >> Thanks and Regards, > >> Sunil > >> > >>> -----Original Message----- > >>> From: discuss <ovs-discuss-boun...@openvswitch.org> 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