DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Vijay Kumar Srivastava <vsrivast@xilinx.com>
Subject: [PATCH 05/11] drivers: reuse default logtype for SFC drivers
Date: Sat,  7 Sep 2024 16:54:25 +0200	[thread overview]
Message-ID: <20240907145433.1479091-6-david.marchand@redhat.com> (raw)
In-Reply-To: <20240907145433.1479091-1-david.marchand@redhat.com>

Nothing is fixed here, just reuse the value coming from the build
framework rather than use a fixed string that may get wrong in the
future.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/sfc/sfc_log.h       | 7 ++-----
 drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index 10a9ce6ced..b92b358927 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -13,9 +13,6 @@
 /** Generic driver log type */
 extern int sfc_logtype_driver;
 
-/** Common log type name prefix */
-#define SFC_LOGTYPE_PREFIX	"pmd.net.sfc."
-
 /** Log PMD generic message, add a prefix and a line break */
 #define SFC_GENERIC_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, sfc_logtype_driver,			\
@@ -23,10 +20,10 @@ extern int sfc_logtype_driver;
 			RTE_FMT_TAIL(__VA_ARGS__ ,)))
 
 /** Name prefix for the per-device log type used to report basic information */
-#define SFC_LOGTYPE_MAIN_STR	SFC_LOGTYPE_PREFIX "main"
+#define SFC_LOGTYPE_MAIN_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
 
 /** Device MCDI log type name prefix */
-#define SFC_LOGTYPE_MCDI_STR	SFC_LOGTYPE_PREFIX "mcdi"
+#define SFC_LOGTYPE_MCDI_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
 
 #define SFC_LOG_PREFIX_MAX	32
 
diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h
index 6c0101dbb4..1104e7de43 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_log.h
+++ b/drivers/vdpa/sfc/sfc_vdpa_log.h
@@ -8,9 +8,6 @@
 /** Generic driver log type */
 extern int sfc_vdpa_logtype_driver;
 
-/** Common log type name prefix */
-#define SFC_VDPA_LOGTYPE_PREFIX	"pmd.vdpa.sfc."
-
 /** Log PMD generic message, add a prefix and a line break */
 #define SFC_VDPA_GENERIC_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver,		\
@@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver;
 			RTE_FMT_TAIL(__VA_ARGS__ ,)))
 
 /** Name prefix for the per-device log type used to report basic information */
-#define SFC_VDPA_LOGTYPE_MAIN_STR	SFC_VDPA_LOGTYPE_PREFIX "main"
+#define SFC_VDPA_LOGTYPE_MAIN_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
 
 /** Device MCDI log type name prefix */
-#define SFC_VDPA_LOGTYPE_MCDI_STR	SFC_VDPA_LOGTYPE_PREFIX "mcdi"
+#define SFC_VDPA_LOGTYPE_MCDI_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
 
 #define SFC_VDPA_LOG_PREFIX_MAX	32
 
-- 
2.46.0


  parent reply	other threads:[~2024-09-07 14:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
2024-09-07 14:54 ` [PATCH 02/11] devtools: report all warnings in forbidden token check David Marchand
2024-09-07 14:54 ` [PATCH 03/11] net/dpaa: remove broken debug macros David Marchand
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
2024-09-08  8:35   ` Andrew Rybchenko
2024-09-07 14:54 ` David Marchand [this message]
2024-09-08  8:44   ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 06/11] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
2024-09-09  6:18   ` Jiawen Wu
2024-09-09  6:50     ` David Marchand
2024-09-09  7:23       ` Jiawen Wu
2024-09-07 14:54 ` [PATCH 08/11] drivers: replace logging helpers David Marchand
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
2024-09-09  1:09   ` fengchengwen
2024-09-07 14:54 ` [PATCH 10/11] drivers: split multilines log messages David Marchand
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-08  8:55   ` Andrew Rybchenko
2024-09-09  6:55     ` David Marchand
2024-09-09  7:23       ` Andrew Rybchenko
2024-09-09  1:19   ` fengchengwen
2024-09-10 10:56   ` David Marchand
2024-09-12  8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
2024-09-12 13:54     ` Thomas Monjalon
2024-09-12  8:26   ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
2024-09-12 14:10     ` Thomas Monjalon
2024-09-12  8:26   ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
2024-09-12  8:26   ` [PATCH v2 04/14] net/sfc: fix driver logtype token David Marchand
2024-09-12  8:26   ` [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 07/14] net/txgbe: move wrapper to base driver David Marchand
2024-09-12  8:26   ` [PATCH v2 08/14] event/dlb2: fix base driver logs David Marchand
2024-09-12  8:26   ` [PATCH v2 09/14] event/dsw: use a dynamic logtype David Marchand
2024-09-12  8:26   ` [PATCH v2 10/14] drivers: replace logging helpers David Marchand
2024-09-12  8:26   ` [PATCH v2 11/14] drivers: remove redundant newline from logs David Marchand
2024-09-12  8:26   ` [PATCH v2 12/14] drivers: split multilines log messages David Marchand
2024-09-12  8:26   ` [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable David Marchand
2024-09-12  8:26   ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
2024-09-16  9:32   ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-16 15:13   ` Patrick Robb

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=20240907145433.1479091-6-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=vsrivast@xilinx.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).