DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [PATCH 3/3] pipeline: convert to a dynamic logtype
Date: Fri, 22 Dec 2023 09:44:04 -0800	[thread overview]
Message-ID: <20231222174539.13431-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20231222174539.13431-1-stephen@networkplumber.org>

Replace RTE_LOGTYPE_PIPELINE static type with a dynamic one.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/log/log.c               | 1 -
 lib/log/rte_log.h           | 2 +-
 lib/pipeline/rte_pipeline.c | 3 +++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/log/log.c b/lib/log/log.c
index 7ae798493e51..123510616455 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_PIPELINE,   "lib.pipeline"},
 	{RTE_LOGTYPE_EVENTDEV,   "lib.eventdev"},
 	{RTE_LOGTYPE_USER1,      "user1"},
 	{RTE_LOGTYPE_USER2,      "user2"},
diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h
index 6bfa66dc8986..5f28c3832de9 100644
--- a/lib/log/rte_log.h
+++ b/lib/log/rte_log.h
@@ -42,7 +42,7 @@ extern "C" {
 				 /* was RTE_LOGTYPE_SCHED */
 				 /* was RTE_LOGTYPE_PORT */
 				 /* was RTE_LOGTYPE_TABLE */
-#define RTE_LOGTYPE_PIPELINE  15 /**< Log related to pipeline. */
+				 /* was RTE_LOGTYPE_PIPELINE */
 				 /* was RTE_LOGTYPE_MBUF */
 				 /* was RTE_LOGTYPE_CRYPTODEV */
 				 /* was RTE_LOGTYPE_EFD */
diff --git a/lib/pipeline/rte_pipeline.c b/lib/pipeline/rte_pipeline.c
index b0aea4596daa..c9ed903d716b 100644
--- a/lib/pipeline/rte_pipeline.c
+++ b/lib/pipeline/rte_pipeline.c
@@ -12,6 +12,9 @@
 
 #include "rte_pipeline.h"
 
+RTE_LOG_REGISTER_DEFAULT(pipeline_logtype, INFO);
+#define RTE_LOGTYPE_PIPELINE pipeline_logtype
+
 #define PIPELINE_LOG(level, ...) \
 	RTE_LOG_LINE(level, PIPELINE, "" __VA_ARGS__)
 
-- 
2.43.0


  parent reply	other threads:[~2023-12-22 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22 17:44 [PATCH 0/3] Remove last library static logtypes Stephen Hemminger
2023-12-22 17:44 ` [PATCH 1/3] port: convert to dynamic log type Stephen Hemminger
2023-12-22 17:44 ` [PATCH 2/3] table: convert to dynamic logtype Stephen Hemminger
2023-12-22 17:44 ` Stephen Hemminger [this message]
2024-01-12 11:03 ` [PATCH 0/3] Remove last library static logtypes 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=20231222174539.13431-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=cristian.dumitrescu@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;
as well as URLs for NNTP newsgroup(s).