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 v12 22/22] pipeline: convert RTE_LOGTYPE_PIPELINE to dynamic type
Date: Wed, 29 Mar 2023 16:40:49 -0700	[thread overview]
Message-ID: <20230329234049.11071-23-stephen@networkplumber.org> (raw)
In-Reply-To: <20230329234049.11071-1-stephen@networkplumber.org>

Convert RTE_LOGTYPE_PIPELINE to a dynamic value.

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

diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c
index 6c2d9bfc1950..704924e822d0 100644
--- a/lib/eal/common/eal_common_log.c
+++ b/lib/eal/common/eal_common_log.c
@@ -350,7 +350,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_CRYPTODEV,  "lib.cryptodev"},
 	{RTE_LOGTYPE_EVENTDEV,   "lib.eventdev"},
 	{RTE_LOGTYPE_USER1,      "user1"},
diff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h
index 6418479ee266..29db07881a5a 100644
--- a/lib/eal/include/rte_log.h
+++ b/lib/eal/include/rte_log.h
@@ -41,7 +41,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 */
 #define RTE_LOGTYPE_CRYPTODEV 17 /**< Log related to cryptodev. */
 				 /* was RTE_LOGTYPE_EFD */
diff --git a/lib/pipeline/rte_pipeline.c b/lib/pipeline/rte_pipeline.c
index ff86c7cf96bf..3b9b083b390d 100644
--- a/lib/pipeline/rte_pipeline.c
+++ b/lib/pipeline/rte_pipeline.c
@@ -1612,3 +1612,5 @@ int rte_pipeline_table_stats_read(struct rte_pipeline *p, uint32_t table_id,
 
 	return 0;
 }
+
+RTE_LOG_REGISTER_DEFAULT(pipeline_logtype, INFO);
diff --git a/lib/pipeline/rte_pipeline.h b/lib/pipeline/rte_pipeline.h
index 3cfb6868f727..ebae08de644f 100644
--- a/lib/pipeline/rte_pipeline.h
+++ b/lib/pipeline/rte_pipeline.h
@@ -841,6 +841,11 @@ int rte_pipeline_ah_packet_hijack(struct rte_pipeline *p,
 int rte_pipeline_ah_packet_drop(struct rte_pipeline *p,
 	uint64_t pkts_mask);
 
+
+/** Internal Logtype used */
+extern int pipeline_logtype;
+#define RTE_LOGTYPE_PIPELINE pipeline_logtype
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.39.2


  parent reply	other threads:[~2023-03-29 23:43 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 ` Stephen Hemminger [this message]
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   ` [PATCH 18/18] hash: convert RTE_LOGTYPE_HASH to dynamic type Stephen Hemminger
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=20230329234049.11071-23-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).