DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/7] net/qede: reduce noise in debug logs
@ 2016-12-03  2:43 Harish Patil
  2016-12-03  2:43 ` [dpdk-dev] [PATCH 2/7] net/qede: refactor filtering code Harish Patil
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Harish Patil @ 2016-12-03  2:43 UTC (permalink / raw)
  To: dev; +Cc: Dept-EngDPDKDev, Rasesh Mody, Harish Patil

From: Rasesh Mody <Rasesh.Mody@cavium.com>

Replace CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER with
CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL which is a 32-bit bitmapped value
where each bit represent a particular submodule to debug. Also move
notice messages under CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <Rasesh.Mody@cavium.com>
---
 config/common_base             |  2 +-
 doc/guides/nics/qede.rst       |  4 ++--
 drivers/net/qede/qede_ethdev.c |  4 ++--
 drivers/net/qede/qede_logs.h   | 21 +++++----------------
 4 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/config/common_base b/config/common_base
index 4bff83a..2ffd557 100644
--- a/config/common_base
+++ b/config/common_base
@@ -320,7 +320,7 @@ CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
 CONFIG_RTE_LIBRTE_QEDE_PMD=y
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n
-CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n
+CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL=0
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
 #Provides abs path/name of the firmware file.
diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index d22ecdd..ddf4248 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -103,9 +103,9 @@ enabling debugging options may affect system performance.
 
   Toggle display of generic debugging messages.
 
-- ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER`` (default **n**)
+- ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_VAL`` (default **0**)
 
-  Toggle display of ecore related messages.
+  Control driver debug verbosity using 32-bit bitmap flags.
 
 - ``CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX`` (default **n**)
 
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2c600c1..69cedd8 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1393,8 +1393,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	uint8_t is_mac_forced;
 	bool is_mac_exist;
 	/* Fix up ecore debug level */
-	uint32_t dp_module = ~0 & ~ECORE_MSG_HW;
-	uint8_t dp_level = ECORE_LEVEL_VERBOSE;
+	uint32_t dp_module = RTE_LIBRTE_QEDE_DEBUG_VAL;
+	uint8_t dp_level = ECORE_LEVEL_NOTICE;
 	uint32_t max_mac_addrs;
 	int rc;
 
diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h
index 45c4af0..08fdf04 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,10 +36,8 @@
 		##__VA_ARGS__)
 #else
 #define DP_INFO(p_dev, fmt, ...) do { } while (0)
-
 #endif
 
-#ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
 #define DP_VERBOSE(p_dev, module, fmt, ...) \
 do { \
 	if ((p_dev)->dp_module & module) \
@@ -46,9 +47,7 @@
 		      (p_dev)->name ? (p_dev)->name : "", \
 		      ##__VA_ARGS__); \
 } while (0)
-#else
-#define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
-#endif
+
 
 #define PMD_INIT_LOG(level, edev, fmt, args...)	\
 	rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
@@ -77,14 +76,4 @@
 #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)
-
 #endif /* _QEDE_LOGS_H_ */
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2016-12-23 15:25 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03  2:43 [dpdk-dev] [PATCH 1/7] net/qede: reduce noise in debug logs Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 2/7] net/qede: refactor filtering code Harish Patil
2016-12-08 16:45   ` Ferruh Yigit
2016-12-12 17:36     ` Harish Patil
2016-12-12 17:53       ` Ferruh Yigit
2016-12-20 23:12         ` Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 3/7] net/qede: add slowpath support for VXLAN tunneling Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 4/7] net/qede: add fastpath " Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 5/7] net/qede: fix RSS related issue Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 6/7] net/qede: fix maximum VF count to 0 Harish Patil
2016-12-08 16:45   ` Ferruh Yigit
2016-12-12 17:47     ` Harish Patil
2016-12-12 18:13       ` Ferruh Yigit
2016-12-19 13:38         ` Thomas Monjalon
2016-12-20 23:15           ` Harish Patil
2016-12-03  2:43 ` [dpdk-dev] [PATCH 7/7] net/qede: restrict maximum queues for PF/VF Harish Patil
2016-12-08 16:45   ` Ferruh Yigit
2016-12-12 19:29     ` Harish Patil
2016-12-12 20:10       ` Ferruh Yigit
2016-12-20 23:16         ` Harish Patil
2016-12-08 16:44 ` [dpdk-dev] [PATCH 1/7] net/qede: reduce noise in debug logs Ferruh Yigit
2016-12-12 17:15   ` Harish Patil
2016-12-12 17:50     ` Ferruh Yigit
2016-12-20 22:02       ` Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 " Harish Patil
2016-12-23 15:14     ` Ferruh Yigit
2016-12-23 15:25     ` Ferruh Yigit
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 2/7] net/qede: fix filtering code Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 3/7] net/qede: add slowpath support for VXLAN tunneling Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 4/7] net/qede: add fastpath " Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 5/7] net/qede: fix RSS related issue Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 6/7] net/qede: fix reporting of SR-IOV PF driver as disabled Harish Patil
2016-12-23  0:48   ` [dpdk-dev] [PATCH v2 7/7] net/qede: restrict maximum queues for PF/VF Harish Patil
2016-12-08 16:48 ` [dpdk-dev] [PATCH 1/7] net/qede: reduce noise in debug logs Ferruh Yigit
2016-12-20 23:29   ` Mody, Rasesh

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).