[ovs-dev] [PATCH] dpif-netdev: Call cpuid for x86 isa availability.
Van Haaren, Harry
harry.van.haaren at intel.com
Thu Nov 4 15:39:20 UTC 2021
> -----Original Message-----
> From: Ilya Maximets <i.maximets at ovn.org>
> Sent: Wednesday, November 3, 2021 3:32 PM
> To: David Marchand <david.marchand at redhat.com>; dev at openvswitch.org
> Cc: i.maximets at ovn.org; Amber, Kumar <kumar.amber at intel.com>; Van
> Haaren, Harry <harry.van.haaren at intel.com>; Stokes, Ian
> <ian.stokes at intel.com>; Ferriter, Cian <cian.ferriter at intel.com>
> Subject: Re: [ovs-dev] [PATCH] dpif-netdev: Call cpuid for x86 isa availability.
>
> On 10/12/21 21:49, David Marchand wrote:
> > DPIF AVX512 optimisations currently rely on DPDK availability while
> > they can be used without DPDK.
> > Besides, checking for availability of some isa only has to be done once
> > and won't change while a OVS process runs.
> >
> > Resolve isa availability in constructors by using a simplified query
> > based on cpuid API that comes from the compiler.
> >
> > Note: this also fixes the check on BMI2 availability: DPDK had a bug
> > for this isa, see https://git.dpdk.org/dpdk/commit/?id=aae3037ab1e0.
> >
> > Suggested-by: Ilya Maximets <i.maximets at ovn.org>
> > Signed-off-by: David Marchand <david.marchand at redhat.com>
> > ---
> > lib/automake.mk | 2 +
> > lib/cpu.c | 68 ++++++++++++++++++++++++++
> > lib/cpu.h | 34 +++++++++++++
> > lib/dpdk-stub.c | 9 ----
> > lib/dpdk.c | 52 --------------------
> > lib/dpdk.h | 1 -
> > lib/dpif-netdev-avx512.c | 5 +-
> > lib/dpif-netdev-extract-avx512.c | 14 +++---
> > lib/dpif-netdev-lookup-avx512-gather.c | 7 +--
> > 9 files changed, 118 insertions(+), 74 deletions(-)
> > create mode 100644 lib/cpu.c
> > create mode 100644 lib/cpu.h
> >
>
> Hi, David. Thanks ofr the patch!
>
> I didn't check the actual values of cpuid bits, but the overall design
> and implementation looks great! This way non-dpdk setups (e.g. afxdp)
> will be able to use optimized lookup functions. This will also make
> unit-testing easier. This patch also eliminated string comparisons, which
> is good to see.
>
> Next step, I suppose, will be to move AVX512 tests out of the DPDK testsuite
> to one of generic ones?
>
> Harry, Cian, Amber, could you, please, review/test this out on your setup?
Yes, its on the backlog - I'm just a bit behind on things, will try pull this up the priority list.
No big concerns here, we will provide a more detailed review on list soon.
> Best regards, Ilya Maximets.
Regards, -Harry
<snip below patch>
More information about the dev
mailing list