[PATCH v2 08/12] net/ngbe: fix debug log
Jiawen Wu
jiawenwu at trustnetic.com
Wed Feb 9 11:42:09 CET 2022
Remove 'DEBUGFUNC' due to too many invalid debug log prints. And fix
that double line was added by using 'DEBUGOUT'.
Fixes: cc934df178ab ("net/ngbe: add log and error types")
Cc: stable at dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>
---
drivers/net/ngbe/ngbe_logs.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ngbe/ngbe_logs.h b/drivers/net/ngbe/ngbe_logs.h
index fd306419e6..b7d78fb400 100644
--- a/drivers/net/ngbe/ngbe_logs.h
+++ b/drivers/net/ngbe/ngbe_logs.h
@@ -15,9 +15,12 @@ extern int ngbe_logtype_init;
"%s(): " fmt "\n", __func__, ##args)
extern int ngbe_logtype_driver;
-#define PMD_DRV_LOG(level, fmt, args...) \
+#define PMD_TLOG_DRIVER(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, ngbe_logtype_driver, \
- "%s(): " fmt "\n", __func__, ##args)
+ "%s(): " fmt, __func__, ##args)
+
+#define PMD_DRV_LOG(level, fmt, args...) \
+ PMD_TLOG_DRIVER(level, fmt "\n", ## args)
#ifdef RTE_ETHDEV_DEBUG_RX
extern int ngbe_logtype_rx;
@@ -37,10 +40,10 @@ extern int ngbe_logtype_tx;
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#define TLOG_DEBUG(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
+#define TLOG_DEBUG(fmt, args...) PMD_TLOG_DRIVER(DEBUG, fmt, ##args)
#define DEBUGOUT(fmt, args...) TLOG_DEBUG(fmt, ##args)
#define PMD_INIT_FUNC_TRACE() TLOG_DEBUG(" >>")
-#define DEBUGFUNC(fmt) TLOG_DEBUG(fmt)
+#define DEBUGFUNC(fmt) do { } while (0)
#endif /* _NGBE_LOGS_H_ */
--
2.21.0.windows.1
More information about the stable
mailing list