From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 090E2606A329 for ; Tue, 1 Dec 2026 15:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=kvLJocoI Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3634402E3; Tue, 1 Dec 2026 16:16:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTPS id 212094027A for ; Tue, 1 Dec 2026 16:16:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796138207; x=1827674207; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MEpJnwKRrPORyRZ5fBG1ghXFwzLPhwKK9Y3110PLs7s=; b=kvLJocoIsG8dPdtCny5qOxXYXSYMZPaBAGhAJGyh0SHGcEAKwJ7SYXLS SObJXMBJJEDcUHSsn1NRC99ZYU0ZNZZI7pHqH+uICqkpEO4Op80Br3y45 Nf77dTWZlyYE6h13ka8DOWwrJon8atuMxZm7ZwWSMB//gVBozCmnSgE5U 9G4gp+M51ui57XT6171FY8FgNPdezfk//m/hXxREkKvx/Zyoex7PWqBKS NPUnzX0F85xx9FcSNj3HjEH383ond/aBoN8WFXF0dmVpO5mSB/yKCH7Ea P8LOIwdvHQVXkxptekiM6/GtIygaw997axZ4kOG8GqafdOMXkdsIlXgBj w==; X-CSE-ConnectionGUID: K+yMTaFxQ32Jo1syXWN6xQ== X-CSE-MsgGUID: xuC/QChJQkmSVdGhVFFKOg== X-IronPort-AV: E=McAfee;i="6800,10657,11983"; a="5023482" X-IronPort-AV: E=Sophos;i="6.27,245,1787036400"; d="scan'208";a="5023482" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 07:16:44 -0800 X-CSE-ConnectionGUID: NEl61Iw+QhW9kt4UzHnZ7Q== X-CSE-MsgGUID: +k6Tsne+SUSMx1ieHarCRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,245,1787036400"; d="scan'208";a="13749379" Received: from silpixa00401385.ir.intel.com ([10.20.224.226]) by fmviesa001.fm.intel.com with ESMTP; 01 Dec 2026 07:16:43 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 01/11] hash: improve build-time instruction set checks for thash Date: Tue, 1 Dec 2026 15:16:13 +0000 Message-ID: <20261201151623.2240031-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201151623.2240031-1-bruce.richardson@intel.com> References: <20261201151623.2240031-1-bruce.richardson@intel.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 --- 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