DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH 0/5] Dynamic logging
@ 2017-12-19 12:25 Pavan Nikhilesh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging Pavan Nikhilesh
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Implement dynamic logging for cavium specific thunder nicvf and octeontx
platforms.

Pavan Nikhilesh (5):
  net/thunderx: implement dynamic logging
  net/octeontx: implement dynamic logging
  mempool/octeontx: implement dynamic logging
  event/octeontx: implement dynamic logging
  doc: remove unused config options

 config/common_base                            | 10 -------
 config/defconfig_arm64-thunderx-linuxapp-gcc  |  1 -
 doc/guides/eventdevs/octeontx.rst             |  4 ---
 doc/guides/mempool/octeontx.rst               |  4 ---
 doc/guides/nics/octeontx.rst                  | 21 -------------
 doc/guides/nics/thunderx.rst                  | 16 ++--------
 drivers/event/octeontx/ssovf_evdev.c          | 11 +++++++
 drivers/event/octeontx/ssovf_evdev.h          | 25 +++++++---------
 drivers/mempool/octeontx/octeontx_fpavf.c     | 16 ++++++++++
 drivers/mempool/octeontx/octeontx_pool_logs.h | 41 ++++++++++---------------
 drivers/net/octeontx/octeontx_ethdev.c        | 21 +++++++++++++
 drivers/net/octeontx/octeontx_logs.h          | 42 ++++++++------------------
 drivers/net/thunderx/nicvf_ethdev.c           | 21 +++++++++++++
 drivers/net/thunderx/nicvf_logs.h             | 43 ++++++++++-----------------
 14 files changed, 126 insertions(+), 150 deletions(-)

--
2.14.1

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

* [dpdk-dev]  [PATCH 1/5] net/thunderx: implement dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
@ 2017-12-19 12:25 ` Pavan Nikhilesh
  2018-01-01  4:36   ` santosh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 2/5] net/octeontx: " Pavan Nikhilesh
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 config/common_base                  |  3 ---
 drivers/net/thunderx/nicvf_ethdev.c | 21 ++++++++++++++++++
 drivers/net/thunderx/nicvf_logs.h   | 43 ++++++++++++++-----------------------
 3 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/config/common_base b/config/common_base
index e74febef4..65d51d6da 100644
--- a/config/common_base
+++ b/config/common_base
@@ -310,11 +310,8 @@ CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0
 # Compile burst-oriented Cavium Thunderx NICVF PMD driver
 #
 CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=y
-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n
-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n
 
 #
 # Compile burst-oriented Cavium LiquidIO PMD driver
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d65d3cee7..9756b29d5 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -71,11 +71,32 @@
 #include "nicvf_svf.h"
 #include "nicvf_logs.h"
 
+int nicvf_logtype_mbox;
+int nicvf_logtype_init;
+int nicvf_logtype_driver;
+
 static void nicvf_dev_stop(struct rte_eth_dev *dev);
 static void nicvf_dev_stop_cleanup(struct rte_eth_dev *dev, bool cleanup);
 static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic,
 			  bool cleanup);
 
+RTE_INIT(nicvf_init_log);
+static void
+nicvf_init_log(void)
+{
+	nicvf_logtype_mbox = rte_log_register("pmd.nicvf.mbox");
+	if (nicvf_logtype_mbox >= 0)
+		rte_log_set_level(nicvf_logtype_mbox, RTE_LOG_NOTICE);
+
+	nicvf_logtype_init = rte_log_register("pmd.nicvf.init");
+	if (nicvf_logtype_init >= 0)
+		rte_log_set_level(nicvf_logtype_init, RTE_LOG_NOTICE);
+
+	nicvf_logtype_driver = rte_log_register("pmd.nicvf.driver");
+	if (nicvf_logtype_driver >= 0)
+		rte_log_set_level(nicvf_logtype_driver, RTE_LOG_NOTICE);
+}
+
 static inline int
 nicvf_atomic_write_link_status(struct rte_eth_dev *dev,
 			       struct rte_eth_link *link)
