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 2A8D2606A31C for ; Sun, 29 Nov 2026 20:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=gdyVva2W Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE52440664; Sun, 29 Nov 2026 21:50:19 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTPS id 3033340664 for ; Sun, 29 Nov 2026 21:50:16 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-3ae1da332bcso4724659a91.2 for ; Sun, 29 Nov 2026 12:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1795985414; x=1796590214; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IeuBaMpgV42MjT1p0W9dor7z9JUTMC6jxNHrTdpB50Q=; b=gdyVva2Wl9xchXYds54G8mMQp3eSOHXgRpe/vk/HraJG0NQR01f+64fPtWavZkAsjb VPi0o5u28Wx+JU86+up22KTr2oGHH8tTNzLULr7aNYmLYXqWB66jzFIvW4zDqE0sc7iS ae7Qehkl/PVYGKtG/k7HEA8iMKK5stqdzP4FD0AkIFi2kC8KB0ma2N24OBDFqryBVorc N5kRcFyjlOYqc+shW153SMtyPdnMDDsgpAv/YyU0DIsDfRFmNqPtabVGa0eusshIbdYf yJoTG4fAW+uUgRZxs9Anw/ABEbOCjaQKSpA9pbnCtJ+6ZfdP44mNwNB5xBqhqan5WMO/ A5lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795985414; x=1796590214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=IeuBaMpgV42MjT1p0W9dor7z9JUTMC6jxNHrTdpB50Q=; b=V3W8hBQzIV+7NStU7kVWOTvFJrw5VR94WZBifFGnTsTYgyB2Z9399GVbLtYs1ibjnN Qiw7fN7N4FopcYQbKVCWOCkV6yb9FejYUSYSxZEftOSl0JymeZV6kowDs/5JH2smmawK HuDszkb+ADQNdVRbeOWXE/BNR1OrB9uBscJ8fRSjxLSRQuhLv3gsLVJWqPUINpCRI7lw BJHUGIX+m7OpUH2KXY3jJkfbdfvZ5lI/ekkrmENp+A1G9Z+x9ZG+ESjJRgNI6ZyJUmPg Tl2dRIWPvERe8ogFnfn3pUPmRRPnlSDsEOTT0TwtTJAcfRrq0ezJMdlyU+x1/zaYHPOZ gmHw== X-Gm-Message-State: APuU4Z8KwZpuqE6yTMeb0lfTCn7N52H9clGyCwOVrzNBtfrU5SYA7EFz L13FUSPrgklAbkYvTehZbzcovVJs59W3NgXMlA7UjldZeMR5Qvorz5UHNpADQv1u6cFfkSxdTVU H2IM3Ojo= X-Gm-Gg: AZFdTZdGuAwxTiTLMpXmHTuJOVi5M8w4DSEEN8IdEjA011kqRb9TxmhFg23+Kh/R3V0 ewh5euqqVF1cgs1hZZCfgqwovBwH2zNNQITNRn+DLbBHRuYAitvq3c+PrLlsOxmNVEwLzbCNYS1 kKIT79Z9yfgXN5RRM6AWN/l5/aJJrWh3K2PKLI1Hr9zvfPSTQOr1rFp2QrSQUZZQRh5ZBbbtlDi UmVN1KiMoX5gxaKaTtv6Gq8r3zKqrZaDWYA28J5NlMRH2/WQ8Ho2Ehqb3i8SVcGzhQaaLXx3AEN fuaClBKkrzK7Z7klo6Gk7h6pdsTH0eQUNFaduJR1c5Vrk6l7OsE0MN6z1jCIoIwafqex775xLC0 eQADOIzobTFnQ5BE8QBnOrLQHgBivyuRCcW2h54khzb0EMwVlbAL/ROD7BS+ZEpWyf0hUV6mM/d GXhe8KztNTI+e/T8uT5A9RVSlJY2grtpKVUydLDVeEtrSnXt5cu5B8/Aq4kOIcqDTT0TLIOR+vn vRfi/H0+F5U3zAYKd2gfSbo0DcwbHy4WckR4/XfeZtr/2jgWEhtq54N+T9G97tJypZ+mb62OcAp GBevCW9sYPdJvSL7q8+R1c2dKyJIysxCnqANU78O6HuDdLL6iGCwPfGkEIwDaLuOxVIn X-Received: by 2002:a17:90b:3d92:b0:3b3:b621:4026 with SMTP id 98e67ed59e1d1-3b41c55a4aemr31004816a91.0.1795985414604; Sun, 29 Nov 2026 12:50:14 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b50234fb25sm10383968a91.2.2026.11.29.12.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 12:50:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin Subject: [PATCH 04/45] hash: do not export internal toeplitz helper Date: Sun, 29 Nov 2026 12:48:49 -0800 Message-ID: <20261129205006.1440292-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261129205006.1440292-1-stephen@networkplumber.org> References: <20261129205006.1440292-1-stephen@networkplumber.org> 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 thash_get_rand_poly() is only called from rte_thash.c when initializing an LFSR. No driver or application outside the hash library uses it, so it does not need an internal export. Signed-off-by: Stephen Hemminger --- lib/hash/rte_thash.c | 1 + lib/hash/rte_thash.h | 13 ------------- lib/hash/rte_thash_gf2_poly_math.c | 2 +- lib/hash/thash_private.h | 16 ++++++++++++++++ 4 files changed, 18 insertions(+), 14 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..12f71d4cde 100644 --- a/lib/hash/rte_thash.c +++ b/lib/hash/rte_thash.c @@ -15,6 +15,7 @@ #include #include #include +#include "thash_private.h" RTE_LOG_REGISTER_SUFFIX(thash_logtype, thash, INFO); #define RTE_LOGTYPE_HASH thash_logtype 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..c8f610d84d 100644 --- a/lib/hash/rte_thash_gf2_poly_math.c +++ b/lib/hash/rte_thash_gf2_poly_math.c @@ -8,6 +8,7 @@ #include #include #include +#include "thash_private.h" #define MAX_POLY_DEGREE 32 #define MAX_TOEPLITZ_KEY_LENGTH 64 @@ -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..ea7bc69a46 --- /dev/null +++ b/lib/hash/thash_private.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Stephen Hemminger + */ + +#ifndef _THASH_PRIVATE_H_ +#define _THASH_PRIVATE_H_ + +#include + +/** + * @internal + * Generate a random polynomial of the given degree. + */ +uint32_t thash_get_rand_poly(uint32_t poly_degree); + +#endif /* _THASH_PRIVATE_H_ */ -- 2.53.0