member: fix build failure with GCC 5.4.0

Message ID 20221010082245.2868071-1-leyi.rong@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series member: fix build failure with GCC 5.4.0 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Leyi Rong Oct. 10, 2022, 8:22 a.m. UTC
  This patch fixes the build failure by typecasting to match
_mm512_i32gather_epi64() definition.

Bugzilla ID: 1096
Fixes: db354bd2e1f8 ("member: add NitroSketch mode")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
---
 lib/member/rte_member_sketch_avx512.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Ali Alnubani Oct. 10, 2022, 8:43 a.m. UTC | #1
> -----Original Message-----
> From: Leyi Rong <leyi.rong@intel.com>
> Sent: Monday, October 10, 2022 11:23 AM
> To: Ali Alnubani <alialnu@nvidia.com>; NBU-Contact-Thomas Monjalon
> (EXTERNAL) <thomas@monjalon.net>
> Cc: dev@dpdk.org; Leyi Rong <leyi.rong@intel.com>
> Subject: [PATCH] member: fix build failure with GCC 5.4.0
> 
> This patch fixes the build failure by typecasting to match
> _mm512_i32gather_epi64() definition.
> 
> Bugzilla ID: 1096
> Fixes: db354bd2e1f8 ("member: add NitroSketch mode")
> 
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---

Thanks Leyi, build passes with this patch.

Tested-by: Ali Alnubani <alialnu@nvidia.com>
  
Thomas Monjalon Oct. 10, 2022, 10:21 a.m. UTC | #2
10/10/2022 10:43, Ali Alnubani:
> From: Leyi Rong <leyi.rong@intel.com>
> > 
> > This patch fixes the build failure by typecasting to match
> > _mm512_i32gather_epi64() definition.
> > 
> > Bugzilla ID: 1096
> > Fixes: db354bd2e1f8 ("member: add NitroSketch mode")
> > 
> > Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> > ---
> 
> Thanks Leyi, build passes with this patch.
> 
> Tested-by: Ali Alnubani <alialnu@nvidia.com>

Applied, thanks.
  

Patch

diff --git a/lib/member/rte_member_sketch_avx512.c b/lib/member/rte_member_sketch_avx512.c
index 288e37a446..42c6d6b023 100644
--- a/lib/member/rte_member_sketch_avx512.c
+++ b/lib/member/rte_member_sketch_avx512.c
@@ -28,8 +28,8 @@  sketch_update_avx512(const struct rte_member_setsum *ss,
 	v_row_base = _mm256_mullo_epi32(v_idx, v_col);
 	v_hash_result = _mm256_add_epi32(v_row_base, v_hash_result);
 
-	current_sketch =
-		_mm512_i32gather_epi64(v_hash_result, count_array, 8);
+	current_sketch = _mm512_i32gather_epi64
+				(v_hash_result, (void *)count_array, 8);
 	v_count = _mm512_set1_epi64(count);
 	updated_sketch = _mm512_add_epi64(current_sketch, v_count);
 	_mm512_i32scatter_epi64