diff --git a/drivers/net/thunderx/nicvf_logs.h b/drivers/net/thunderx/nicvf_logs.h
index a76d1987e..aca67ebff 100644
--- a/drivers/net/thunderx/nicvf_logs.h
+++ b/drivers/net/thunderx/nicvf_logs.h
@@ -35,49 +35,38 @@
 
 #include <assert.h>
 
-#define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
-
-#ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT
-#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
-
 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #define NICVF_RX_ASSERT(x) assert(x)
 #else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
 #define NICVF_RX_ASSERT(x) do { } while (0)
 #endif
 
 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #define NICVF_TX_ASSERT(x) assert(x)
 #else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
 #define NICVF_TX_ASSERT(x) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER
+#define PMD_INIT_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, nicvf_logtype_init, \
+			"%s(): " fmt "\n", __func__, ## args)
+#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
+
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, nicvf_logtype_driver, \
+			"%s(): " fmt "\n", __func__, ## args)
 #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#define PMD_DRV_FUNC_TRACE() do { } while (0)
-#endif
 
-#ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX
 #define PMD_MBOX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, nicvf_logtype_mbox, \
+			"%s(): " fmt "\n", __func__, ## args)
 #define PMD_MBOX_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
-#else
-#define PMD_MBOX_LOG(level, fmt, args...) do { } while (0)
-#define PMD_MBOX_FUNC_TRACE() do { } while (0)
-#endif
+
+#define PMD_RX_LOG PMD_DRV_LOG
+#define PMD_TX_LOG PMD_DRV_LOG
+
+extern int nicvf_logtype_init;
+extern int nicvf_logtype_driver;
+extern int nicvf_logtype_mbox;
 
 #endif /* __THUNDERX_NICVF_LOGS__ */
-- 
2.14.1

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

* [dpdk-dev]  [PATCH 2/5] net/octeontx: implement dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging Pavan Nikhilesh
@ 2017-12-19 12:25 ` Pavan Nikhilesh
  2018-01-01  4:37   ` santosh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 3/5] mempool/octeontx: " Pavan Nikhilesh
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 config/common_base                     |  5 ----
 drivers/net/octeontx/octeontx_ethdev.c | 21 +++++++++++++++++
 drivers/net/octeontx/octeontx_logs.h   | 42 +++++++++++-----------------------
 3 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/config/common_base b/config/common_base
index 65d51d6da..fc6b6d157 100644
--- a/config/common_base
+++ b/config/common_base
@@ -333,11 +333,6 @@ CONFIG_RTE_LIBRTE_DPAA_PMD=n
 # Compile burst-oriented Cavium OCTEONTX network PMD driver
 #
 CONFIG_RTE_LIBRTE_OCTEONTX_PMD=y
-CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT=n
-CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX=n
-CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER=n
-CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX=n
 
 #
 # Compile NXP DPAA2 FSL-MC Bus
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index bd24ec330..a5f8451ab 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -65,6 +65,27 @@ enum octeontx_link_speed {
 	OCTEONTX_LINK_SPEED_RESERVE2
 };
 
