[dpdk-dev,v2,1/7] net/qede: reduce noise in debug logs

Message ID 1482454091-12819-1-git-send-email-harish.patil@qlogic.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Harish Patil Dec. 23, 2016, 12:48 a.m. UTC
  Move DP_NOTICE msg under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
 drivers/net/qede/qede_logs.h |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
  

Comments

Ferruh Yigit Dec. 23, 2016, 3:14 p.m. UTC | #1
On 12/23/2016 12:48 AM, Harish Patil wrote:
> Move DP_NOTICE msg under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.
> 
> Signed-off-by: Harish Patil <harish.patil@qlogic.com>
> ---

<...>

>  
> -#ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
> -#define PMD_DRV_LOG_RAW(level, fmt, args...) \
> -	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
> -#else
> -#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
> -#endif
> -
>  #define PMD_DRV_LOG(level, fmt, args...) \
>  	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)

This is now useless since PMD_DRV_LOG_RAW no more defined, I guess  this
doesn't give a compile error because PMD_DRV_LOG is not used at all in
the driver.
I think if PMD_DRV_LOG_RAW removed, PMD_DRV_LOG also should be removed.

>  
>
  
Ferruh Yigit Dec. 23, 2016, 3:25 p.m. UTC | #2
On 12/23/2016 12:48 AM, Harish Patil wrote:
> Move DP_NOTICE msg under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.
> 
> Signed-off-by: Harish Patil <harish.patil@qlogic.com>

Series applied to dpdk-next-net/master, thanks.

Removed PMD_DRV_LOG in first patch.
  

Patch

diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h
index 45c4af0..13b76a7 100644
--- a/drivers/net/qede/qede_logs.h
+++ b/drivers/net/qede/qede_logs.h
@@ -16,15 +16,18 @@ 
 		(p_dev)->name ? (p_dev)->name : "", \
 		##__VA_ARGS__)
 
+#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
 	rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
 		"[QEDE PMD: (%s)]%s:" fmt, \
 		(p_dev)->name ? (p_dev)->name : "", \
 		 __func__, \
 		##__VA_ARGS__)
+#else
+#define DP_NOTICE(p_dev, fmt, ...) do { } while (0)
+#endif
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
-
 #define DP_INFO(p_dev, fmt, ...) \
 	rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
 		"[%s:%d(%s)]" fmt, \
@@ -33,7 +36,6 @@ 
 		##__VA_ARGS__)
 #else
 #define DP_INFO(p_dev, fmt, ...) do { } while (0)
-
 #endif
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
@@ -77,13 +79,6 @@  do { \
 #define PMD_RX_LOG(level, q, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
-#define PMD_DRV_LOG_RAW(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
-#endif
-
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)