From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [PATCH 1/3] port: convert to dynamic log type
Date: Fri, 22 Dec 2023 09:44:02 -0800 [thread overview]
Message-ID: <20231222174539.13431-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20231222174539.13431-1-stephen@networkplumber.org>
Replace static RTE_LOGTYPE_PORT with dynamic type.
Since there are several types of port do initialization
in a short standalone file.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/log/log.c | 1 -
lib/log/rte_log.h | 2 +-
lib/port/meson.build | 1 +
lib/port/port_log.h | 4 +++-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/log/log.c b/lib/log/log.c
index ab06132a98a1..853acaf07eb2 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_PORT, "lib.port"},
{RTE_LOGTYPE_TABLE, "lib.table"},
{RTE_LOGTYPE_PIPELINE, "lib.pipeline"},
{RTE_LOGTYPE_EVENTDEV, "lib.eventdev"},
diff --git a/lib/log/rte_log.h b/lib/log/rte_log.h
index 5ba198ba2484..5c73e689e8aa 100644
--- a/lib/log/rte_log.h
+++ b/lib/log/rte_log.h
@@ -40,7 +40,7 @@ extern "C" {
/* was RTE_LOGTYPE_POWER */
/* was RTE_LOGTYPE_METER */
/* was RTE_LOGTYPE_SCHED */
-#define RTE_LOGTYPE_PORT 13 /**< Log related to port. */
+ /* was RTE_LOGTYPE_PORT */
#define RTE_LOGTYPE_TABLE 14 /**< Log related to table. */
#define RTE_LOGTYPE_PIPELINE 15 /**< Log related to pipeline. */
/* was RTE_LOGTYPE_MBUF */
diff --git a/lib/port/meson.build b/lib/port/meson.build
index b0af2b185b39..b5977728723a 100644
--- a/lib/port/meson.build
+++ b/lib/port/meson.build
@@ -8,6 +8,7 @@ if is_windows
endif
sources = files(
+ 'port_log.c',
'rte_port_ethdev.c',
'rte_port_fd.c',
'rte_port_frag.c',
diff --git a/lib/port/port_log.h b/lib/port/port_log.h
index 99332a380323..28d75ee48b3b 100644
--- a/lib/port/port_log.h
+++ b/lib/port/port_log.h
@@ -4,6 +4,8 @@
#include <rte_log.h>
+extern int port_logtype;
+#define RTE_LOGTYPE_PORT port_logtype
+
#define PORT_LOG(level, ...) \
RTE_LOG_LINE(level, PORT, "" __VA_ARGS__)
-
--
2.43.0
next prev parent reply other threads:[~2023-12-22 17:45 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 ` Stephen Hemminger [this message]
2023-12-22 17:44 ` [PATCH 2/3] table: convert to dynamic logtype Stephen Hemminger
2023-12-22 17:44 ` [PATCH 3/3] pipeline: convert to a " Stephen Hemminger
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-2-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).