+int otx_net_logtype_mbox;
+int otx_net_logtype_init;
+int otx_net_logtype_driver;
+
+RTE_INIT(otx_net_init_log);
+static void
+otx_net_init_log(void)
+{
+	otx_net_logtype_mbox = rte_log_register("pmd.otx.ethdev.mbox");
+	if (otx_net_logtype_mbox >= 0)
+		rte_log_set_level(otx_net_logtype_mbox, RTE_LOG_NOTICE);
+
+	otx_net_logtype_init = rte_log_register("pmd.otx.ethdev.init");
+	if (otx_net_logtype_init >= 0)
+		rte_log_set_level(otx_net_logtype_init, RTE_LOG_NOTICE);
+
+	otx_net_logtype_driver = rte_log_register("pmd.otx.ethdev.driver");
+	if (otx_net_logtype_driver >= 0)
+		rte_log_set_level(otx_net_logtype_driver, RTE_LOG_NOTICE);
+}
+
 /* Parse integer from integer argument */
 static int
 parse_integer_arg(const char *key __rte_unused,
diff --git a/drivers/net/octeontx/octeontx_logs.h b/drivers/net/octeontx/octeontx_logs.h
index d5da73311..533746d69 100644
--- a/drivers/net/octeontx/octeontx_logs.h
+++ b/drivers/net/octeontx/octeontx_logs.h
@@ -33,44 +33,28 @@
 #define __OCTEONTX_LOGS_H__
 
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, otx_net_logtype_init, \
+			"%s(): " fmt "\n", __func__, ## args)
 
-#ifdef RTE_LIBRTE_OCTEONTX_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
-#ifdef RTE_LIBRTE_OCTEONTX_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
-#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
-#endif
-
-#ifdef RTE_LIBRTE_OCTEONTX_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
-#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
-#endif
-
-#ifdef RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, otx_net_logtype_driver, \
+			"%s(): " fmt "\n", __func__, ## args)
 
-#ifdef RTE_LIBRTE_OCTEONTX_DEBUG_MBOX
 #define PMD_MBOX_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
-#else
-#define PMD_MBOX_LOG(level, fmt, args...) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, otx_net_logtype_mbox, \
+			"%s(): " fmt "\n", __func__, ## args)
 
 #define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__)
 #define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__)
 #define octeontx_mbox_log(s, ...) PMD_MBOX_LOG(DEBUG, s, ##__VA_ARGS__)
 
+#define PMD_RX_LOG	PMD_DRV_LOG
+#define PMD_TX_LOG	PMD_DRV_LOG
+
+extern int otx_net_logtype_init;
+extern int otx_net_logtype_driver;
+extern int otx_net_logtype_mbox;
+
 #endif /* __OCTEONTX_LOGS_H__*/
-- 
2.14.1

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

* [dpdk-dev] [PATCH 3/5] mempool/octeontx: implement dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging Pavan Nikhilesh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 2/5] net/octeontx: " Pavan Nikhilesh
@ 2017-12-19 12:25 ` Pavan Nikhilesh
  2018-01-01  4:39   ` santosh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 4/5] event/octeontx: " Pavan Nikhilesh
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 config/common_base                            |  1 -
 drivers/mempool/octeontx/octeontx_fpavf.c     | 16 +++++++++++
 drivers/mempool/octeontx/octeontx_pool_logs.h | 41 +++++++++++----------------
 3 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/config/common_base b/config/common_base
index fc6b6d157..b616ac3d1 100644
--- a/config/common_base
+++ b/config/common_base
@@ -607,7 +607,6 @@ CONFIG_RTE_DRIVER_MEMPOOL_STACK=y
 # Compile PMD for octeontx fpa mempool device
 #
 CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=y
-CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG=n
 
 #
 # Compile librte_mbuf
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 3bc50f35d..ec9a957d6 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -133,6 +133,22 @@ struct octeontx_fpadev {
 
 static struct octeontx_fpadev fpadev;
 
+int octeontx_logtype_fpavf;
+int octeontx_logtype_fpavf_mbox;
+
+RTE_INIT(otx_pool_init_log);
+static void
+otx_pool_init_log(void)
+{
+	octeontx_logtype_fpavf = rte_log_register("pmd.otx.mempool");
+	if (octeontx_logtype_fpavf >= 0)
+		rte_log_set_level(octeontx_logtype_fpavf, RTE_LOG_NOTICE);
+
+	octeontx_logtype_fpavf_mbox = rte_log_register("pmd.otx.mempool.mbox");
+	if (octeontx_logtype_fpavf_mbox >= 0)
+		rte_log_set_level(octeontx_logtype_fpavf_mbox, RTE_LOG_NOTICE);
+}
+
 /* lock is taken by caller */
 static int
 octeontx_fpa_gpool_alloc(unsigned int object_size)
diff --git a/drivers/mempool/octeontx/octeontx_pool_logs.h b/drivers/mempool/octeontx/octeontx_pool_logs.h
index 58ccb0f0e..170c13691 100644
--- a/drivers/mempool/octeontx/octeontx_pool_logs.h
+++ b/drivers/mempool/octeontx/octeontx_pool_logs.h
@@ -35,34 +35,25 @@
 
 #include <rte_debug.h>
 
-#ifdef RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG
-#define fpavf_log_info(fmt, args...) \
-	RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
-#define fpavf_log_dbg(fmt, args...) \
-	RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
+#define FPAVF_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf,\
+			"%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
 
-#define mbox_log_info(fmt, args...) \
-	RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
-#define mbox_log_dbg(fmt, args...) \
-	RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
-#else
-#define fpavf_log_info(fmt, args...)
-#define fpavf_log_dbg(fmt, args...)
-#define mbox_log_info(fmt, args...)
-#define mbox_log_dbg(fmt, args...)
-#endif
+#define MBOX_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf_mbox,\
+			"%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
 
+#define fpavf_log_info(fmt, ...) FPAVF_LOG(INFO, fmt, ##__VA_ARGS__)
+#define fpavf_log_dbg(fmt, ...) FPAVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define fpavf_log_err(fmt, ...) FPAVF_LOG(ERR, fmt, ##__VA_ARGS__)
 #define fpavf_func_trace fpavf_log_dbg
-#define fpavf_log_err(fmt, args...) \
-	RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
+
+#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__)
+#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define mbox_log_err(fmt, ...) MBOX_LOG(ERR, fmt, ##__VA_ARGS__)
 #define mbox_func_trace mbox_log_dbg
-#define mbox_log_err(fmt, args...) \
-	RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \
-		__func__, __LINE__, ## args)
+
+extern int octeontx_logtype_fpavf;
+extern int octeontx_logtype_fpavf_mbox;
 
 #endif /* __OCTEONTX_POOL_LOGS_H__*/
-- 
2.14.1

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

* [dpdk-dev]  [PATCH 4/5] event/octeontx: implement dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
                   ` (2 preceding siblings ...)
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 3/5] mempool/octeontx: " Pavan Nikhilesh
@ 2017-12-19 12:25 ` Pavan Nikhilesh
  2018-01-01  4:40   ` santosh
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 5/5] doc: remove unused config options Pavan Nikhilesh
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 config/common_base                           |  1 -
 config/defconfig_arm64-thunderx-linuxapp-gcc |  1 -
 drivers/event/octeontx/ssovf_evdev.c         | 11 +++++++++++
 drivers/event/octeontx/ssovf_evdev.h         | 25 ++++++++++---------------
 4 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/config/common_base b/config/common_base
index b616ac3d1..fc52c7be9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -583,7 +583,6 @@ CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n
 # Compile PMD for octeontx sso event device
 #
 CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y
-CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n
 
 #
 # Compile librte_ring
diff --git a/config/defconfig_arm64-thunderx-linuxapp-gcc b/config/defconfig_arm64-thunderx-linuxapp-gcc
index 45038b119..9232214ef 100644
--- a/config/defconfig_arm64-thunderx-linuxapp-gcc
+++ b/config/defconfig_arm64-thunderx-linuxapp-gcc
@@ -41,4 +41,3 @@ CONFIG_RTE_MAX_LCORE=96
 # Compile PMD for octeontx sso event device
 #
 CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=y
-CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 117b1453e..fc9a40426 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -46,6 +46,17 @@
 
 #include "ssovf_evdev.h"
 
+int otx_logtype_ssovf;
+
+RTE_INIT(otx_ssovf_init_log);
+static void
+otx_ssovf_init_log(void)
+{
+	otx_logtype_ssovf = rte_log_register("pmd.otx.eventdev");
+	if (otx_logtype_ssovf >= 0)
+		rte_log_set_level(otx_logtype_ssovf, RTE_LOG_NOTICE);
+}
+
 /* SSOPF Mailbox messages */
 
 struct ssovf_mbox_dev_info {
diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h
index b093a3e73..a116aecdd 100644
--- a/drivers/event/octeontx/ssovf_evdev.h
+++ b/drivers/event/octeontx/ssovf_evdev.h
@@ -41,22 +41,15 @@
 
 #define EVENTDEV_NAME_OCTEONTX_PMD event_octeontx
 
-#ifdef RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG
-#define ssovf_log_info(fmt, args...) \
-	RTE_LOG(INFO, EVENTDEV, "[%s] %s() " fmt "\n", \
-		RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
-#define ssovf_log_dbg(fmt, args...) \
-	RTE_LOG(DEBUG, EVENTDEV, "[%s] %s() " fmt "\n", \
-		RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
-#else
-#define ssovf_log_info(fmt, args...)
-#define ssovf_log_dbg(fmt, args...)
-#endif
-
+#define SSOVF_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, otx_logtype_ssovf, \
+			"[%s] %s() " fmt "\n", \
+			RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
+
+#define ssovf_log_info(fmt, ...) SSOVF_LOG(INFO, fmt, ##__VA_ARGS__)
+#define ssovf_log_dbg(fmt, ...) SSOVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define ssovf_log_err(fmt, ...) SSOVF_LOG(ERR, fmt, ##__VA_ARGS__)
 #define ssovf_func_trace ssovf_log_dbg
-#define ssovf_log_err(fmt, args...) \
-	RTE_LOG(ERR, EVENTDEV, "[%s] %s() " fmt "\n", \
-		RTE_STR(EVENTDEV_NAME_OCTEONTX_PMD), __func__, ## args)
 
 #define SSO_MAX_VHGRP                     (64)
 #define SSO_MAX_VHWS                      (32)
@@ -180,6 +173,8 @@ ssovf_pmd_priv(const struct rte_eventdev *eventdev)
 	return eventdev->data->dev_private;
 }
 
+extern int otx_logtype_ssovf;
+
 uint16_t ssows_enq(void *port, const struct rte_event *ev);
 uint16_t ssows_enq_burst(void *port,
 		const struct rte_event ev[], uint16_t nb_events);
-- 
2.14.1

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

* [dpdk-dev]  [PATCH 5/5] doc: remove unused config options
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
                   ` (3 preceding siblings ...)
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 4/5] event/octeontx: " Pavan Nikhilesh
@ 2017-12-19 12:25 ` Pavan Nikhilesh
  2017-12-19 15:43 ` [dpdk-dev] [PATCH 0/5] Dynamic logging Stephen Hemminger
  2018-01-09 12:26 ` Ferruh Yigit
  6 siblings, 0 replies; 12+ messages in thread
From: Pavan Nikhilesh @ 2017-12-19 12:25 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit
  Cc: dev, Pavan Nikhilesh

Remove unused debug config options for thunder nicvf and octeontx as they
are now controlled by dynamic logging.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 doc/guides/eventdevs/octeontx.rst |  4 ----
 doc/guides/mempool/octeontx.rst   |  4 ----
 doc/guides/nics/octeontx.rst      | 21 ---------------------
 doc/guides/nics/thunderx.rst      | 16 ++--------------
 4 files changed, 2 insertions(+), 43 deletions(-)

diff --git a/doc/guides/eventdevs/octeontx.rst b/doc/guides/eventdevs/octeontx.rst
index cef004a20..e7d9164e9 100644
--- a/doc/guides/eventdevs/octeontx.rst
+++ b/doc/guides/eventdevs/octeontx.rst
@@ -78,10 +78,6 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle compilation of the ``librte_pmd_octeontx_ssovf`` driver.
 
-- ``CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG`` (default ``n``)
-
-  Toggle display of generic debugging messages
-
 Driver Compilation
 ~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/guides/mempool/octeontx.rst b/doc/guides/mempool/octeontx.rst
index b262c8233..fcb61ab65 100644
--- a/doc/guides/mempool/octeontx.rst
+++ b/doc/guides/mempool/octeontx.rst
@@ -73,10 +73,6 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle compilation of the ``librte_mempool_octeontx`` driver.
 
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG`` (default ``n``)
-
-  Toggle display of generic debugging messages
-
 Driver Compilation
 ~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/guides/nics/octeontx.rst b/doc/guides/nics/octeontx.rst
index 90bb9e5db..0d9f4434c 100644
--- a/doc/guides/nics/octeontx.rst
+++ b/doc/guides/nics/octeontx.rst
@@ -86,27 +86,6 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle compilation of the ``librte_pmd_octeontx`` driver.
 
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER`` (default ``n``)
-
-  Toggle display of generic debugging messages
-
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT`` (default ``n``)
-
-  Toggle display of initialization related messages.
-
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX`` (default ``n``)
-
-  Toggle display of receive path message
-
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX`` (default ``n``)
-
-  Toggle display of transmit path message
-
-- ``CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX`` (default ``n``)
-
-  Toggle display of mbox related message
-
-
 Driver compilation and testing
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/doc/guides/nics/thunderx.rst b/doc/guides/nics/thunderx.rst
index 45bc690ad..b67bdb68e 100644
--- a/doc/guides/nics/thunderx.rst
+++ b/doc/guides/nics/thunderx.rst
@@ -81,25 +81,13 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle compilation of the ``librte_pmd_thunderx_nicvf`` driver.
 
-- ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT`` (default ``n``)
-
-  Toggle display of initialization related messages.
-
 - ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX`` (default ``n``)
 
-  Toggle display of receive fast path run-time message
+  Toggle asserts of receive fast path.
 
 - ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX`` (default ``n``)
 
-  Toggle display of transmit fast path run-time message
-
-- ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER`` (default ``n``)
-
-  Toggle display of generic debugging messages
-
-- ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX`` (default ``n``)
-
-  Toggle display of PF mailbox related run-time check messages
+  Toggle asserts of transmit fast path.
 
 Driver compilation and testing
 ------------------------------
-- 
2.14.1

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

* Re: [dpdk-dev] [PATCH 0/5] Dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
                   ` (4 preceding siblings ...)
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 5/5] doc: remove unused config options Pavan Nikhilesh
@ 2017-12-19 15:43 ` Stephen Hemminger
  2018-01-09 12:26 ` Ferruh Yigit
  6 siblings, 0 replies; 12+ messages in thread
