Commit 0b261cfd authored by Kamil Godzwon's avatar Kamil Godzwon Committed by Tomasz Zawadzki
Browse files

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)

The change fixing DPDK patch:
https://review.spdk.io/gerrit/c/spdk/spdk/+/16914



Signed-off-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>

(cherry picked from commit 4dcb9448)
Change-Id: I9aded9014c6887e9c0f838b28cef5a0e9c42eda5
Signed-off-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16830


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent ac639eca
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -203,6 +203,11 @@ function build_native_dpdk() {
		else
			patch -p1 < "$rootdir/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_qat.patch"

			if lt $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"
+23 −0
Original line number Diff line number Diff line
---
 lib/hash/rte_thash_x86_gfni.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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;
--