hash: fix Toeplitz hash implementation
authorVladimir Medvedkin <vladimir.medvedkin@intel.com>
Tue, 16 Nov 2021 14:33:29 +0000 (14:33 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 17 Nov 2021 09:23:01 +0000 (10:23 +0100)
commitfba335b4b2044f1621c3ef969b564108aa708ecf
tree93a68791d3b71388f8a0f412289ed45ae3cfd49b
parent2c7302145c0405b056850382731e5352d44f7d64
hash: fix Toeplitz hash implementation

This patch fixes various issues:
- replace _mm512_set_epi8 with _mm512_set_epi32 due to the lack
  of support by some compilers (at least, gcc 8),
- check if AVX512F is supported along with GFNI, this is done if the code
  is built on a platform that supports GFNI, but does not support AVX512,
- fix compilation problems on 32bit arch due to lack of support for
  _mm_extract_epi64() by implementing XOR folding with
  _mm_extract_epi32() on 32-bit arch,

Fixes: 4fd8c4cb0de1 ("hash: add new Toeplitz hash implementation")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Kai Ji <kai.ji@intel.com>
lib/hash/rte_thash_x86_gfni.h