DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: [PATCH v2] test: skip hash tests from other CPU
Date: Fri,  5 Dec 2025 13:36:46 -0800	[thread overview]
Message-ID: <20251205213646.293166-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20251205002536.192437-1-stephen@networkplumber.org>

When running hash tests there are lots of warnings about
unsupported CRC32 algorithm requested. This because on x86
it is requesting ARM algorithm and vice/versa. The fallback
is already tested elsewhere, so can be skipped.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/test_hash.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 5791fd7f4c..35684b3849 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -191,6 +191,7 @@ static struct rte_hash_parameters ut_params = {
 static int
 test_crc32_hash_alg_equiv(void)
 {
+#if defined(RTE_ARCH_ARM64) || defined(RTE_ARCH_X86)
 	uint32_t hash_val;
 	uint32_t init_val;
 	uint64_t data64[CRC32_DWORDS];
@@ -211,6 +212,7 @@ test_crc32_hash_alg_equiv(void)
 		rte_hash_crc_set_alg(CRC32_SW);
 		hash_val = rte_hash_crc(data64, data_len, init_val);
 
+#ifdef RTE_ARCH_X86
 		/* Check against 4-byte-operand sse4.2 CRC32 if available */
 		rte_hash_crc_set_alg(CRC32_SSE42);
 		if (hash_val != rte_hash_crc(data64, data_len, init_val)) {
@@ -224,13 +226,14 @@ test_crc32_hash_alg_equiv(void)
 			printf("Failed checking CRC32_SW against CRC32_SSE42_x64\n");
 			break;
 		}
-
+#elif defined(RTE_ARCH_ARM64)
 		/* Check against 8-byte-operand ARM64 CRC32 if available */
 		rte_hash_crc_set_alg(CRC32_ARM64);
 		if (hash_val != rte_hash_crc(data64, data_len, init_val)) {
 			printf("Failed checking CRC32_SW against CRC32_ARM64\n");
 			break;
 		}
+#endif
 	}
 
 	/* Resetting to best available algorithm */
@@ -245,6 +248,10 @@ test_crc32_hash_alg_equiv(void)
 				((j+1) % 16 == 0 || j == data_len - 1) ? '\n' : ' ');
 
 	return -1;
+#else
+	/* No alternate algorithms on this platform */
+	return 0;
+#endif
 }
 
 /*
-- 
2.51.0


      reply	other threads:[~2025-12-05 21:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05  0:25 [PATCH] " Stephen Hemminger
2025-12-05 21:36 ` Stephen Hemminger [this message]

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=20251205213646.293166-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sameh.gobriel@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    --cc=yipeng1.wang@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).