autobuild: patch DPDK with "hash: fix GFNI implementation build with GCC12"

This affects CYP systems where the cpus do indeed
support these instructions.

Apply this patch, when building SPDK with external DPDK
(versions <23.03.0)

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I9aded9014c6887e9c0f838b28cef5a0e9c42eda5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16829
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Kamil Godzwon 2023-02-16 12:30:03 -05:00 committed by Tomasz Zawadzki
parent 24f6172ac8
commit 4dcb94480b
2 changed files with 22 additions and 0 deletions

View File

@ -167,6 +167,11 @@ _build_native_dpdk() {
else
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_qat.patch"
if le $dpdk_ver 23.03.0; then
# Commit https://review.spdk.io/gerrit/c/spdk/dpdk/+/16828 is required for DPDK <23.03.0
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_rte_thash_gfni.patch"
fi
# Commit https://review.spdk.io/gerrit/c/spdk/dpdk/+/16134 is required for DPDK 22.11+
if ge $dpdk_ver 22.11.0; then
patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/22.11+/dpdk_ipsec_mb.patch"

View File

@ -0,0 +1,17 @@
diff --git a/lib/hash/rte_thash_x86_gfni.h b/lib/hash/rte_thash_x86_gfni.h
index 880739b710..7bb76ac1bb 100644
--- a/lib/hash/rte_thash_x86_gfni.h
+++ b/lib/hash/rte_thash_x86_gfni.h
@@ -88,8 +88,10 @@ __rte_thash_gfni(const uint64_t *mtrx, const uint8_t *tuple,
const __m512i shift_8 = _mm512_set1_epi8(8);
__m512i xor_acc = _mm512_setzero_si512();
__m512i perm_bytes = _mm512_setzero_si512();
- __m512i vals, matrixes, tuple_bytes, tuple_bytes_2;
- __mmask64 load_mask, permute_mask, permute_mask_2;
+ __m512i vals, matrixes, tuple_bytes_2;
+ __m512i tuple_bytes = _mm512_setzero_si512();
+ __mmask64 load_mask, permute_mask_2;
+ __mmask64 permute_mask = 0;
int chunk_len = 0, i = 0;
uint8_t mtrx_msk;
const int prepend = 3;