[dpdk-dev] [PATCH] net: add support for AVX512 when generating CRC

O'loingsigh, Mairtin mairtin.oloingsigh at intel.com
Thu Sep 10 14:52:57 CEST 2020



> -----Original Message-----
> From: Bruce Richardson <bruce.richardson at intel.com>
> Sent: Thursday, September 10, 2020 1:28 PM
> To: O'loingsigh, Mairtin <mairtin.oloingsigh at intel.com>
> Cc: Singh, Jasvinder <jasvinder.singh at intel.com>; dev at dpdk.org; Ryan,
> Brendan <brendan.ryan at intel.com>; Coyle, David <david.coyle at intel.com>;
> De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Subject: Re: [dpdk-dev] [PATCH] net: add support for AVX512 when
> generating CRC
> 
> On Thu, Sep 10, 2020 at 01:01:11PM +0100, Mairtin o Loingsigh wrote:
> > This patch enables the generation of CRC using AVX512 instruction set
> > when available on the host platform.
> >
> > Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh at intel.com>
> > ---
> >
> > v1:
> > * Initial version, with AVX512 support for CRC32 Ethernet only
> > (requires further updates)
> >   * AVX512 support for CRC16-CCITT and final implementation of
> >     CRC32 Ethernet will be added in v2
> > ---
> >  doc/guides/rel_notes/release_20_11.rst |    4 +
> >  lib/librte_net/net_crc_avx.h           |  331
> ++++++++++++++++++++++++++++++++
> >  lib/librte_net/rte_net_crc.c           |   23 ++-
> >  lib/librte_net/rte_net_crc.h           |    1 +
> >  4 files changed, 358 insertions(+), 1 deletions(-)  create mode
> > 100644 lib/librte_net/net_crc_avx.h
> >
> <snip>
> > --- a/lib/librte_net/rte_net_crc.c
> > +++ b/lib/librte_net/rte_net_crc.c
> > @@ -10,12 +10,18 @@
> >  #include <rte_common.h>
> >  #include <rte_net_crc.h>
> >
> > -#if defined(RTE_ARCH_X86_64) &&
> > defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ)
> > +#if defined(RTE_ARCH_X86_64) &&
> defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ) \
> > +	&& defined(RTE_MACHINE_CPUFLAG_AVX512F)
> > +#define X86_64_AVX512F_PCLMULQDQ     1
> > +#elif defined(RTE_ARCH_X86_64) &&
> > +defined(RTE_MACHINE_CPUFLAG_PCLMULQDQ)
> 
> This all seems to be build-time selection of path. Can you perhaps investigate
> adding runtime selection instead, so that this can be used from distro
> packages, or DPDK compiled on older systems but used on newer.
> See also patchset: http://patches.dpdk.org/project/dpdk/list/?series=11831
> which is relevant to this too.
> 
> /Bruce

Sure. I will look at options for run time selection of intrinsic path


More information about the dev mailing list