DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
To: dev@dpdk.org
Cc: alialnu@mellanox.com, david.marchand@redhat.com,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: [dpdk-dev] [PATCH] acl: fix build failure with gcc 5.4.0
Date: Thu, 15 Oct 2020 12:53:56 +0100
Message-ID: <20201015115356.28171-1-konstantin.ananyev@intel.com> (raw)

gcc 5.4 fails with:
../lib/librte_acl/acl_run_avx512x8.h: In function 'match_process_avx512x8':
../lib/librte_acl/acl_run_avx512x8.h:382:31: error:
pointer targets in passing argument 1 of '_mm256_mask_i32scatter_epi32'
differ in signedness [-Werror=pointer-sign]

Later gcc versions work fine, as for them parameter type was
changed to 'void *'.
Fixed by applying explicit cast for offending argument.

Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_acl/acl_run_avx512_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
index 1baf79b7a..fafaf591e 100644
--- a/lib/librte_acl/acl_run_avx512_common.h
+++ b/lib/librte_acl/acl_run_avx512_common.h
@@ -246,8 +246,8 @@ _F_(match_process)(struct acl_flow_avx512 *flow, uint32_t *fmsk,
 	tr_hi[0] = _M_I_(mask_mov_epi32)(tr_hi[0], rmsk[0], _SV_(trhi_idle));
 
 	/* save found match indexes */
-	_M_I_(mask_i32scatter_epi32)(flow->matches, rmsk[0], idx[0], res,
-			sizeof(flow->matches[0]));
+	_M_I_(mask_i32scatter_epi32)((void *)flow->matches, rmsk[0], idx[0],
+			res, sizeof(flow->matches[0]));
 
 	/* update masks and start new flows for matches */
 	n = update_flow_mask(flow, fmsk, rmsk);
-- 
2.25.1


             reply	other threads:[~2020-10-15 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 11:53 Konstantin Ananyev [this message]
2020-10-15 12:28 ` Ali Alnubani
2020-10-15 12:55 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201015115356.28171-1-konstantin.ananyev@intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=alialnu@mellanox.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git