From: Stephen Hemminger @ 2017-12-19 15:43 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: jerin.jacob, santosh.shukla, olivier.matz, ferruh.yigit, dev

On Tue, 19 Dec 2017 17:55:05 +0530
Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> wrote:

> Implement dynamic logging for cavium specific thunder nicvf and octeontx
> platforms.
> 
> Pavan Nikhilesh (5):
>   net/thunderx: implement dynamic logging
>   net/octeontx: implement dynamic logging
>   mempool/octeontx: implement dynamic logging
>   event/octeontx: implement dynamic logging
>   doc: remove unused config options
> 
>  config/common_base                            | 10 -------
>  config/defconfig_arm64-thunderx-linuxapp-gcc  |  1 -
>  doc/guides/eventdevs/octeontx.rst             |  4 ---
>  doc/guides/mempool/octeontx.rst               |  4 ---
>  doc/guides/nics/octeontx.rst                  | 21 -------------
>  doc/guides/nics/thunderx.rst                  | 16 ++--------
>  drivers/event/octeontx/ssovf_evdev.c          | 11 +++++++
>  drivers/event/octeontx/ssovf_evdev.h          | 25 +++++++---------
>  drivers/mempool/octeontx/octeontx_fpavf.c     | 16 ++++++++++
>  drivers/mempool/octeontx/octeontx_pool_logs.h | 41 ++++++++++---------------
>  drivers/net/octeontx/octeontx_ethdev.c        | 21 +++++++++++++
>  drivers/net/octeontx/octeontx_logs.h          | 42 ++++++++------------------
>  drivers/net/thunderx/nicvf_ethdev.c           | 21 +++++++++++++
>  drivers/net/thunderx/nicvf_logs.h             | 43 ++++++++++-----------------
>  14 files changed, 126 insertions(+), 150 deletions(-)
> 
> --
> 2.14.1
> 

