From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 03/11] hash: create library internal header file for thash
Date: Tue, 1 Dec 2026 15:16:15 +0000 [thread overview]
Message-ID: <20261201151623.2240031-4-bruce.richardson@intel.com> (raw)
In-Reply-To: <20261201151623.2240031-1-bruce.richardson@intel.com>
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 <bruce.richardson@intel.com>
---
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 <rte_malloc.h>
#include <rte_cpuflags.h>
+#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 <eal_export.h>
#include <rte_random.h>
#include <rte_common.h>
#include <rte_bitops.h>
@@ -9,6 +8,8 @@
#include <rte_thash.h>
#include <rte_log.h>
+#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 <stdint.h>
+
+/**
+ * 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
next prev parent reply other threads:[~2026-12-01 15:17 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 ` [PATCH 01/11] hash: improve build-time instruction set checks " Bruce Richardson
2026-12-01 15:16 ` [PATCH 02/11] test/thash_perf: test gfni thash when platform supports Bruce Richardson
2026-12-01 15:16 ` Bruce Richardson [this message]
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-4-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