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 1849E606A31A for ; Tue, 1 Dec 2026 15:17:12 +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=lrIyM6zy Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BD9A4064C; Tue, 1 Dec 2026 16:16:50 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTPS id 72F11402D9 for ; Tue, 1 Dec 2026 16:16:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796138208; x=1827674208; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pdKweQ7F5qGCkjXUdEgKkTvMk9x7TI0grevtgHiNslM=; b=lrIyM6zyfNv7SKLs8AqeWDCWY6fD3sXRak6TogUEK4CpyYrZWSp8DMXd RwQucDQmtbFEf1gBVMTjk4X5WekVudMtnKAyx6+Yv4xbPl0/ppINWFFyA vd7Q9uIGFhX0pwsXoz3VLxfqCtV78lGozGG0aBg1/rQz2JarGZLo/mg6G rVVniTV1SGwmz9xzZn9eBEd/XKpRdHOrLRYFXkOM54zGCYSnK6loXUKTH xCh4HHDkCqSFhu0FMYABhmZrU1ubvfMviGY8bhAe/AM72/xHzDJhn8gzE CoNATLbrCaPX2/94uYRCaivDlC4I64j8p+7ceJnAIEkKIAchTqCqsjrzu A==; X-CSE-ConnectionGUID: wCMYTs4GRMKoutuD7Mm5eA== X-CSE-MsgGUID: FpSCKWvsTJG8H7TH2FQi7w== X-IronPort-AV: E=McAfee;i="6800,10657,11983"; a="5023486" X-IronPort-AV: E=Sophos;i="6.27,245,1787036400"; d="scan'208";a="5023486" 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:45 -0800 X-CSE-ConnectionGUID: w2TmzId9TJOoBdMmzWsNhA== X-CSE-MsgGUID: bs6w9NuVRRCUffcid1wRxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,245,1787036400"; d="scan'208";a="13749386" Received: from silpixa00401385.ir.intel.com ([10.20.224.226]) by fmviesa001.fm.intel.com with ESMTP; 01 Dec 2026 07:16:44 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 03/11] hash: create library internal header file for thash Date: Tue, 1 Dec 2026 15:16:15 +0000 Message-ID: <20261201151623.2240031-4-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 Create a private header file, internal to the library, to hold function prototypes and other content that is not to be exposed to applications. This is better than having the content marked as internal in public headers. Signed-off-by: Bruce Richardson --- lib/hash/rte_thash.c | 2 ++ lib/hash/rte_thash.h | 13 ------------- lib/hash/rte_thash_gf2_poly_math.c | 4 ++-- lib/hash/thash_private.h | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 lib/hash/thash_private.h diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c index fcd41248b9..dfbcb931d9 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -16,6 +16,8 @@ #include #include +#include "thash_private.h" + RTE_LOG_REGISTER_SUFFIX(thash_logtype, thash, INFO); #define RTE_LOGTYPE_HASH thash_logtype #define HASH_LOG(level, ...) \ diff --git a/lib/hash/rte_thash.h b/lib/hash/rte_thash.h index 8bca430663..98115081b1 100644 --- a/lib/hash/rte_thash.h +++ b/lib/hash/rte_thash.h @@ -100,19 +100,6 @@ union rte_thash_tuple { struct rte_ipv6_tuple v6; }; -/** @internal - * @brief Generates a random polynomial - * - * @param poly_degree - * degree of the polynomial - * - * @return - * random polynomial - */ -__rte_internal -uint32_t -thash_get_rand_poly(uint32_t poly_degree); - /** * Longest RSS hash key currently supported */ diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c index ddf4dd863b..286797a8d4 100644 --- a/lib/hash/rte_thash_gf2_poly_math.c +++ b/lib/hash/rte_thash_gf2_poly_math.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2024 Intel Corporation */ -#include #include #include #include @@ -9,6 +8,8 @@ #include #include +#include "thash_private.h" + #define MAX_POLY_DEGREE 32 #define MAX_TOEPLITZ_KEY_LENGTH 64 RTE_LOG_REGISTER_SUFFIX(thash_poly_logtype, thash_poly, INFO); @@ -242,7 +243,6 @@ thash_test_poly_order(uint32_t poly, int degree) return 0; } -RTE_EXPORT_INTERNAL_SYMBOL(thash_get_rand_poly) uint32_t thash_get_rand_poly(uint32_t poly_degree) { diff --git a/lib/hash/thash_private.h b/lib/hash/thash_private.h new file mode 100644 index 0000000000..ed13b605a3 --- /dev/null +++ b/lib/hash/thash_private.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2026 Intel Corporation + */ + +#ifndef THASH_PRIVATE_H +#define THASH_PRIVATE_H + +#include + +/** + * Get a random polynomial of the specified degree. + */ +uint32_t +thash_get_rand_poly(uint32_t poly_degree); + +#endif /* THASH_PRIVATE_H */ -- 2.55.0