[ovs-dev] [PATCH v4 6/7] configure/m4: binutils avx512 configure time check.

Van Haaren, Harry harry.van.haaren at intel.com
Tue Jun 30 10:01:11 UTC 2020


> -----Original Message-----
> From: William Tu <u9012063 at gmail.com>
> Sent: Saturday, June 27, 2020 7:27 PM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: ovs-dev <ovs-dev at openvswitch.org>; Stokes, Ian <ian.stokes at intel.com>;
> Ilya Maximets <i.maximets at ovn.org>; Federico Iezzi <fiezzi at redhat.com>
> Subject: Re: [PATCH v4 6/7] configure/m4: binutils avx512 configure time check.
> 
> On Thu, Jun 18, 2020 at 9:53 AM Harry van Haaren
> <harry.van.haaren at intel.com> wrote:
> >
> > This commit checks at configure time if the assembling in use
> > has a known bug in assembling AVX512 code. If this bug is present,
> > all AVX512 code is disabled.
> >
> > Checking the version string of the binutils or assembler is not
> > a good method to detect the issue, as backported fixes would not
> > be reflected.
> >
> > The method used here is also proposed for DPDK:
> > http://patches.dpdk.org/patch/71723/
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> >
> > ---
> >
> > v4:
> > - This patch is left seperate to ease reviews, as this is a logically
> >   seperate check. In v5 this code change will be merged with the commit
> >   that introduces the AVX512 code itself to ensure build consistency.
> > ---
> >  configure.ac             |  1 +
> >  lib/dpif-netdev-lookup.c |  2 ++
> >  m4/openvswitch.m4        | 24 ++++++++++++++++++++++++
> >  3 files changed, 27 insertions(+)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 1367c868b..76d6de4e8 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -184,6 +184,7 @@ OVS_ENABLE_WERROR
> >  OVS_ENABLE_SPARSE
> >  OVS_CTAGS_IDENTIFIERS
> >  OVS_CHECK_DPCLS_AUTOVALIDATOR
> > +OVS_CHECK_BINUTILS_AVX512
> >
> >  AC_ARG_VAR(KARCH, [Kernel Architecture String])
> >  AC_SUBST(KARCH)
> > diff --git a/lib/dpif-netdev-lookup.c b/lib/dpif-netdev-lookup.c
> > index 2c740399b..2a77814f2 100644
> > --- a/lib/dpif-netdev-lookup.c
> > +++ b/lib/dpif-netdev-lookup.c
> > @@ -45,6 +45,7 @@ static struct dpcls_subtable_lookup_info_t
> subtable_lookups[] = {
> >
> >  #ifdef __x86_64__
> >  #if HAVE_AVX512F
> > +#if HAVE_LD_AVX512_GOOD
> >  #ifdef __SSE4_2__
> nit:
> maybe combine these three conditions into one #if?

Will investigate.

> >      /* Only available on x86_64 bit builds with SSE 4.2 used for OVS core. */
> >      { .prio = 0,
> > @@ -59,6 +60,7 @@ static struct dpcls_subtable_lookup_info_t
> subtable_lookups[] = {
> >  #endif
> >  #endif
> >  #endif
> > +#endif
> >  };
> 
> The rest looks good to me, thanks
> 
> William


More information about the dev mailing list