Looks good, thanks.
Combined with my patches, I think only ark PMD is left.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* Re: [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging Pavan Nikhilesh
@ 2018-01-01  4:36   ` santosh
  0 siblings, 0 replies; 12+ messages in thread
From: santosh @ 2018-01-01  4:36 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, olivier.matz, ferruh.yigit; +Cc: dev


On Tuesday 19 December 2017 05:55 PM, Pavan Nikhilesh wrote:
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

LGTM.

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH 2/5] net/octeontx: implement dynamic logging
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 2/5] net/octeontx: " Pavan Nikhilesh
@ 2018-01-01  4:37   ` santosh
  0 siblings, 0 replies; 12+ messages in thread
From: santosh @ 2018-01-01  4:37 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, olivier.matz, ferruh.yigit; +Cc: dev


On Tuesday 19 December 2017 05:55 PM, Pavan Nikhilesh wrote:
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

nits:
s / otx_net_init_log / octeontx_net_init_log

Rest LGTM,
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH 3/5] mempool/octeontx: implement dynamic logging
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 3/5] mempool/octeontx: " Pavan Nikhilesh
@ 2018-01-01  4:39   ` santosh
  0 siblings, 0 replies; 12+ messages in thread
From: santosh @ 2018-01-01  4:39 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, olivier.matz, ferruh.yigit; +Cc: dev


On Tuesday 19 December 2017 05:55 PM, Pavan Nikhilesh wrote:
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

Same nits comment for 
otx_pool_init_log

Acked-by: santosh shukla <santosh.shukla@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH 4/5] event/octeontx: implement dynamic logging
  2017-12-19 12:25 ` [dpdk-dev] [PATCH 4/5] event/octeontx: " Pavan Nikhilesh
