mbox series

[v5,0/2] net: add CRC run-time checks and AVX512/VPCLMULQDQ based CRC

Message ID 20201009135045.8505-1-mairtin.oloingsigh@intel.com (mailing list archive)
Headers
Series net: add CRC run-time checks and AVX512/VPCLMULQDQ based CRC |

Message

Mairtin o Loingsigh Oct. 9, 2020, 1:50 p.m. UTC
  This patchset makes two significant enhancements to the CRC modules of
the rte_net library:

1) Adds run-time selection of the optimal architecture-specific CRC path.
   Previously the selection was solely made at compile-time, meaning it
   could only be built and run on the same generation of CPU. Adding
   run-time selection ability means this can be used from distro packages
   and/or DPDK can be compiled on an older CPU and run on a newer CPU.
2) Adds an optimized CRC implementation based on the AVX512 and
   VPCLMULQDQ instruction sets.
   
For further details, please see the commit messages of the individual
patches.

v5:
* Tidied-up the ifdef checks for RTE_ARCH_* and compiler support of CRC 
  paths, as per review comments:
  * All ifdef checks removed from API function definitions and moved into
    helper functions.
    
v4:
* Fixed build issue when older version of meson is used (0.47.1).
* Addressed review comments:
  * remove Intel copyright header from neon CRC file.
  * tidy-up of register initialisation.

v3:
* Re-submitted v2 as encountered problems when originally submitting it.

v2:
* Added support for run-time selection of optimal architecture-specific
  CRC, based on v1 review comment.
* Added full working AVX512/VPCLMULQDQ support for CRC32-Ethernet and
  CRC16-CCITT.

v1:
* Initial version, with incomplete AVX512/VPCLMULQDQ support for
  CRC32-Ethernet only.

Mairtin o Loingsigh (2):
  net: add run-time architecture specific CRC selection
  net: add support for AVX512/VPCLMULQDQ based CRC

 app/test/test_crc.c                               |  11 +-
 config/x86/meson.build                            |   6 +-
 doc/guides/rel_notes/release_20_11.rst            |   6 +
 lib/librte_net/meson.build                        |  89 ++++-
 lib/librte_net/net_crc.h                          |  45 +++
 lib/librte_net/net_crc_avx512.c                   | 423 ++++++++++++++++++++++
 lib/librte_net/{net_crc_neon.h => net_crc_neon.c} |  26 +-
 lib/librte_net/{net_crc_sse.h => net_crc_sse.c}   |  34 +-
 lib/librte_net/rte_net_crc.c                      | 162 +++++++--
 lib/librte_net/rte_net_crc.h                      |   4 +-
 10 files changed, 722 insertions(+), 84 deletions(-)
 create mode 100644 lib/librte_net/net_crc.h
 create mode 100644 lib/librte_net/net_crc_avx512.c
 rename lib/librte_net/{net_crc_neon.h => net_crc_neon.c} (95%)
 rename lib/librte_net/{net_crc_sse.h => net_crc_sse.c} (94%)
  

Comments

De Lara Guarch, Pablo Oct. 9, 2020, 6:35 p.m. UTC | #1
> -----Original Message-----
> From: O'loingsigh, Mairtin <mairtin.oloingsigh@intel.com>
> Sent: Friday, October 9, 2020 2:51 PM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Ryan, Brendan <brendan.ryan@intel.com>; O'loingsigh,
> Mairtin <mairtin.oloingsigh@intel.com>; Coyle, David <david.coyle@intel.com>
> Subject: [PATCH v5 0/2] net: add CRC run-time checks and
> AVX512/VPCLMULQDQ based CRC
> 
> This patchset makes two significant enhancements to the CRC modules of the
> rte_net library:
> 
> 1) Adds run-time selection of the optimal architecture-specific CRC path.
>    Previously the selection was solely made at compile-time, meaning it
>    could only be built and run on the same generation of CPU. Adding
>    run-time selection ability means this can be used from distro packages
>    and/or DPDK can be compiled on an older CPU and run on a newer CPU.
> 2) Adds an optimized CRC implementation based on the AVX512 and
>    VPCLMULQDQ instruction sets.
> 
> For further details, please see the commit messages of the individual patches.
> 
> v5:
> * Tidied-up the ifdef checks for RTE_ARCH_* and compiler support of CRC
>   paths, as per review comments:
>   * All ifdef checks removed from API function definitions and moved into
>     helper functions.
> 
> v4:
> * Fixed build issue when older version of meson is used (0.47.1).
> * Addressed review comments:
>   * remove Intel copyright header from neon CRC file.
>   * tidy-up of register initialisation.
> 
> v3:
> * Re-submitted v2 as encountered problems when originally submitting it.
> 
> v2:
> * Added support for run-time selection of optimal architecture-specific
>   CRC, based on v1 review comment.
> * Added full working AVX512/VPCLMULQDQ support for CRC32-Ethernet and
>   CRC16-CCITT.
> 
> v1:
> * Initial version, with incomplete AVX512/VPCLMULQDQ support for
>   CRC32-Ethernet only.
> 
> Mairtin o Loingsigh (2):
>   net: add run-time architecture specific CRC selection
>   net: add support for AVX512/VPCLMULQDQ based CRC
> 
>  app/test/test_crc.c                               |  11 +-
>  config/x86/meson.build                            |   6 +-
>  doc/guides/rel_notes/release_20_11.rst            |   6 +
>  lib/librte_net/meson.build                        |  89 ++++-
>  lib/librte_net/net_crc.h                          |  45 +++
>  lib/librte_net/net_crc_avx512.c                   | 423 ++++++++++++++++++++++
>  lib/librte_net/{net_crc_neon.h => net_crc_neon.c} |  26 +-
>  lib/librte_net/{net_crc_sse.h => net_crc_sse.c}   |  34 +-
>  lib/librte_net/rte_net_crc.c                      | 162 +++++++--
>  lib/librte_net/rte_net_crc.h                      |   4 +-
>  10 files changed, 722 insertions(+), 84 deletions(-)  create mode 100644
> lib/librte_net/net_crc.h  create mode 100644 lib/librte_net/net_crc_avx512.c
> rename lib/librte_net/{net_crc_neon.h => net_crc_neon.c} (95%)  rename
> lib/librte_net/{net_crc_sse.h => net_crc_sse.c} (94%)
> 
> --
> 2.12.3

Series-Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
David Marchand Oct. 13, 2020, 6:47 p.m. UTC | #2
On Fri, Oct 9, 2020 at 3:55 PM Mairtin o Loingsigh
<mairtin.oloingsigh@intel.com> wrote:
>
> This patchset makes two significant enhancements to the CRC modules of
> the rte_net library:
>
> 1) Adds run-time selection of the optimal architecture-specific CRC path.
>    Previously the selection was solely made at compile-time, meaning it
>    could only be built and run on the same generation of CPU. Adding
>    run-time selection ability means this can be used from distro packages
>    and/or DPDK can be compiled on an older CPU and run on a newer CPU.
> 2) Adds an optimized CRC implementation based on the AVX512 and
>    VPCLMULQDQ instruction sets.
>
> For further details, please see the commit messages of the individual
> patches.
>
> v5:
> * Tidied-up the ifdef checks for RTE_ARCH_* and compiler support of CRC
>   paths, as per review comments:
>   * All ifdef checks removed from API function definitions and moved into
>     helper functions.

Updated MAINTAINERS with renamed/added files.
Series applied.