DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Baum <michaelba@nvidia.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, viacheslavo@nvidia.com, matan@nvidia.com,
	rasland@nvidia.com, Asaf Penso <asafp@nvidia.com>
Subject: [dpdk-dev] [PATCH 1/2] common/mlx5: align driver name logs across pmds
Date: Mon, 15 Mar 2021 21:05:54 +0000	[thread overview]
Message-ID: <1615842355-10526-1-git-send-email-michaelba@nvidia.com> (raw)

From: Asaf Penso <asafp@nvidia.com>

Some mlx5 pmds define the log prefix as "mlx5_pmd" while others as
"pmd_mlx5".
The patch aligns all pmds to use the "mlx5_pmd" format.

Signed-off-by: Asaf Penso <asafp@nvidia.com>
---
 drivers/common/mlx5/mlx5_common.h       | 4 ----
 drivers/common/mlx5/mlx5_common_utils.h | 2 +-
 drivers/net/mlx5/mlx5_utils.h           | 4 +++-
 drivers/regex/mlx5/mlx5_regex_utils.h   | 2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
index 3855582..fc1ac75 100644
--- a/drivers/common/mlx5/mlx5_common.h
+++ b/drivers/common/mlx5/mlx5_common.h
@@ -65,10 +65,6 @@
 			RTE_FMT_HEAD(__VA_ARGS__,), \
 		RTE_FMT_TAIL(__VA_ARGS__,)))
 
-/*
- * When debugging is enabled (MLX5_DEBUG not defined), file, line and function
- * information replace the driver name (MLX5_DRIVER_NAME) in log messages.
- */
 #ifdef RTE_LIBRTE_MLX5_DEBUG
 
 #define PMD_DRV_LOG__(level, type, name, ...) \
diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h
index 32c3adf..6cba39c 100644
--- a/drivers/common/mlx5/mlx5_common_utils.h
+++ b/drivers/common/mlx5/mlx5_common_utils.h
@@ -10,7 +10,7 @@
 
 extern int mlx5_common_logtype;
 
-#define MLX5_COMMON_LOG_PREFIX "common_mlx5"
+#define MLX5_COMMON_LOG_PREFIX "mlx5_common"
 /* Generic printf()-like logging macro with automatic line feed. */
 #define DRV_LOG(level, ...) \
 	PMD_DRV_LOG_(level, mlx5_common_logtype, MLX5_COMMON_LOG_PREFIX, \
diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
index 7a62187..5088c95 100644
--- a/drivers/net/mlx5/mlx5_utils.h
+++ b/drivers/net/mlx5/mlx5_utils.h
@@ -29,9 +29,11 @@
 
 extern int mlx5_logtype;
 
+#define MLX5_NET_LOG_PREFIX "mlx5_net"
+
 /* Generic printf()-like logging macro with automatic line feed. */
 #define DRV_LOG(level, ...) \
-	PMD_DRV_LOG_(level, mlx5_logtype, MLX5_DRIVER_NAME, \
+	PMD_DRV_LOG_(level, mlx5_logtype, MLX5_NET_LOG_PREFIX, \
 		__VA_ARGS__ PMD_DRV_LOG_STRIP PMD_DRV_LOG_OPAREN, \
 		PMD_DRV_LOG_CPAREN)
 
diff --git a/drivers/regex/mlx5/mlx5_regex_utils.h b/drivers/regex/mlx5/mlx5_regex_utils.h
index adca846..104e794 100644
--- a/drivers/regex/mlx5/mlx5_regex_utils.h
+++ b/drivers/regex/mlx5/mlx5_regex_utils.h
@@ -9,7 +9,7 @@
 
 extern int mlx5_regex_logtype;
 
-#define MLX5_REGEX_LOG_PREFIX "regex_mlx5"
+#define MLX5_REGEX_LOG_PREFIX "mlx5_regex"
 /* Generic printf()-like logging macro with automatic line feed. */
 #define DRV_LOG(level, ...) \
 	PMD_DRV_LOG_(level, mlx5_regex_logtype, MLX5_REGEX_LOG_PREFIX, \
-- 
1.8.3.1


             reply	other threads:[~2021-03-15 21:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 21:05 Michael Baum [this message]
2021-03-15 21:05 ` [dpdk-dev] [PATCH 2/2] common/mlx5: rename driver name to include PCI notation Michael Baum
2021-03-30  7:36   ` Slava Ovsiienko
2021-03-30  7:35 ` [dpdk-dev] [PATCH 1/2] common/mlx5: align driver name logs across pmds Slava Ovsiienko
2021-04-01 11:30 ` Raslan Darawsheh

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=1615842355-10526-1-git-send-email-michaelba@nvidia.com \
    --to=michaelba@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.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).