From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Yipeng Wang <yipeng1.wang@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: [PATCH 18/18] hash: convert RTE_LOGTYPE_HASH to dynamic type
Date: Mon, 4 Dec 2023 18:09:56 -0800 [thread overview]
Message-ID: <20231205021330.260017-19-stephen@networkplumber.org> (raw)
In-Reply-To: <20231205021330.260017-1-stephen@networkplumber.org>
Use dynamic type for hash and add subtypes for crc and gfni.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/hash/rte_cuckoo_hash.c | 5 +++++
lib/hash/rte_fbk_hash.c | 5 +++++
lib/hash/rte_thash.c | 3 +++
lib/hash/rte_thash_gfni.c | 3 +++
lib/log/log.c | 1 -
lib/log/rte_log.h | 2 +-
6 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index ccdc3b989489..8e4364f060a3 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -24,6 +24,11 @@
#include <rte_tailq.h>
#include "rte_hash.h"
+
+/* needs to be before rte_cuckoo_hash.h */
+RTE_LOG_REGISTER_DEFAULT(hash_logtype, INFO);
+#define RTE_LOGTYPE_HASH hash_logtype
+
#include "rte_cuckoo_hash.h"
/* Mask of all flags supported by this version */
diff --git a/lib/hash/rte_fbk_hash.c b/lib/hash/rte_fbk_hash.c
index 538b23a4030a..b4c4c191abdc 100644
--- a/lib/hash/rte_fbk_hash.c
+++ b/lib/hash/rte_fbk_hash.c
@@ -8,6 +8,8 @@
#include <errno.h>
#include <sys/queue.h>
+
+#include <rte_cpuflags.h>
#include <rte_eal_memconfig.h>
#include <rte_malloc.h>
#include <rte_common.h>
@@ -18,6 +20,9 @@
#include "rte_fbk_hash.h"
+RTE_LOG_REGISTER_SUFFIX(fbk_hash_logtype, fbk, INFO);
+#define RTE_LOGTYPE_HASH fbk_hash_logtype
+
TAILQ_HEAD(rte_fbk_hash_list, rte_tailq_entry);
static struct rte_tailq_elem rte_fbk_hash_tailq = {
diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index 4ff567ee5adf..d819dddd84f4 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -13,6 +13,9 @@
#include <rte_log.h>
#include <rte_malloc.h>
+RTE_LOG_REGISTER_SUFFIX(thash_logtype, thash, INFO);
+#define RTE_LOGTYPE_HASH thash_logtype
+
#define THASH_NAME_LEN 64
#define TOEPLITZ_HASH_LEN 32
diff --git a/lib/hash/rte_thash_gfni.c b/lib/hash/rte_thash_gfni.c
index eb334185725c..35206d575153 100644
--- a/lib/hash/rte_thash_gfni.c
+++ b/lib/hash/rte_thash_gfni.c
@@ -10,6 +10,9 @@
#ifndef RTE_THASH_GFNI_DEFINED
+RTE_LOG_REGISTER_SUFFIX(hash_gfni_logtype, gfni, INFO);
+#define RTE_LOGTYPE_HASH hash_gfni_logtype
+
uint32_t
rte_thash_gfni(const uint64_t *mtrx __rte_unused,
const uint8_t *key __rte_unused, int len __rte_unused)
diff --git a/lib/log/log.c b/lib/log/log.c
index 56877d42e6b9..e3cd4cff0fbc 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -353,7 +353,6 @@ struct logtype {
static const struct logtype logtype_strings[] = {
{RTE_LOGTYPE_EAL, "lib.eal"},
{RTE_LOGTYPE_PMD, "pmd"},
- {RTE_LOGTYPE_HASH, "lib.hash"},
{RTE_LOGTYPE_PORT, "lib.port"},
{RTE_LOGTYPE_TABLE, "lib.table"},
{RTE_LOGTYPE_PIPELINE, "lib.pipeline"},
diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h
index 189ad2bbd2cf..27fb6129a7aa 100644
--- a/lib/log/rte_log.h
+++ b/lib/log/rte_log.h
@@ -32,7 +32,7 @@ extern "C" {
/* was RTE_LOGTYPE_MEMPOOL */
/* was RTE_LOGTYPE_TIMER */
#define RTE_LOGTYPE_PMD 5 /**< Log related to poll mode driver. */
-#define RTE_LOGTYPE_HASH 6 /**< Log related to hash table. */
+ /* was RTE_LOGTYPE_HASH */
/* was RTE_LOGTYPE_LPM */
/* was RTE_LOGTYPE_KNI */
/* was RTE_LOGTYPE_ACL */
--
2.42.0
next prev parent reply other threads:[~2023-12-05 2:15 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 23:40 [PATCH v12 00/22] Covert static log types in libraries to dynamic Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 01/22] gso: don't log message on non TCP/UDP Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 02/22] eal: drop no longer used GSO logtype Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 03/22] log: drop unused RTE_LOGTYPE_TIMER Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 04/22] efd: convert RTE_LOGTYPE_EFD to dynamic type Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 05/22] mbuf: convert RTE_LOGTYPE_MBUF " Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 06/22] acl: convert RTE_LOGTYPE_ACL " Stephen Hemminger
2023-06-05 13:40 ` Константин Ананьев
2023-03-29 23:40 ` [PATCH v12 07/22] examples/power: replace use of RTE_LOGTYPE_POWER Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 08/22] examples/l3fwd-power: " Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 09/22] power: convert RTE_LOGTYPE_POWER to dynamic type Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 10/22] ring: convert RTE_LOGTYPE_RING " Stephen Hemminger
2023-06-05 13:41 ` Константин Ананьев
2023-03-29 23:40 ` [PATCH v12 11/22] mempool: convert RTE_LOGTYPE_MEMPOOL " Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 12/22] lpm: convert RTE_LOGTYPE_LPM to dynamic types Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 13/22] kni: convert RTE_LOGTYPE_KNI to dynamic type Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 14/22] sched: convert RTE_LOGTYPE_SCHED " Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 15/22] examples/ipsec-secgw: replace RTE_LOGTYPE_PORT Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 16/22] port: convert RTE_LOGTYPE_PORT to dynamic type Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 17/22] hash: move rte_thash_gfni stubs out of header file Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 18/22] hash: move rte_hash_set_alg out header Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 19/22] hash: convert RTE_LOGTYPE_HASH to dynamic type Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 20/22] table: convert RTE_LOGTYPE_TABLE " Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 21/22] app/test: remove use of RTE_LOGTYPE_PIPELINE Stephen Hemminger
2023-03-29 23:40 ` [PATCH v12 22/22] pipeline: convert RTE_LOGTYPE_PIPELINE to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 00/21] Convert static log types in libraries to dynamic types Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 01/21] gso: don't log message on non TCP/UDP Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 02/21] eal: drop no longer used GSO logtype Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 03/21] log: drop unused RTE_LOGTYPE_TIMER Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 04/21] efd: convert RTE_LOGTYPE_EFD to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 05/21] mbuf: convert RTE_LOGTYPE_MBUF " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 06/21] acl: convert RTE_LOGTYPE_ACL " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 07/21] examples/power: replace use of RTE_LOGTYPE_POWER Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 08/21] examples/l3fwd-power: " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 09/21] power: convert RTE_LOGTYPE_POWER to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 10/21] ring: convert RTE_LOGTYPE_RING " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 11/21] mempool: convert RTE_LOGTYPE_MEMPOOL " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 12/21] lpm: convert RTE_LOGTYPE_LPM to dynamic types Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 13/21] sched: convert RTE_LOGTYPE_SCHED to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 14/21] examples/ipsec-secgw: replace RTE_LOGTYPE_PORT Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 15/21] port: convert RTE_LOGTYPE_PORT to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 16/21] hash: move rte_thash_gfni stubs out of header file Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 17/21] hash: move rte_hash_set_alg out header Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 18/21] hash: convert RTE_LOGTYPE_HASH to dynamic type Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 19/21] table: convert RTE_LOGTYPE_TABLE " Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 20/21] app/test: remove use of RTE_LOGTYPE_PIPELINE Stephen Hemminger
2023-08-21 16:09 ` [PATCH v13 21/21] pipeline: convert RTE_LOGTYPE_PIPELINE to dynamic type Stephen Hemminger
2023-12-04 12:32 ` [PATCH v13 00/21] Convert static log types in libraries to dynamic types David Marchand
2023-12-05 2:09 ` [PATCH 00/18] Convert static log types in libraries to dynamic Stephen Hemminger
2023-12-05 2:09 ` [PATCH 01/18] gso: don't log message on non TCP/UDP Stephen Hemminger
2023-12-05 2:09 ` [PATCH 02/18] eal: drop no longer used GSO logtype Stephen Hemminger
2023-12-05 2:09 ` [PATCH 03/18] log: drop unused RTE_LOGTYPE_TIMER Stephen Hemminger
2023-12-05 2:09 ` [PATCH 04/18] efd: convert RTE_LOGTYPE_EFD to dynamic type Stephen Hemminger
2023-12-05 2:09 ` [PATCH 05/18] mbuf: convert RTE_LOGTYPE_MBUF " Stephen Hemminger
2023-12-05 2:09 ` [PATCH 06/18] acl: convert RTE_LOGTYPE_ACL " Stephen Hemminger
2023-12-05 2:09 ` [PATCH 07/18] examples/power: replace use of RTE_LOGTYPE_POWER Stephen Hemminger
2023-12-05 2:09 ` [PATCH 08/18] examples/l3fwd-power: " Stephen Hemminger
2023-12-05 2:09 ` [PATCH 09/18] power: convert RTE_LOGTYPE_POWER to dynamic type Stephen Hemminger
2023-12-05 2:09 ` [PATCH 10/18] ring: convert RTE_LOGTYPE_RING " Stephen Hemminger
2023-12-05 2:09 ` [PATCH 11/18] mempool: convert RTE_LOGTYPE_MEMPOOL " Stephen Hemminger
2023-12-05 2:09 ` [PATCH 12/18] lpm: convert RTE_LOGTYPE_LPM to dynamic types Stephen Hemminger
2023-12-05 2:09 ` [PATCH 13/18] sched: convert RTE_LOGTYPE_SCHED to dynamic type Stephen Hemminger
2023-12-05 2:09 ` [PATCH 14/18] examples/ipsec-secgw: replace RTE_LOGTYPE_PORT Stephen Hemminger
2023-12-05 2:09 ` [PATCH 15/18] app/test: remove use of RTE_LOGTYPE_PIPELINE Stephen Hemminger
2023-12-05 2:09 ` [PATCH 16/18] hash: mover rte_thash_gfni stubs out of header file Stephen Hemminger
2023-12-05 2:09 ` [PATCH 17/18] hash: move rte_hash_set_alg " Stephen Hemminger
2023-12-05 2:09 ` Stephen Hemminger [this message]
2023-12-06 10:08 ` [PATCH 00/18] Convert static log types in libraries to dynamic David Marchand
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=20231205021330.260017-19-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=sameh.gobriel@intel.com \
--cc=vladimir.medvedkin@intel.com \
--cc=yipeng1.wang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).