From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 01/11] hash: improve build-time instruction set checks for thash
Date: Tue, 1 Dec 2026 15:16:13 +0000 [thread overview]
Message-ID: <20261201151623.2240031-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20261201151623.2240031-1-bruce.richardson@intel.com>
The GFNI thash implementation depends upon AVX-512 as well as the GFNI
instruction set. The instruction set checks at build-time checked for
AVX-512F and GFNI, but the actual AVX instructions used come from
AVX-512 subsets VBMI, VL and DQ which are not implied by AVX-512F. While
this is not a problem in practice, since systems with AVX-512F and GFNI
do have all necessary other instruction sets, for correctness, let's
make the checks more explicit, checking for sets which are not implied
by any others.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/hash/rte_thash_x86_gfni.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_thash_x86_gfni.h b/lib/hash/rte_thash_x86_gfni.h
index e5abdf2474..1a529d052a 100644
--- a/lib/hash/rte_thash_x86_gfni.h
+++ b/lib/hash/rte_thash_x86_gfni.h
@@ -19,7 +19,7 @@
extern "C" {
#endif
-#if defined(__GFNI__) && defined(__AVX512F__)
+#if defined(__GFNI__) && defined(__AVX512VBMI__) && defined(__AVX512DQ__) && defined(__AVX512VL__)
#define RTE_THASH_GFNI_DEFINED
#define RTE_THASH_FIRST_ITER_MSK 0x0f0f0f0f0f0e0c08
@@ -217,7 +217,7 @@ rte_thash_gfni_bulk(const uint64_t *mtrx, int len, uint8_t *tuple[],
}
}
-#endif /* __GFNI__ && __AVX512F__ */
+#endif /* GFNI and AVX512 support */
#ifdef __cplusplus
}
--
2.55.0
next prev parent reply other threads:[~2026-12-01 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 15:16 [PATCH 00/11] Add optimized path selection for thash Bruce Richardson
2026-12-01 15:16 ` Bruce Richardson [this message]
2026-12-01 15:16 ` [PATCH 02/11] test/thash_perf: test gfni thash when platform supports Bruce Richardson
2026-12-01 15:16 ` [PATCH 03/11] hash: create library internal header file for thash Bruce Richardson
2026-12-01 15:16 ` [PATCH 04/11] hash: add functions for GFNI RSS hash calculations Bruce Richardson
2026-12-01 15:16 ` [PATCH 05/11] hash: add fixed-size scalar " Bruce Richardson
2026-12-01 15:16 ` [PATCH 06/11] hash: add thash context struct for runtime path selection Bruce Richardson
2026-12-01 15:16 ` [PATCH 07/11] hash: implement IPv4 and IPv6 RSS hashing in SW Bruce Richardson
2026-12-01 15:16 ` [PATCH 08/11] hash: add explicit handling for RSS with split L3/L4 data Bruce Richardson
2026-12-01 15:16 ` [PATCH 09/11] test/thash: add perf tests for new RSS functions Bruce Richardson
2026-12-01 15:16 ` [PATCH 10/11] hash: remove extra store-load when performing RSS Bruce Richardson
2026-12-01 15:16 ` [PATCH 11/11] hash: add AVX2 RSS hash functions Bruce Richardson
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=20261201151623.2240031-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.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
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