net/zxdh: remove redundant log prefix
Checks
Commit Message
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(-)
Comments
Hi, David,
Sorry, my negligence caused this issue.
Thank you for helping with the modifications.
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.
@@ -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 */