* [PATCH] net/zxdh: remove redundant log prefix
@ 2024-11-06 9:08 David Marchand
2024-11-06 9:41 ` Junlong Wang
2024-11-06 10:29 ` [PATCH] " Ferruh Yigit
0 siblings, 2 replies; 3+ messages in thread
From: David Marchand @ 2024-11-06 9:08 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, Junlong Wang, Lijie Shan
By using RTE_LOG*() macros, the log messages are prefixed by the logtype.
RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "zxdh rx %s(): ", ...
will emit messages like "ZXDH_RX: zxdh rx %s(): ...\n"
There is no need to add a prefix repeating the same information.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Note: this is not a big issue, but can this be squashed in relevant
commit in next-net before reaching main? Thanks.
---
drivers/net/zxdh/zxdh_logs.h | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/net/zxdh/zxdh_logs.h b/drivers/net/zxdh/zxdh_logs.h
index 53838e313b..ad864a2089 100644
--- a/drivers/net/zxdh/zxdh_logs.h
+++ b/drivers/net/zxdh/zxdh_logs.h
@@ -10,25 +10,21 @@
extern int zxdh_logtype_driver;
#define RTE_LOGTYPE_ZXDH_DRIVER zxdh_logtype_driver
#define PMD_DRV_LOG(level, ...) \
- RTE_LOG_LINE_PREFIX(level, ZXDH_DRIVER, "zxdh %s(): ", \
- __func__, __VA_ARGS__)
+ RTE_LOG_LINE_PREFIX(level, ZXDH_DRIVER, "%s(): ", __func__, __VA_ARGS__)
extern int zxdh_logtype_rx;
#define RTE_LOGTYPE_ZXDH_RX zxdh_logtype_rx
#define PMD_RX_LOG(level, ...) \
- RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "zxdh rx %s(): ", \
- __func__, __VA_ARGS__)
+ RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "%s(): ", __func__, __VA_ARGS__)
extern int zxdh_logtype_tx;
#define RTE_LOGTYPE_ZXDH_TX zxdh_logtype_tx
#define PMD_TX_LOG(level, ...) \
- RTE_LOG_LINE_PREFIX(level, ZXDH_TX, "zxdh tx %s(): ", \
- __func__, __VA_ARGS__)
+ RTE_LOG_LINE_PREFIX(level, ZXDH_TX, "%s(): ", __func__, __VA_ARGS__)
extern int zxdh_logtype_msg;
#define RTE_LOGTYPE_ZXDH_MSG zxdh_logtype_msg
#define PMD_MSG_LOG(level, ...) \
- RTE_LOG_LINE_PREFIX(level, ZXDH_MSG, "zxdh msg %s(): ", \
- __func__, __VA_ARGS__)
+ RTE_LOG_LINE_PREFIX(level, ZXDH_MSG, "%s(): ", __func__, __VA_ARGS__)
#endif /* ZXDH_LOGS_H */
--
2.47.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: net/zxdh: remove redundant log prefix
2024-11-06 9:08 [PATCH] net/zxdh: remove redundant log prefix David Marchand
@ 2024-11-06 9:41 ` Junlong Wang
2024-11-06 10:29 ` [PATCH] " Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Junlong Wang @ 2024-11-06 9:41 UTC (permalink / raw)
To: david.marchand; +Cc: dev, ferruh.yigit, shan.lijie
[-- Attachment #1.1.1: Type: text/plain, Size: 106 bytes --]
Hi, David,
Sorry, my negligence caused this issue.
Thank you for helping with the modifications.
[-- Attachment #1.1.2: Type: text/html , Size: 214 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/zxdh: remove redundant log prefix
2024-11-06 9:08 [PATCH] net/zxdh: remove redundant log prefix David Marchand
2024-11-06 9:41 ` Junlong Wang
@ 2024-11-06 10:29 ` Ferruh Yigit
1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2024-11-06 10:29 UTC (permalink / raw)
To: David Marchand, dev; +Cc: Junlong Wang, Lijie Shan
On 11/6/2024 9:08 AM, David Marchand wrote:
> By using RTE_LOG*() macros, the log messages are prefixed by the logtype.
>
> RTE_LOG_LINE_PREFIX(level, ZXDH_RX, "zxdh rx %s(): ", ...
> will emit messages like "ZXDH_RX: zxdh rx %s(): ...\n"
>
> There is no need to add a prefix repeating the same information.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Note: this is not a big issue, but can this be squashed in relevant
> commit in next-net before reaching main? Thanks.
>
Squashed into relevant commit in next-net, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-06 10:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-06 9:08 [PATCH] net/zxdh: remove redundant log prefix David Marchand
2024-11-06 9:41 ` Junlong Wang
2024-11-06 10:29 ` [PATCH] " Ferruh Yigit
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).