net: add CRC implementation runtime selection
authorMairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Fri, 9 Oct 2020 13:50:44 +0000 (14:50 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 13 Oct 2020 17:26:03 +0000 (19:26 +0200)
commitef94569cf9f404838e5caf1c3b2799e703168c02
tree398ab35156c6e488bece1b3eb50ec28b53340506
parentd9739192a77d6eab3b1d6b7df7e40a4aca9cf145
net: add CRC implementation runtime selection

This patch adds support for run-time selection of the optimal
architecture-specific CRC path, based on the supported instruction set(s)
of the CPU.

The compiler option checks have been moved from the C files to the meson
script. The rte_cpu_get_flag_enabled function is called automatically by
the library at process initialization time to determine which
instructions the CPU supports, with the most optimal supported CRC path
ultimately selected.

Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
MAINTAINERS
doc/guides/rel_notes/release_20_11.rst
lib/librte_net/meson.build
lib/librte_net/net_crc.h [new file with mode: 0644]
lib/librte_net/net_crc_neon.c [new file with mode: 0644]
lib/librte_net/net_crc_neon.h [deleted file]
lib/librte_net/net_crc_sse.c [new file with mode: 0644]
lib/librte_net/net_crc_sse.h [deleted file]
lib/librte_net/rte_net_crc.c