From bad261b6abdbce4740a8cb1b981ed83ced45766a Mon Sep 17 00:00:00 2001 From: Kamil Godzwon Date: Wed, 22 Feb 2023 07:30:48 -0500 Subject: [PATCH] test/patch: fix rte_thash_x86_gfni patch Patch rte_thash_x86_gfni introduced in change 4dcb94480bc7f57bce66721d4305f8bc69d90ac9 turned out to be not unified as required so patching causes errors in upstream vs-dpdk CI jobs. The current master dpdk version is 23.03.0-rc1 and it contains changes from the patch so we have to check for all versions less than (not less-equal) 23.03.0. Signed-off-by: Kamil Godzwon Change-Id: Ie4d3a829bcd91ca07659388094bda2d61f7c1584 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16914 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Konrad Sztyber --- test/common/autobuild_common.sh | 2 +- .../dpdk/21.11+/dpdk_rte_thash_gfni.patch | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/test/common/autobuild_common.sh b/test/common/autobuild_common.sh index dec5051c0..345e73d6d 100755 --- a/test/common/autobuild_common.sh +++ b/test/common/autobuild_common.sh @@ -167,7 +167,7 @@ _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 + 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 diff --git a/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_rte_thash_gfni.patch b/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_rte_thash_gfni.patch index 814a023a2..89908c50a 100644 --- a/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_rte_thash_gfni.patch +++ b/test/common/config/pkgdep/patches/dpdk/21.11+/dpdk_rte_thash_gfni.patch @@ -1,17 +1,23 @@ +--- + 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; + 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; +-- +