@ 2018-01-01  4:40   ` santosh
  0 siblings, 0 replies; 12+ messages in thread
From: santosh @ 2018-01-01  4:40 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, olivier.matz, ferruh.yigit; +Cc: dev


On Tuesday 19 December 2017 05:55 PM, Pavan Nikhilesh wrote:
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

same comment for otx_ssovf_init_log

Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>

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

* Re: [dpdk-dev] [PATCH 0/5] Dynamic logging
  2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
                   ` (5 preceding siblings ...)
  2017-12-19 15:43 ` [dpdk-dev] [PATCH 0/5] Dynamic logging Stephen Hemminger
@ 2018-01-09 12:26 ` Ferruh Yigit
  6 siblings, 0 replies; 12+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:26 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, santosh.shukla, olivier.matz; +Cc: dev

On 12/19/2017 12:25 PM, Pavan Nikhilesh wrote:
> Implement dynamic logging for cavium specific thunder nicvf and octeontx
> platforms.
> 
> Pavan Nikhilesh (5):
>   net/thunderx: implement dynamic logging
>   net/octeontx: implement dynamic logging
>   mempool/octeontx: implement dynamic logging
>   event/octeontx: implement dynamic logging
>   doc: remove unused config options

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

(not all of them are net drivers, but getting them all to next-net to
functionally group them and updates are straightforward)

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

end of thread, other threads:[~2018-01-09 12:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 12:25 [dpdk-dev] [PATCH 0/5] Dynamic logging Pavan Nikhilesh
2017-12-19 12:25 ` [dpdk-dev] [PATCH 1/5] net/thunderx: implement dynamic logging Pavan Nikhilesh
2018-01-01  4:36   ` santosh
2017-12-19 12:25 ` [dpdk-dev] [PATCH 2/5] net/octeontx: " Pavan Nikhilesh
2018-01-01  4:37   ` santosh
2017-12-19 12:25 ` [dpdk-dev] [PATCH 3/5] mempool/octeontx: " Pavan Nikhilesh
2018-01-01  4:39   ` santosh
2017-12-19 12:25 ` [dpdk-dev] [PATCH 4/5] event/octeontx: " Pavan Nikhilesh
2018-01-01  4:40   ` santosh
2017-12-19 12:25 ` [dpdk-dev] [PATCH 5/5] doc: remove unused config options Pavan Nikhilesh
2017-12-19 15:43 ` [dpdk-dev] [PATCH 0/5] Dynamic logging Stephen Hemminger
2018-01-09 12:26 ` 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).