DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it)
@ 2017-12-19  6:38 Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging Stephen Hemminger
                   ` (12 more replies)
  0 siblings, 13 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

This patch set implements dynamic logging for 11 drivers.
All these patches are compile tested only. I don't have
access to most of this hardware.

It makes more sense to "just do it" for dynamic logging rather
than keeping TODO lists in the documentation and expecting the
vendors to fix their own code. The advantage of common repository
is that global changes can be done.

Stephen Hemminger (11):
  avp: implement dynamic logging
  bnx2x: implement dynamic logging
  vmxnet3: implement dynamic logging
  ixgbe: implement dynamic logging
  e1000: implement dynamic logging
  virtio: implement dynamic logging
  nfp: implement dynamic logging
  fm10k: implement dynamic logging
  ena: implement dynamic logging
  qede: implement dynamic logging
  lio: implement dynamic logging

 config/common_base                   | 21 ++------------
 doc/guides/nics/bnx2x.rst            |  8 ------
 drivers/net/avp/avp_ethdev.c         | 10 +++++++
 drivers/net/avp/avp_logs.h           |  9 +++---
 drivers/net/bnx2x/bnx2x_ethdev.c     | 15 ++++++++++
 drivers/net/bnx2x/bnx2x_logs.h       | 17 ++++--------
 drivers/net/e1000/e1000_logs.h       | 16 ++++-------
 drivers/net/e1000/em_ethdev.c        | 15 ++++++++++
 drivers/net/ena/ena_ethdev.c         | 15 ++++++++++
 drivers/net/ena/ena_logs.h           | 14 ++++------
 drivers/net/ena/ena_platform.h       |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c     | 15 ++++++++++
 drivers/net/fm10k/fm10k_logs.h       | 16 ++++-------
 drivers/net/ixgbe/ixgbe_ethdev.c     | 15 ++++++++++
 drivers/net/ixgbe/ixgbe_logs.h       | 16 ++++-------
 drivers/net/liquidio/lio_ethdev.c    | 15 ++++++++++
 drivers/net/liquidio/lio_logs.h      | 20 ++++++--------
 drivers/net/nfp/nfp_net.c            | 14 ++++++++++
 drivers/net/nfp/nfp_net_logs.h       | 22 ++++-----------
 drivers/net/qede/qede_ethdev.c       | 15 ++++++++++
 drivers/net/qede/qede_logs.h         | 53 ++++++++++++++++--------------------
 drivers/net/virtio/virtio_ethdev.c   | 15 ++++++++++
 drivers/net/virtio/virtio_logs.h     | 19 +++++--------
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 15 ++++++++++
 drivers/net/vmxnet3/vmxnet3_logs.h   | 17 ++++--------
 25 files changed, 247 insertions(+), 162 deletions(-)

-- 
2.11.0

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

* [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-20  1:53   ` Ferruh Yigit
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 02/11] bnx2x: " Stephen Hemminger
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

All PMD should be using dynamic log levels.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base           |  1 -
 drivers/net/avp/avp_ethdev.c | 10 ++++++++++
 drivers/net/avp/avp_logs.h   |  9 ++++-----
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/config/common_base b/config/common_base
index e74febef4848..f775ec96184c 100644
--- a/config/common_base
+++ b/config/common_base
@@ -441,7 +441,6 @@ CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n
 CONFIG_RTE_LIBRTE_AVP_PMD=n
 CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y
 CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
 
 #
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 9b342bfa3ae8..deb6f355d3ef 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -60,6 +60,7 @@
 
 #include "avp_logs.h"
 
+int avp_logtype_driver;
 
 static int avp_dev_create(struct rte_pci_device *pci_dev,
 			  struct rte_eth_dev *eth_dev);
@@ -2312,3 +2313,12 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
+
+RTE_INIT(avp_init_log);
+static void
+avp_init_log(void)
+{
+	avp_logtype_driver = rte_log_register("pmd.avp.driver");
+	if (avp_logtype_driver >= 0)
+		rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 252cab7da2cf..e29394d5857f 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -49,11 +49,10 @@
 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_AVP_DEBUG_DRIVER
+extern int avp_logtype_driver;
+
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #endif /* _AVP_LOGS_H_ */
-- 
2.11.0

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

* [dpdk-dev] [PATCH 02/11] bnx2x: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-20  1:51   ` Ferruh Yigit
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 03/11] vmxnet3: " Stephen Hemminger
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Replace compile time option for init and driver log with
dynamic value.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base               |  2 --
 doc/guides/nics/bnx2x.rst        |  8 --------
 drivers/net/bnx2x/bnx2x_ethdev.c | 15 +++++++++++++++
 drivers/net/bnx2x/bnx2x_logs.h   | 17 ++++++-----------
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/config/common_base b/config/common_base
index f775ec96184c..82d1f9ac47ef 100644
--- a/config/common_base
+++ b/config/common_base
@@ -244,8 +244,6 @@ CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8
 # Compile burst-oriented Broadcom PMD driver
 #
 CONFIG_RTE_LIBRTE_BNX2X_PMD=n
-CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n
-CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n
diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index fbfc048e04a0..b1fec8a365b0 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -102,14 +102,6 @@ enabling debugging options may affect system performance.
   to 'y'. Also, in order for firmware binary to load user will need zlib devel
   package installed.
 
-- ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG`` (default **n**)
-
-  Toggle display of generic debugging messages.
-
-- ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT`` (default **n**)
-
-  Toggle display of initialization related messages.
-
 - ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX`` (default **n**)
 
   Toggle display of transmit fast path run-time messages.
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 95861a06e565..483d5a17cd5d 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -14,6 +14,9 @@
 #include <rte_dev.h>
 #include <rte_ethdev_pci.h>
 
+int bnx2x_logtype_init;
+int bnx2x_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -687,3 +690,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
+
+RTE_INIT(bnx2x_init_log);
+static void
+bnx2x_init_log(void)
+{
+	bnx2x_logtype_init = rte_log_register("pmd.bnx2x.init");
+	if (bnx2x_logtype_init >= 0)
+		rte_log_set_level(bnx2x_logtype_init, RTE_LOG_NOTICE);
+	bnx2x_logtype_driver = rte_log_register("pmd.bnx2x.driver");
+	if (bnx2x_logtype_driver >= 0)
+		rte_log_set_level(bnx2x_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h
index dff014d7e122..08c1b764f028 100644
--- a/drivers/net/bnx2x/bnx2x_logs.h
+++ b/drivers/net/bnx2x/bnx2x_logs.h
@@ -11,14 +11,12 @@
 #ifndef _PMD_LOGS_H_
 #define _PMD_LOGS_H_
 
+extern int bnx2x_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_BNX2X_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -41,12 +39,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_BNX2X_DEBUG
+extern int bnx2x_logtype_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
+	rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
@@ -58,5 +54,4 @@
 #define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-
 #endif /* _PMD_LOGS_H_ */
-- 
2.11.0

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

* [dpdk-dev] [PATCH 03/11] vmxnet3: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 02/11] bnx2x: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 04/11] ixgbe: " Stephen Hemminger
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Replace compile time configuration with runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                   |  2 --
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 15 +++++++++++++++
 drivers/net/vmxnet3/vmxnet3_logs.h   | 17 ++++++-----------
 3 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/config/common_base b/config/common_base
index 82d1f9ac47ef..8b63f205d9b9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -380,11 +380,9 @@ CONFIG_RTE_VIRTIO_USER=n
 # Compile burst-oriented VMXNET3 PMD driver
 #
 CONFIG_RTE_LIBRTE_VMXNET3_PMD=y
-CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n
 
 #
 # Compile example software rings based PMD
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 82d59ca8caa2..217399df9e1d 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -106,6 +106,9 @@ static void vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
 				 struct ether_addr *mac_addr);
 static void vmxnet3_interrupt_handler(void *param);
 
+int vmxnet3_logtype_init;
+int vmxnet3_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -1374,3 +1377,15 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(vmxnet3_init_log);
+static void
+vmxnet3_init_log(void)
+{
+	vmxnet3_logtype_init = rte_log_register("pmd.vmxnet3.init");
+	if (vmxnet3_logtype_init >= 0)
+		rte_log_set_level(vmxnet3_logtype_init, RTE_LOG_NOTICE);
+	vmxnet3_logtype_driver = rte_log_register("pmd.vmxnet3.driver");
+	if (vmxnet3_logtype_driver >= 0)
+		rte_log_set_level(vmxnet3_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 82639a083356..c6233eea34e4 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -34,14 +34,11 @@
 #ifndef _VMXNET3_LOGS_H_
 #define _VMXNET3_LOGS_H_
 
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_INIT
+extern int vmxnet3_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while(0)
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_VMXNET3_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -64,11 +61,9 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
+extern int vmxnet3_logtype_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, vmxnet3_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _VMXNET3_LOGS_H_ */
-- 
2.11.0

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

* [dpdk-dev] [PATCH 04/11] ixgbe: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (2 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 03/11] vmxnet3: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 05/11] e1000: " Stephen Hemminger
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Convert all drivers possible to dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base               |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +++++++++++++++
 drivers/net/ixgbe/ixgbe_logs.h   | 16 ++++++----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 8b63f205d9b9..333689f052f5 100644
--- a/config/common_base
+++ b/config/common_base
@@ -188,11 +188,9 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 # Compile burst-oriented IXGBE PMD driver
 #
 CONFIG_RTE_LIBRTE_IXGBE_PMD=y
-CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
 CONFIG_RTE_IXGBE_INC_VECTOR=y
 CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ff19a564a42e..0946617b2e16 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -427,6 +427,9 @@ static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 		(r) = (h)->bitmap[idx] >> bit & 1;\
 	} while (0)
 
+int ixgbe_logtype_init;
+int ixgbe_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -8444,3 +8447,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
+
+RTE_INIT(ixgbe_init_log);
+static void
+ixgbe_init_log(void)
+{
+	ixgbe_logtype_init = rte_log_register("pmd.ixgbe.init");
+	if (ixgbe_logtype_init >= 0)
+		rte_log_set_level(ixgbe_logtype_init, RTE_LOG_NOTICE);
+	ixgbe_logtype_driver = rte_log_register("pmd.ixgbe.driver");
+	if (ixgbe_logtype_driver >= 0)
+		rte_log_set_level(ixgbe_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 53ba42d927f6..9dfa238f2fc0 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -34,14 +34,12 @@
 #ifndef _IXGBE_LOGS_H_
 #define _IXGBE_LOGS_H_
 
+extern int ixgbe_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, ixgbe_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_IXGBE_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -64,12 +62,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_IXGBE_DEBUG_DRIVER
+extern int ixgbe_logtype_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
+	rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-- 
2.11.0

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

* [dpdk-dev] [PATCH 05/11] e1000: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (3 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 04/11] ixgbe: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 06/11] virtio: " Stephen Hemminger
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  2 --
 drivers/net/e1000/e1000_logs.h | 16 ++++++----------
 drivers/net/e1000/em_ethdev.c  | 15 +++++++++++++++
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 333689f052f5..d2564075706d 100644
--- a/config/common_base
+++ b/config/common_base
@@ -177,11 +177,9 @@ CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n
 #
 CONFIG_RTE_LIBRTE_EM_PMD=y
 CONFIG_RTE_LIBRTE_IGB_PMD=y
-CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 
 #
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 81e7bf52ce54..c6be294a51da 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -34,14 +34,12 @@
 #ifndef _E1000_LOGS_H_
 #define _E1000_LOGS_H_
 
+extern int e1000_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_E1000_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -64,12 +62,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_E1000_DEBUG_DRIVER
+extern int e1000_logtype_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
+	rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index a0c3b4dc50a7..19e827fb5ac8 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -134,6 +134,9 @@ static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 
 static enum e1000_fc_mode em_fc_setting = e1000_fc_full;
 
+int e1000_logtype_init;
+int e1000_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -1875,3 +1878,15 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(e1000_init_log);
+static void
+e1000_init_log(void)
+{
+	e1000_logtype_init = rte_log_register("pmd.e1000.init");
+	if (e1000_logtype_init >= 0)
+		rte_log_set_level(e1000_logtype_init, RTE_LOG_NOTICE);
+	e1000_logtype_driver = rte_log_register("pmd.e1000.driver");
+	if (e1000_logtype_driver >= 0)
+		rte_log_set_level(e1000_logtype_driver, RTE_LOG_NOTICE);
+}
-- 
2.11.0

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

* [dpdk-dev] [PATCH 06/11] virtio: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (4 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 05/11] e1000: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2018-01-09  9:18   ` Maxime Coquelin
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 07/11] nfp: " Stephen Hemminger
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                 |  2 --
 drivers/net/virtio/virtio_ethdev.c | 15 +++++++++++++++
 drivers/net/virtio/virtio_logs.h   | 19 +++++++------------
 3 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/config/common_base b/config/common_base
index d2564075706d..3695fbe5de27 100644
--- a/config/common_base
+++ b/config/common_base
@@ -361,10 +361,8 @@ CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
-CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n
 
 #
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index e0328f61d138..e13481774f73 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -106,6 +106,9 @@ static int virtio_dev_queue_stats_mapping_set(
 	uint8_t stat_idx,
 	uint8_t is_rx);
 
+int virtio_logtype_init;
+int virtio_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -2072,3 +2075,15 @@ __rte_unused uint8_t is_rx)
 RTE_PMD_EXPORT_NAME(net_virtio, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(virtio_init_log);
+static void
+virtio_init_log(void)
+{
+	virtio_logtype_init = rte_log_register("pmd.virtio.init");
+	if (virtio_logtype_init >= 0)
+		rte_log_set_level(virtio_logtype_init, RTE_LOG_NOTICE);
+	virtio_logtype_driver = rte_log_register("pmd.virtio.driver");
+	if (virtio_logtype_driver >= 0)
+		rte_log_set_level(virtio_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
index 90a79eaa5b42..1d287c1a72ec 100644
--- a/drivers/net/virtio/virtio_logs.h
+++ b/drivers/net/virtio/virtio_logs.h
@@ -36,14 +36,12 @@
 
 #include <rte_log.h>
 
-#ifdef RTE_LIBRTE_VIRTIO_DEBUG_INIT
+extern int virtio_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
+
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while(0)
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -59,12 +57,9 @@
 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-
-#ifdef RTE_LIBRTE_VIRTIO_DEBUG_DRIVER
+extern int virtio_logtype_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, virtio_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _VIRTIO_LOGS_H_ */
-- 
2.11.0

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

* [dpdk-dev] [PATCH 07/11] nfp: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (5 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 06/11] virtio: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-20  1:52   ` Ferruh Yigit
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 08/11] fm10k: " Stephen Hemminger
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  3 ++-
 drivers/net/nfp/nfp_net.c      | 14 ++++++++++++++
 drivers/net/nfp/nfp_net_logs.h | 22 ++++++----------------
 3 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/config/common_base b/config/common_base
index 3695fbe5de27..8d18b3c81db8 100644
--- a/config/common_base
+++ b/config/common_base
@@ -267,7 +267,8 @@ CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n
 # Compile burst-oriented Netronome NFP PMD driver
 #
 CONFIG_RTE_LIBRTE_NFP_PMD=n
-CONFIG_RTE_LIBRTE_NFP_DEBUG=n
+CONFIG_RTE_LIBRTE_NFP_DEBUG_TX=n
+CONFIG_RTE_LIBRTE_NFP_DEBUG_RX=n
 
 #
 # Compile Marvell PMD driver
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0501156bacb7..b9055e1030fa 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2984,6 +2984,9 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	return ret;
 }
 
+int nfp_logtype_init;
+int nfp_logtype_driver;
+
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
@@ -3057,6 +3060,17 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
 
+RTE_INIT(nfp_init_log);
+static void
+nfp_init_log(void)
+{
+	nfp_logtype_init = rte_log_register("pmd.nfp.init");
+	if (nfp_logtype_init >= 0)
+		rte_log_set_level(nfp_logtype_init, RTE_LOG_NOTICE);
+	nfp_logtype_driver = rte_log_register("pmd.nfp.driver");
+	if (nfp_logtype_driver >= 0)
+		rte_log_set_level(nfp_logtype_driver, RTE_LOG_NOTICE);
+}
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/nfp/nfp_net_logs.h b/drivers/net/nfp/nfp_net_logs.h
index 0b966e431f7b..618aaca1d31e 100644
--- a/drivers/net/nfp/nfp_net_logs.h
+++ b/drivers/net/nfp/nfp_net_logs.h
@@ -36,14 +36,10 @@
 
 #define RTE_LIBRTE_NFP_NET_DEBUG_INIT 1
 
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_INIT
+extern int nfp_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while (0)
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -55,21 +51,15 @@
 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_TX
 #define PMD_TX_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s() tx: " fmt, __func__, ## args)
+#define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
 #else
 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define ASSERT(x) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_DRIVER
+extern int nfp_logtype_driver;
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
-
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_INIT
-#define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
-#else
-#define ASSERT(x) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #endif /* _NFP_NET_LOGS_H_ */
-- 
2.11.0

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

* [dpdk-dev] [PATCH 08/11] fm10k: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (6 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 07/11] nfp: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 09/11] ena: " Stephen Hemminger
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base               |  2 --
 drivers/net/fm10k/fm10k_ethdev.c | 15 +++++++++++++++
 drivers/net/fm10k/fm10k_logs.h   | 16 ++++++----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 8d18b3c81db8..69004d1578ae 100644
--- a/config/common_base
+++ b/config/common_base
@@ -213,11 +213,9 @@ CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1
 # Compile burst-oriented FM10K PMD
 #
 CONFIG_RTE_LIBRTE_FM10K_PMD=y
-CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y
 CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y
 
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 2d05a466965b..7236173f8207 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -69,6 +69,9 @@
 #define GLORT_FD_MASK    GLORT_PF_MASK
 #define GLORT_FD_INDEX   GLORT_FD_Q_BASE
 
+int fm10k_logtype_init;
+int fm10k_logtype_driver;
+
 static void fm10k_close_mbx_service(struct fm10k_hw *hw);
 static void fm10k_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static void fm10k_dev_promiscuous_disable(struct rte_eth_dev *dev);
@@ -3263,3 +3266,15 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(fm10k_init_log);
+static void
+fm10k_init_log(void)
+{
+	fm10k_logtype_init = rte_log_register("pmd.fm10k.init");
+	if (fm10k_logtype_init >= 0)
+		rte_log_set_level(fm10k_logtype_init, RTE_LOG_NOTICE);
+	fm10k_logtype_driver = rte_log_register("pmd.fm10k.driver");
+	if (fm10k_logtype_driver >= 0)
+		rte_log_set_level(fm10k_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index 31384c9e2b69..2a9e1c609d8b 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -36,14 +36,12 @@
 
 #include <rte_log.h>
 
+extern int fm10k_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, fm10k_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_FM10K_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -66,12 +64,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_FM10K_DEBUG_DRIVER
+extern int fm10k_logtype_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
+	rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-- 
2.11.0

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

* [dpdk-dev] [PATCH 09/11] ena: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (7 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 08/11] fm10k: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 10/11] qede: " Stephen Hemminger
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

Use dynamic rather static configuration for logging.
Also include ena_assert_msg.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  1 -
 drivers/net/ena/ena_ethdev.c   | 15 +++++++++++++++
 drivers/net/ena/ena_logs.h     | 14 ++++++--------
 drivers/net/ena/ena_platform.h |  2 +-
 4 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/config/common_base b/config/common_base
index 69004d1578ae..61ed718189ec 100644
--- a/config/common_base
+++ b/config/common_base
@@ -169,7 +169,6 @@ CONFIG_RTE_LIBRTE_ENA_PMD=y
 CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n
 
 #
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 22db8951f2d1..3f379a9b2ca6 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -178,6 +178,9 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
 #define	ENA_TX_OFFLOAD_NOTSUP_MASK	\
 	(PKT_TX_OFFLOAD_MASK ^ ENA_TX_OFFLOAD_MASK)
 
+int ena_logtype_init;
+int ena_logtype_driver;
+
 static const struct rte_pci_id pci_id_ena_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) },
@@ -1814,3 +1817,15 @@ static struct rte_pci_driver rte_ena_pmd = {
 RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(ena_init_log);
+static void
+ena_init_log(void)
+{
+	ena_logtype_init = rte_log_register("pmd.ena.init");
+	if (ena_logtype_init >= 0)
+		rte_log_set_level(ena_logtype_init, RTE_LOG_NOTICE);
+	ena_logtype_driver = rte_log_register("pmd.ena.driver");
+	if (ena_logtype_driver >= 0)
+		rte_log_set_level(ena_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index c6c8a41bd9fa..2c0e91b656ac 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -34,10 +34,10 @@
 #ifndef _ENA_LOGS_H_
 #define _ENA_LOGS_H_
 
-#define RTE_LOGTYPE_ENA RTE_LOGTYPE_USER1
-
+extern int ena_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, ena_logtype_init, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -60,11 +60,9 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_ENA_DEBUG_DRIVER
+extern int ena_logtype_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, ena_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_platform.h b/drivers/net/ena/ena_platform.h
index 0df82d6fdb53..a2239a92c428 100644
--- a/drivers/net/ena/ena_platform.h
+++ b/drivers/net/ena/ena_platform.h
@@ -49,7 +49,7 @@
 #define ena_assert_msg(cond, msg)		\
 	do {					\
 		if (unlikely(!(cond))) {	\
-			RTE_LOG(ERR, ENA,	\
+			rte_log(RTE_LOG_ERR, ena_logtype_driver, \
 				"Assert failed on %s:%s:%d: ",	\
 				__FILE__, __func__, __LINE__);	\
 			rte_panic(msg);		\
-- 
2.11.0

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

* [dpdk-dev] [PATCH 10/11] qede: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (8 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 09/11] ena: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 11/11] lio: " Stephen Hemminger
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

This driver is mostly like others with slightly different logging
macros. The semantics were retained, with some minor reformatting.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  2 --
 drivers/net/qede/qede_ethdev.c | 15 ++++++++++++
 drivers/net/qede/qede_logs.h   | 53 +++++++++++++++++++-----------------------
 3 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/config/common_base b/config/common_base
index 61ed718189ec..1718f6a14449 100644
--- a/config/common_base
+++ b/config/common_base
@@ -398,9 +398,7 @@ CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
 # QLogic 10G/25G/40G/50G/100G PMD
 #
 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_TX=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 6f5ba2a9270c..cd8dd9c2a676 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -11,6 +11,9 @@
 #include <rte_version.h>
 
 /* Globals */
+int qede_logtype_init;
+int qede_logtype_driver;
+
 static const struct qed_eth_ops *qed_ops;
 static int64_t timer_period = 1;
 
@@ -2961,3 +2964,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
+
+RTE_INIT(qede_init_log);
+static void
+qede_init_log(void)
+{
+	qede_logtype_init = rte_log_register("pmd.qede.init");
+	if (qede_logtype_init >= 0)
+		rte_log_set_level(qede_logtype_init, RTE_LOG_NOTICE);
+	qede_logtype_driver = rte_log_register("pmd.qede.driver");
+	if (qede_logtype_driver >= 0)
+		rte_log_set_level(qede_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h
index 15821151cf8a..b7ecf1c276b0 100644
--- a/drivers/net/qede/qede_logs.h
+++ b/drivers/net/qede/qede_logs.h
@@ -9,23 +9,25 @@
 #ifndef _QEDE_LOGS_H_
 #define _QEDE_LOGS_H_
 
-#define DP_ERR(p_dev, fmt, ...) \
-	rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, \
-		"[%s:%d(%s)]" fmt, \
-		  __func__, __LINE__, \
-		(p_dev)->name ? (p_dev)->name : "", \
+extern int qede_logtype_driver;
+
+#define DP_ERR(p_dev, fmt, ...)				\
+	rte_log(RTE_LOG_ERR, qede_logtype_driver,	\
+		"[%s:%d(%s)]" fmt,			\
+		__func__, __LINE__,			\
+		(p_dev)->name ? (p_dev)->name : "",	\
 		##__VA_ARGS__)
 
 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
 do { \
 	if (is_assert) \
-		rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD,\
+		rte_log(RTE_LOG_ERR, qede_logtype_driver,\
 			"[QEDE PMD: (%s)]%s:" fmt, \
 			(p_dev)->name ? (p_dev)->name : "", \
 			 __func__, \
 			##__VA_ARGS__); \
 	else \
-		rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
+		rte_log(RTE_LOG_NOTICE, qede_logtype_driver,\
 			"[QEDE PMD: (%s)]%s:" fmt, \
 			(p_dev)->name ? (p_dev)->name : "", \
 			 __func__, \
@@ -34,7 +36,7 @@ do { \
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
 #define DP_INFO(p_dev, fmt, ...) \
-	rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
+	rte_log(RTE_LOG_INFO, qede_logtype_driver, \
 		"[%s:%d(%s)]" fmt, \
 		__func__, __LINE__, \
 		(p_dev)->name ? (p_dev)->name : "", \
@@ -43,30 +45,23 @@ do { \
 #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) \
-		rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_PMD, \
-			"[%s:%d(%s)]" fmt, \
-		      __func__, __LINE__, \
-		      (p_dev)->name ? (p_dev)->name : "", \
-		      ##__VA_ARGS__); \
-} while (0)
-#else
-#define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
-#endif
+#define DP_VERBOSE(p_dev, module, fmt, ...)				\
+	do {								\
+		if ((p_dev)->dp_module & module)			\
+			rte_log(RTE_LOG_DEBUG, qede_logtype_driver,	\
+				"[%s:%d(%s)]" fmt,			\
+				__func__, __LINE__,			\
+				(p_dev)->name ? (p_dev)->name : "",	\
+				##__VA_ARGS__);				\
+	} while (0)
 
-#define PMD_INIT_LOG(level, edev, fmt, args...)	\
-	rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
-		"[qede_pmd: %s] %s() " fmt "\n", \
-	(edev)->name, __func__, ##args)
+extern int qede_logtype_init;
+#define PMD_INIT_LOG(level, edev, fmt, args...)		\
+	rte_log(RTE_LOG_ ## level, qede_logtype_init,	\
+		"[qede_pmd: %s] %s() " fmt "\n",	\
+		(edev)->name, __func__, ##args)
 
-#ifdef RTE_LIBRTE_QEDE_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE(edev) do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
 #define PMD_TX_LOG(level, q, fmt, args...) \
-- 
2.11.0

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

* [dpdk-dev] [PATCH 11/11] lio: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (9 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 10/11] qede: " Stephen Hemminger
@ 2017-12-19  6:38 ` Stephen Hemminger
  2017-12-20  1:51 ` [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Ferruh Yigit
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
  12 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-19  6:38 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

This driver mostly uses the common pattern. Convert this to the
dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                |  2 --
 drivers/net/liquidio/lio_ethdev.c | 15 +++++++++++++++
 drivers/net/liquidio/lio_logs.h   | 20 ++++++++------------
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/config/common_base b/config/common_base
index 1718f6a14449..ee716adc4e0f 100644
--- a/config/common_base
+++ b/config/common_base
@@ -312,8 +312,6 @@ CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n
 # Compile burst-oriented Cavium LiquidIO PMD driver
 #
 CONFIG_RTE_LIBRTE_LIO_PMD=y
-CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n
-CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 84b8a3288d12..5ad7c9902af4 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -43,6 +43,9 @@
 #include "lio_ethdev.h"
 #include "lio_rxtx.h"
 
+int lio_logtype_init;
+int lio_logtype_driver;
+
 /* Default RSS key in use */
 static uint8_t lio_rss_key[40] = {
 	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
@@ -2180,3 +2183,15 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
+
+RTE_INIT(lio_init_log);
+static void
+lio_init_log(void)
+{
+	lio_logtype_init = rte_log_register("pmd.lio.init");
+	if (lio_logtype_init >= 0)
+		rte_log_set_level(lio_logtype_init, RTE_LOG_NOTICE);
+	lio_logtype_driver = rte_log_register("pmd.lio.driver");
+	if (lio_logtype_driver >= 0)
+		rte_log_set_level(lio_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/liquidio/lio_logs.h b/drivers/net/liquidio/lio_logs.h
index a4c9ca4db291..c6f9bd15bd79 100644
--- a/drivers/net/liquidio/lio_logs.h
+++ b/drivers/net/liquidio/lio_logs.h
@@ -34,8 +34,10 @@
 #ifndef _LIO_LOGS_H_
 #define _LIO_LOGS_H_
 
-#define lio_dev_printf(lio_dev, level, fmt, args...)			\
-	RTE_LOG(level, PMD, "%s" fmt, (lio_dev)->dev_string, ##args)
+extern int lio_logtype_driver;
+#define lio_dev_printf(lio_dev, level, fmt, args...)		\
+	rte_log(RTE_LOG_ ## level, lio_logtype_driver,		\
+		"%s" fmt, (lio_dev)->dev_string, ##args)
 
 #define lio_dev_info(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, INFO, "INFO: " fmt, ##args)
@@ -43,22 +45,16 @@
 #define lio_dev_err(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, ERR, "ERROR: %s() " fmt, __func__, ##args)
 
-#define PMD_INIT_LOG(level, fmt, args...) RTE_LOG(level, PMD, fmt, ## args)
+extern int lio_logtype_init;
+#define PMD_INIT_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, lio_logtype_init, \
+		fmt, ## args)
 
 /* Enable these through config options */
-
-#ifdef RTE_LIBRTE_LIO_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, "%s() >>\n", __func__)
-#else /* !RTE_LIBRTE_LIO_DEBUG_INIT */
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif /* RTE_LIBRTE_LIO_DEBUG_INIT */
 
-#ifdef RTE_LIBRTE_LIO_DEBUG_DRIVER
 #define lio_dev_dbg(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, DEBUG, "DEBUG: %s() " fmt, __func__, ##args)
-#else /* !RTE_LIBRTE_LIO_DEBUG_DRIVER */
-#define lio_dev_dbg(lio_dev, fmt, args...) do { } while (0)
-#endif /* RTE_LIBRTE_LIO_DEBUG_DRIVER */
 
 #ifdef RTE_LIBRTE_LIO_DEBUG_RX
 #define PMD_RX_LOG(lio_dev, level, fmt, args...)			\
-- 
2.11.0

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

* Re: [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it)
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (10 preceding siblings ...)
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 11/11] lio: " Stephen Hemminger
@ 2017-12-20  1:51 ` Ferruh Yigit
  2017-12-20 18:59   ` Stephen Hemminger
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
  12 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2017-12-20  1:51 UTC (permalink / raw)
  To: Stephen Hemminger, dev

On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> This patch set implements dynamic logging for 11 drivers.
> All these patches are compile tested only. I don't have
> access to most of this hardware.
> 
> It makes more sense to "just do it" for dynamic logging rather
> than keeping TODO lists in the documentation and expecting the
> vendors to fix their own code. The advantage of common repository
> is that global changes can be done.

Hi Stephen,

Thank you for the update, there a few minor comments in relevant patches, except
from them set lgtm.

Overall do you think keeping todo list is a bad idea?
There are a few more issues like this and I am not sure how to communicate them
with PMD maintainers, any suggestion is welcome.

> 
> Stephen Hemminger (11):
>   avp: implement dynamic logging
>   bnx2x: implement dynamic logging
>   vmxnet3: implement dynamic logging
>   ixgbe: implement dynamic logging
>   e1000: implement dynamic logging
>   virtio: implement dynamic logging
>   nfp: implement dynamic logging
>   fm10k: implement dynamic logging
>   ena: implement dynamic logging
>   qede: implement dynamic logging
>   lio: implement dynamic logging

<...>

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

* Re: [dpdk-dev] [PATCH 02/11] bnx2x: implement dynamic logging
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 02/11] bnx2x: " Stephen Hemminger
@ 2017-12-20  1:51   ` Ferruh Yigit
  2017-12-20 18:58     ` Stephen Hemminger
  0 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2017-12-20  1:51 UTC (permalink / raw)
  To: Stephen Hemminger, dev

On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> Replace compile time option for init and driver log with
> dynamic value.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  config/common_base               |  2 --
>  doc/guides/nics/bnx2x.rst        |  8 --------
>  drivers/net/bnx2x/bnx2x_ethdev.c | 15 +++++++++++++++
>  drivers/net/bnx2x/bnx2x_logs.h   | 17 ++++++-----------
>  4 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/config/common_base b/config/common_base
> index f775ec96184c..82d1f9ac47ef 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -244,8 +244,6 @@ CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8
>  # Compile burst-oriented Broadcom PMD driver
>  #
>  CONFIG_RTE_LIBRTE_BNX2X_PMD=n
> -CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n

There are a few "#ifdef RTE_LIBRTE_BNX2X_DEBUG" usage remains in the code which
is causing build error.

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

* Re: [dpdk-dev] [PATCH 07/11] nfp: implement dynamic logging
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 07/11] nfp: " Stephen Hemminger
@ 2017-12-20  1:52   ` Ferruh Yigit
  0 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2017-12-20  1:52 UTC (permalink / raw)
  To: Stephen Hemminger, dev, Alejandro Lucero

On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  config/common_base             |  3 ++-
>  drivers/net/nfp/nfp_net.c      | 14 ++++++++++++++
>  drivers/net/nfp/nfp_net_logs.h | 22 ++++++----------------
>  3 files changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/config/common_base b/config/common_base
> index 3695fbe5de27..8d18b3c81db8 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -267,7 +267,8 @@ CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n
>  # Compile burst-oriented Netronome NFP PMD driver
>  #
>  CONFIG_RTE_LIBRTE_NFP_PMD=n
> -CONFIG_RTE_LIBRTE_NFP_DEBUG=n
> +CONFIG_RTE_LIBRTE_NFP_DEBUG_TX=n
> +CONFIG_RTE_LIBRTE_NFP_DEBUG_RX=n
>  
>  #
>  # Compile Marvell PMD driver
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 0501156bacb7..b9055e1030fa 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -2984,6 +2984,9 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  	return ret;
>  }
>  
> +int nfp_logtype_init;
> +int nfp_logtype_driver;
> +
>  static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
>  	{
>  		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> @@ -3057,6 +3060,17 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
>  RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
>  RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
>  
> +RTE_INIT(nfp_init_log);
> +static void
> +nfp_init_log(void)
> +{
> +	nfp_logtype_init = rte_log_register("pmd.nfp.init");
> +	if (nfp_logtype_init >= 0)
> +		rte_log_set_level(nfp_logtype_init, RTE_LOG_NOTICE);
> +	nfp_logtype_driver = rte_log_register("pmd.nfp.driver");
> +	if (nfp_logtype_driver >= 0)
> +		rte_log_set_level(nfp_logtype_driver, RTE_LOG_NOTICE);
> +}
>  /*
>   * Local variables:
>   * c-file-style: "Linux"
> diff --git a/drivers/net/nfp/nfp_net_logs.h b/drivers/net/nfp/nfp_net_logs.h
> index 0b966e431f7b..618aaca1d31e 100644
> --- a/drivers/net/nfp/nfp_net_logs.h
> +++ b/drivers/net/nfp/nfp_net_logs.h
> @@ -36,14 +36,10 @@
>  
>  #define RTE_LIBRTE_NFP_NET_DEBUG_INIT 1

We can remove this now.

Also there is a build error in existing code, because of logging controlled by
this macro instead of config options the existing build scripts not able to
catch it, that build error also needs to be fixed with this patch (or before
this one)

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

* Re: [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging Stephen Hemminger
@ 2017-12-20  1:53   ` Ferruh Yigit
  2017-12-20 18:58     ` Stephen Hemminger
  0 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2017-12-20  1:53 UTC (permalink / raw)
  To: Stephen Hemminger, dev

On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> All PMD should be using dynamic log levels.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  config/common_base           |  1 -
>  drivers/net/avp/avp_ethdev.c | 10 ++++++++++
>  drivers/net/avp/avp_logs.h   |  9 ++++-----
>  3 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/config/common_base b/config/common_base
> index e74febef4848..f775ec96184c 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -441,7 +441,6 @@ CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n
>  CONFIG_RTE_LIBRTE_AVP_PMD=n
>  CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n
>  CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n
> -CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y
>  CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
>  
>  #
> diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
> index 9b342bfa3ae8..deb6f355d3ef 100644
> --- a/drivers/net/avp/avp_ethdev.c
> +++ b/drivers/net/avp/avp_ethdev.c
> @@ -60,6 +60,7 @@
>  
>  #include "avp_logs.h"
>  
> +int avp_logtype_driver;
>  
>  static int avp_dev_create(struct rte_pci_device *pci_dev,
>  			  struct rte_eth_dev *eth_dev);
> @@ -2312,3 +2313,12 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
>  
>  RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
>  RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
> +
> +RTE_INIT(avp_init_log);
> +static void
> +avp_init_log(void)
> +{
> +	avp_logtype_driver = rte_log_register("pmd.avp.driver");
> +	if (avp_logtype_driver >= 0)
> +		rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
> +}

This can be done later as well but what do you think creating a macro [1], so
that driver part can become just:

PMD_INIT_LOG(avp, init, NOTICE);



[1] something like:
 #define INIT_LOG_VAR_NAME(pmd, type)   logtype_ ## pmd ## _ ## type
 #define INIT_LOG_FUNC_NAME(pmd, type)  log_ ## pmd ## _ ## type

 #define PMD_INIT_LOG(pmd, type, level)                                \
        int INIT_LOG_VAR_NAME(pmd, type);                       \
        RTE_INIT(INIT_LOG_FUNC_NAME(pmd, type));                \
        static void INIT_LOG_FUNC_NAME(pmd, type)(void)                 \
        {                                                       \
                INIT_LOG_VAR_NAME(pmd, type) = rte_log_register("pmd."
RTE_STR(pmd) "." RTE_STR(type)); \
                if (INIT_LOG_VAR_NAME(pmd, type) > 0)           \
                        rte_log_set_level(INIT_LOG_VAR_NAME(pmd, type),
RTE_LOG_##level); \
        }

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

* Re: [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging
  2017-12-20  1:53   ` Ferruh Yigit
@ 2017-12-20 18:58     ` Stephen Hemminger
  2017-12-21 18:02       ` Ferruh Yigit
  0 siblings, 1 reply; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-20 18:58 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, 19 Dec 2017 17:53:50 -0800
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> > All PMD should be using dynamic log levels.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> >  config/common_base           |  1 -
> >  drivers/net/avp/avp_ethdev.c | 10 ++++++++++
> >  drivers/net/avp/avp_logs.h   |  9 ++++-----
> >  3 files changed, 14 insertions(+), 6 deletions(-)
> > 
> > diff --git a/config/common_base b/config/common_base
> > index e74febef4848..f775ec96184c 100644
> > --- a/config/common_base
> > +++ b/config/common_base
> > @@ -441,7 +441,6 @@ CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n
> >  CONFIG_RTE_LIBRTE_AVP_PMD=n
> >  CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n
> >  CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n
> > -CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y
> >  CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
> >  
> >  #
> > diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
> > index 9b342bfa3ae8..deb6f355d3ef 100644
> > --- a/drivers/net/avp/avp_ethdev.c
> > +++ b/drivers/net/avp/avp_ethdev.c
> > @@ -60,6 +60,7 @@
> >  
> >  #include "avp_logs.h"
> >  
> > +int avp_logtype_driver;
> >  
> >  static int avp_dev_create(struct rte_pci_device *pci_dev,
> >  			  struct rte_eth_dev *eth_dev);
> > @@ -2312,3 +2313,12 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
> >  
> >  RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
> >  RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
> > +
> > +RTE_INIT(avp_init_log);
> > +static void
> > +avp_init_log(void)
> > +{
> > +	avp_logtype_driver = rte_log_register("pmd.avp.driver");
> > +	if (avp_logtype_driver >= 0)
> > +		rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
> > +}  
> 
> This can be done later as well but what do you think creating a macro [1], so
> that driver part can become just:
> 
> PMD_INIT_LOG(avp, init, NOTICE);
> 
> 
> 
> [1] something like:
>  #define INIT_LOG_VAR_NAME(pmd, type)   logtype_ ## pmd ## _ ## type
>  #define INIT_LOG_FUNC_NAME(pmd, type)  log_ ## pmd ## _ ## type
> 
>  #define PMD_INIT_LOG(pmd, type, level)                                \
>         int INIT_LOG_VAR_NAME(pmd, type);                       \
>         RTE_INIT(INIT_LOG_FUNC_NAME(pmd, type));                \
>         static void INIT_LOG_FUNC_NAME(pmd, type)(void)                 \
>         {                                                       \
>                 INIT_LOG_VAR_NAME(pmd, type) = rte_log_register("pmd."
> RTE_STR(pmd) "." RTE_STR(type)); \
>                 if (INIT_LOG_VAR_NAME(pmd, type) > 0)           \
>                         rte_log_set_level(INIT_LOG_VAR_NAME(pmd, type),
> RTE_LOG_##level); \
>         }

That macro is a little complex.  Also, for better or worse, the current
logging is done on a per driver basis. If we want to do something fancier
it should be in common EAL core.

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

* Re: [dpdk-dev] [PATCH 02/11] bnx2x: implement dynamic logging
  2017-12-20  1:51   ` Ferruh Yigit
@ 2017-12-20 18:58     ` Stephen Hemminger
  0 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-20 18:58 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, 19 Dec 2017 17:51:46 -0800
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> > Replace compile time option for init and driver log with
> > dynamic value.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> >  config/common_base               |  2 --
> >  doc/guides/nics/bnx2x.rst        |  8 --------
> >  drivers/net/bnx2x/bnx2x_ethdev.c | 15 +++++++++++++++
> >  drivers/net/bnx2x/bnx2x_logs.h   | 17 ++++++-----------
> >  4 files changed, 21 insertions(+), 21 deletions(-)
> > 
> > diff --git a/config/common_base b/config/common_base
> > index f775ec96184c..82d1f9ac47ef 100644
> > --- a/config/common_base
> > +++ b/config/common_base
> > @@ -244,8 +244,6 @@ CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8
> >  # Compile burst-oriented Broadcom PMD driver
> >  #
> >  CONFIG_RTE_LIBRTE_BNX2X_PMD=n
> > -CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n  
> 
> There are a few "#ifdef RTE_LIBRTE_BNX2X_DEBUG" usage remains in the code which
> is causing build error.

Ok, I didn't see that. Will remove the ifdefs

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

* Re: [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it)
  2017-12-20  1:51 ` [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Ferruh Yigit
@ 2017-12-20 18:59   ` Stephen Hemminger
  0 siblings, 0 replies; 36+ messages in thread
From: Stephen Hemminger @ 2017-12-20 18:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, 19 Dec 2017 17:51:22 -0800
Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
> > This patch set implements dynamic logging for 11 drivers.
> > All these patches are compile tested only. I don't have
> > access to most of this hardware.
> > 
> > It makes more sense to "just do it" for dynamic logging rather
> > than keeping TODO lists in the documentation and expecting the
> > vendors to fix their own code. The advantage of common repository
> > is that global changes can be done.  
> 
> Hi Stephen,
> 
> Thank you for the update, there a few minor comments in relevant patches, except
> from them set lgtm.
> 
> Overall do you think keeping todo list is a bad idea?
> There are a few more issues like this and I am not sure how to communicate them
> with PMD maintainers, any suggestion is welcome.

Asking maintainers to fix things doesn't work well.
The active ones such as Intel just do it anyway, and the inactive
ones will never see it!

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

* Re: [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging
  2017-12-20 18:58     ` Stephen Hemminger
@ 2017-12-21 18:02       ` Ferruh Yigit
  2017-12-22 13:45         ` Olivier MATZ
  0 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2017-12-21 18:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On 12/20/2017 10:58 AM, Stephen Hemminger wrote:
> On Tue, 19 Dec 2017 17:53:50 -0800
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 12/18/2017 10:38 PM, Stephen Hemminger wrote:
>>> All PMD should be using dynamic log levels.
>>>
>>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

<...>

>>> @@ -2312,3 +2313,12 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
>>>  
>>>  RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
>>>  RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
>>> +
>>> +RTE_INIT(avp_init_log);
>>> +static void
>>> +avp_init_log(void)
>>> +{
>>> +	avp_logtype_driver = rte_log_register("pmd.avp.driver");
>>> +	if (avp_logtype_driver >= 0)
>>> +		rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
>>> +}  
>>
>> This can be done later as well but what do you think creating a macro [1], so
>> that driver part can become just:
>>
>> PMD_INIT_LOG(avp, init, NOTICE);
>>
>>
>>
>> [1] something like:
>>  #define INIT_LOG_VAR_NAME(pmd, type)   logtype_ ## pmd ## _ ## type
>>  #define INIT_LOG_FUNC_NAME(pmd, type)  log_ ## pmd ## _ ## type
>>
>>  #define PMD_INIT_LOG(pmd, type, level)                                \
>>         int INIT_LOG_VAR_NAME(pmd, type);                       \
>>         RTE_INIT(INIT_LOG_FUNC_NAME(pmd, type));                \
>>         static void INIT_LOG_FUNC_NAME(pmd, type)(void)                 \
>>         {                                                       \
>>                 INIT_LOG_VAR_NAME(pmd, type) = rte_log_register("pmd."
>> RTE_STR(pmd) "." RTE_STR(type)); \
>>                 if (INIT_LOG_VAR_NAME(pmd, type) > 0)           \
>>                         rte_log_set_level(INIT_LOG_VAR_NAME(pmd, type),
>> RTE_LOG_##level); \
>>         }
> 
> That macro is a little complex.  Also, for better or worse, the current
> logging is done on a per driver basis. If we want to do something fancier
> it should be in common EAL core.

Of course, my intention was putting it into rte_log.h so updates in each driver
will be minimal. But this can be done better to cover library updates as well.

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

* Re: [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging
  2017-12-21 18:02       ` Ferruh Yigit
@ 2017-12-22 13:45         ` Olivier MATZ
  0 siblings, 0 replies; 36+ messages in thread
From: Olivier MATZ @ 2017-12-22 13:45 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Stephen Hemminger, dev

On Thu, Dec 21, 2017 at 10:02:14AM -0800, Ferruh Yigit wrote:
> On 12/20/2017 10:58 AM, Stephen Hemminger wrote:
> >> [1] something like:
> >>  #define INIT_LOG_VAR_NAME(pmd, type)   logtype_ ## pmd ## _ ## type
> >>  #define INIT_LOG_FUNC_NAME(pmd, type)  log_ ## pmd ## _ ## type
> >>
> >>  #define PMD_INIT_LOG(pmd, type, level)                                \
> >>         int INIT_LOG_VAR_NAME(pmd, type);                       \
> >>         RTE_INIT(INIT_LOG_FUNC_NAME(pmd, type));                \
> >>         static void INIT_LOG_FUNC_NAME(pmd, type)(void)                 \
> >>         {                                                       \
> >>                 INIT_LOG_VAR_NAME(pmd, type) = rte_log_register("pmd."
> >> RTE_STR(pmd) "." RTE_STR(type)); \
> >>                 if (INIT_LOG_VAR_NAME(pmd, type) > 0)           \
> >>                         rte_log_set_level(INIT_LOG_VAR_NAME(pmd, type),
> >> RTE_LOG_##level); \
> >>         }
> > 
> > That macro is a little complex.  Also, for better or worse, the current
> > logging is done on a per driver basis. If we want to do something fancier
> > it should be in common EAL core.
> 
> Of course, my intention was putting it into rte_log.h so updates in each driver
> will be minimal. But this can be done better to cover library updates as well.

It's a good idea.

Below is another proposition (untested) that panics if
rte_log_register() fails, and that defines a static variable with a
predefined name.

 #define RTE_LOG_TYPE_REGISTER(name, level)                              \
         static int name##_log_type;                                     \
         __attribute__((constructor, used))                              \
         static void rte_log_register_##name(void)                       \
         {                                                               \
                 name##_log_type = rte_log_register(#name);              \
                 RTE_VERIFY(name##_log_type >= 0);                       \
                 rte_log_set_level(name##_log_type, level);              \
         }

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

* Re: [dpdk-dev] [PATCH 06/11] virtio: implement dynamic logging
  2017-12-19  6:38 ` [dpdk-dev] [PATCH 06/11] virtio: " Stephen Hemminger
@ 2018-01-09  9:18   ` Maxime Coquelin
  0 siblings, 0 replies; 36+ messages in thread
From: Maxime Coquelin @ 2018-01-09  9:18 UTC (permalink / raw)
  To: Stephen Hemminger, dev



On 12/19/2017 07:38 AM, Stephen Hemminger wrote:
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   config/common_base                 |  2 --
>   drivers/net/virtio/virtio_ethdev.c | 15 +++++++++++++++
>   drivers/net/virtio/virtio_logs.h   | 19 +++++++------------
>   3 files changed, 22 insertions(+), 14 deletions(-)

Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

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

* [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging
  2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
                   ` (11 preceding siblings ...)
  2017-12-20  1:51 ` [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Ferruh Yigit
@ 2018-01-09 12:10 ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 02/12] net/bnx2x: " Ferruh Yigit
                     ` (11 more replies)
  12 siblings, 12 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

All PMD should be using dynamic log levels.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base           |  1 -
 drivers/net/avp/avp_ethdev.c | 10 ++++++++++
 drivers/net/avp/avp_logs.h   |  9 ++++-----
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/config/common_base b/config/common_base
index b8ee8f91c..bee31e752 100644
--- a/config/common_base
+++ b/config/common_base
@@ -440,7 +440,6 @@ CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n
 CONFIG_RTE_LIBRTE_AVP_PMD=n
 CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y
 CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
 
 #
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 9b342bfa3..deb6f355d 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -60,6 +60,7 @@
 
 #include "avp_logs.h"
 
+int avp_logtype_driver;
 
 static int avp_dev_create(struct rte_pci_device *pci_dev,
 			  struct rte_eth_dev *eth_dev);
@@ -2312,3 +2313,12 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev)
 
 RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
+
+RTE_INIT(avp_init_log);
+static void
+avp_init_log(void)
+{
+	avp_logtype_driver = rte_log_register("pmd.avp.driver");
+	if (avp_logtype_driver >= 0)
+		rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/avp/avp_logs.h b/drivers/net/avp/avp_logs.h
index 252cab7da..e29394d58 100644
--- a/drivers/net/avp/avp_logs.h
+++ b/drivers/net/avp/avp_logs.h
@@ -49,11 +49,10 @@
 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_AVP_DEBUG_DRIVER
+extern int avp_logtype_driver;
+
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #endif /* _AVP_LOGS_H_ */
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 02/12] net/bnx2x: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 03/12] net/vmxnet3: " Ferruh Yigit
                     ` (10 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Harish Patil,
	Rasesh Mody, John McNamara, Marko Kovacevic
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Replace compile time option for init and driver log with
dynamic value.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

---
v2: remove remaining RTE_LIBRTE_BNX2X_DEBUG usage
---
 config/common_base               |  2 --
 doc/guides/nics/bnx2x.rst        |  8 --------
 drivers/net/bnx2x/bnx2x.c        |  4 ----
 drivers/net/bnx2x/bnx2x_ethdev.c | 15 +++++++++++++++
 drivers/net/bnx2x/bnx2x_logs.h   | 17 ++++++-----------
 5 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/config/common_base b/config/common_base
index bee31e752..5d40feded 100644
--- a/config/common_base
+++ b/config/common_base
@@ -243,8 +243,6 @@ CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8
 # Compile burst-oriented Broadcom PMD driver
 #
 CONFIG_RTE_LIBRTE_BNX2X_PMD=n
-CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n
-CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n
diff --git a/doc/guides/nics/bnx2x.rst b/doc/guides/nics/bnx2x.rst
index fbfc048e0..b1fec8a36 100644
--- a/doc/guides/nics/bnx2x.rst
+++ b/doc/guides/nics/bnx2x.rst
@@ -102,14 +102,6 @@ enabling debugging options may affect system performance.
   to 'y'. Also, in order for firmware binary to load user will need zlib devel
   package installed.
 
-- ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG`` (default **n**)
-
-  Toggle display of generic debugging messages.
-
-- ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT`` (default **n**)
-
-  Toggle display of initialization related messages.
-
 - ``CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX`` (default **n**)
 
   Toggle display of transmit fast path run-time messages.
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 1b36cab32..fb02d0f35 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -1130,9 +1130,7 @@ static void
 bnx2x_sp_event(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
 	     union eth_rx_cqe *rr_cqe)
 {
-#ifdef RTE_LIBRTE_BNX2X_DEBUG
 	int cid = SW_CID(rr_cqe->ramrod_cqe.conn_and_cmd_data);
-#endif
 	int command = CQE_CMD(rr_cqe->ramrod_cqe.conn_and_cmd_data);
 	enum ecore_queue_cmd drv_cmd = ECORE_Q_CMD_MAX;
 	struct ecore_queue_sp_obj *q_obj = &BNX2X_SP_OBJ(sc, fp).q_obj;
@@ -7547,9 +7545,7 @@ static void bnx2x_probe_pci_caps(struct bnx2x_softc *sc)
 
 	struct bnx2x_pci_cap *caps;
 	uint16_t link_status;
-#ifdef RTE_LIBRTE_BNX2X_DEBUG
 	int reg = 0;
-#endif
 
 	/* check if PCI Power Management is enabled */
 	caps = pci_find_cap(sc, PCIY_PMG, BNX2X_PCI_CAP);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 95861a06e..483d5a17c 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -14,6 +14,9 @@
 #include <rte_dev.h>
 #include <rte_ethdev_pci.h>
 
+int bnx2x_logtype_init;
+int bnx2x_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -687,3 +690,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_bnx2x, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci");
+
+RTE_INIT(bnx2x_init_log);
+static void
+bnx2x_init_log(void)
+{
+	bnx2x_logtype_init = rte_log_register("pmd.bnx2x.init");
+	if (bnx2x_logtype_init >= 0)
+		rte_log_set_level(bnx2x_logtype_init, RTE_LOG_NOTICE);
+	bnx2x_logtype_driver = rte_log_register("pmd.bnx2x.driver");
+	if (bnx2x_logtype_driver >= 0)
+		rte_log_set_level(bnx2x_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h
index dff014d7e..08c1b764f 100644
--- a/drivers/net/bnx2x/bnx2x_logs.h
+++ b/drivers/net/bnx2x/bnx2x_logs.h
@@ -11,14 +11,12 @@
 #ifndef _PMD_LOGS_H_
 #define _PMD_LOGS_H_
 
+extern int bnx2x_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_BNX2X_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -41,12 +39,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_BNX2X_DEBUG
+extern int bnx2x_logtype_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
+	rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
@@ -58,5 +54,4 @@
 #define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-
 #endif /* _PMD_LOGS_H_ */
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 03/12] net/vmxnet3: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 02/12] net/bnx2x: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 04/12] net/ixgbe: " Ferruh Yigit
                     ` (9 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Shrikrishna Khare
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Replace compile time configuration with runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                   |  2 --
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 15 +++++++++++++++
 drivers/net/vmxnet3/vmxnet3_logs.h   | 17 ++++++-----------
 3 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/config/common_base b/config/common_base
index 5d40feded..1dcccb3db 100644
--- a/config/common_base
+++ b/config/common_base
@@ -379,11 +379,9 @@ CONFIG_RTE_VIRTIO_USER=n
 # Compile burst-oriented VMXNET3 PMD driver
 #
 CONFIG_RTE_LIBRTE_VMXNET3_PMD=y
-CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n
 
 #
 # Compile example software rings based PMD
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c2f12cdf2..537e8ddd3 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -77,6 +77,9 @@ static void vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
 				 struct ether_addr *mac_addr);
 static void vmxnet3_interrupt_handler(void *param);
 
+int vmxnet3_logtype_init;
+int vmxnet3_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -1345,3 +1348,15 @@ vmxnet3_interrupt_handler(void *param)
 RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(vmxnet3_init_log);
+static void
+vmxnet3_init_log(void)
+{
+	vmxnet3_logtype_init = rte_log_register("pmd.vmxnet3.init");
+	if (vmxnet3_logtype_init >= 0)
+		rte_log_set_level(vmxnet3_logtype_init, RTE_LOG_NOTICE);
+	vmxnet3_logtype_driver = rte_log_register("pmd.vmxnet3.driver");
+	if (vmxnet3_logtype_driver >= 0)
+		rte_log_set_level(vmxnet3_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 95252a933..74154e3a1 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -5,14 +5,11 @@
 #ifndef _VMXNET3_LOGS_H_
 #define _VMXNET3_LOGS_H_
 
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_INIT
+extern int vmxnet3_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while(0)
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_VMXNET3_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -35,11 +32,9 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
+extern int vmxnet3_logtype_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, vmxnet3_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _VMXNET3_LOGS_H_ */
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 04/12] net/ixgbe: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 02/12] net/bnx2x: " Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 03/12] net/vmxnet3: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 05/12] net/e1000: " Ferruh Yigit
                     ` (8 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Wenzhuo Lu,
	Konstantin Ananyev
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Convert all drivers possible to dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base               |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.c | 15 +++++++++++++++
 drivers/net/ixgbe/ixgbe_logs.h   | 16 ++++++----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 1dcccb3db..be49cc1e9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -188,11 +188,9 @@ CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 # Compile burst-oriented IXGBE PMD driver
 #
 CONFIG_RTE_LIBRTE_IXGBE_PMD=y
-CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
 CONFIG_RTE_IXGBE_INC_VECTOR=y
 CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 43e0132f8..2e8e6553b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -398,6 +398,9 @@ static void ixgbe_l2_tunnel_conf(struct rte_eth_dev *dev);
 		(r) = (h)->bitmap[idx] >> bit & 1;\
 	} while (0)
 
+int ixgbe_logtype_init;
+int ixgbe_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -8415,3 +8418,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci");
+
+RTE_INIT(ixgbe_init_log);
+static void
+ixgbe_init_log(void)
+{
+	ixgbe_logtype_init = rte_log_register("pmd.ixgbe.init");
+	if (ixgbe_logtype_init >= 0)
+		rte_log_set_level(ixgbe_logtype_init, RTE_LOG_NOTICE);
+	ixgbe_logtype_driver = rte_log_register("pmd.ixgbe.driver");
+	if (ixgbe_logtype_driver >= 0)
+		rte_log_set_level(ixgbe_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index d42a647fb..dc73e9bde 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -5,14 +5,12 @@
 #ifndef _IXGBE_LOGS_H_
 #define _IXGBE_LOGS_H_
 
+extern int ixgbe_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, ixgbe_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_IXGBE_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -35,12 +33,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_IXGBE_DEBUG_DRIVER
+extern int ixgbe_logtype_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
+	rte_log(RTE_LOG_ ## level, ixgbe_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 05/12] net/e1000: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (2 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 04/12] net/ixgbe: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 06/12] net/virtio: " Ferruh Yigit
                     ` (7 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Wenzhuo Lu
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  2 --
 drivers/net/e1000/e1000_logs.h | 16 ++++++----------
 drivers/net/e1000/em_ethdev.c  | 15 +++++++++++++++
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index be49cc1e9..34f629adf 100644
--- a/config/common_base
+++ b/config/common_base
@@ -177,11 +177,9 @@ CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n
 #
 CONFIG_RTE_LIBRTE_EM_PMD=y
 CONFIG_RTE_LIBRTE_IGB_PMD=y
-CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n
 
 #
diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h
index 41087458e..50348e9ed 100644
--- a/drivers/net/e1000/e1000_logs.h
+++ b/drivers/net/e1000/e1000_logs.h
@@ -5,14 +5,12 @@
 #ifndef _E1000_LOGS_H_
 #define _E1000_LOGS_H_
 
+extern int e1000_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_E1000_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -35,12 +33,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-#ifdef RTE_LIBRTE_E1000_DEBUG_DRIVER
+extern int e1000_logtype_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
+	rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index f457be55e..4a77ec981 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -105,6 +105,9 @@ static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 
 static enum e1000_fc_mode em_fc_setting = e1000_fc_full;
 
+int e1000_logtype_init;
+int e1000_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -1846,3 +1849,15 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(e1000_init_log);
+static void
+e1000_init_log(void)
+{
+	e1000_logtype_init = rte_log_register("pmd.e1000.init");
+	if (e1000_logtype_init >= 0)
+		rte_log_set_level(e1000_logtype_init, RTE_LOG_NOTICE);
+	e1000_logtype_driver = rte_log_register("pmd.e1000.driver");
+	if (e1000_logtype_driver >= 0)
+		rte_log_set_level(e1000_logtype_driver, RTE_LOG_NOTICE);
+}
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 06/12] net/virtio: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (3 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 05/12] net/e1000: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled Ferruh Yigit
                     ` (6 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Yuanhan Liu,
	Maxime Coquelin, Tiwei Bie
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 config/common_base                 |  2 --
 drivers/net/virtio/virtio_ethdev.c | 15 +++++++++++++++
 drivers/net/virtio/virtio_logs.h   | 19 +++++++------------
 3 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/config/common_base b/config/common_base
index 34f629adf..884d8695b 100644
--- a/config/common_base
+++ b/config/common_base
@@ -360,10 +360,8 @@ CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n
 # Compile burst-oriented VIRTIO PMD driver
 #
 CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
-CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n
 
 #
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b1e4cc152..ee0cb3dd2 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -77,6 +77,9 @@ static int virtio_dev_queue_stats_mapping_set(
 	uint8_t stat_idx,
 	uint8_t is_rx);
 
+int virtio_logtype_init;
+int virtio_logtype_driver;
+
 /*
  * The set of PCI devices this driver supports
  */
@@ -2043,3 +2046,15 @@ __rte_unused uint8_t is_rx)
 RTE_PMD_EXPORT_NAME(net_virtio, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(virtio_init_log);
+static void
+virtio_init_log(void)
+{
+	virtio_logtype_init = rte_log_register("pmd.virtio.init");
+	if (virtio_logtype_init >= 0)
+		rte_log_set_level(virtio_logtype_init, RTE_LOG_NOTICE);
+	virtio_logtype_driver = rte_log_register("pmd.virtio.driver");
+	if (virtio_logtype_driver >= 0)
+		rte_log_set_level(virtio_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/virtio/virtio_logs.h b/drivers/net/virtio/virtio_logs.h
index b52de73c9..9b1b1defc 100644
--- a/drivers/net/virtio/virtio_logs.h
+++ b/drivers/net/virtio/virtio_logs.h
@@ -7,14 +7,12 @@
 
 #include <rte_log.h>
 
-#ifdef RTE_LIBRTE_VIRTIO_DEBUG_INIT
+extern int virtio_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, virtio_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
+
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while(0)
-#define PMD_INIT_FUNC_TRACE() do { } while(0)
-#endif
 
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -30,12 +28,9 @@
 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
 #endif
 
-
-#ifdef RTE_LIBRTE_VIRTIO_DEBUG_DRIVER
+extern int virtio_logtype_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, virtio_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _VIRTIO_LOGS_H_ */
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (4 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 06/12] net/virtio: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-10 12:09     ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 08/12] net/nfp: implement dynamic logging Ferruh Yigit
                     ` (5 subsequent siblings)
  11 siblings, 1 reply; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Alejandro Lucero
  Cc: dev, Ferruh Yigit, Stephen Hemminger, stable

build error:
.../drivers/net/nfp/nfp_net.c:1497:8: error:
‘dev_data’ undeclared (first use in this function); did you mean
‘dev_t’?
        dev_data->port_id);
	        ^

Fixes: 7ccf1115f0ab ("net/nfp: fix jumbo settings")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/nfp/nfp_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index b5f24e36e..198db6733 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1494,7 +1494,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	/* mtu setting is forbidden if port is started */
 	if (dev->data->dev_started) {
 		PMD_DRV_LOG(ERR, "port %d must be stopped before configuration",
-			    dev_data->port_id);
+			    dev->data->port_id);
 		return -EBUSY;
 	}
 
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 08/12] net/nfp: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (5 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 09/12] net/fm10k: " Ferruh Yigit
                     ` (4 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Alejandro Lucero
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

---
v2: remove unsed macro RTE_LIBRTE_NFP_NET_DEBUG_INIT
---
 config/common_base             |  3 ++-
 drivers/net/nfp/nfp_net.c      | 14 ++++++++++++++
 drivers/net/nfp/nfp_net_logs.h | 24 ++++++------------------
 3 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/config/common_base b/config/common_base
index 884d8695b..3aad34b58 100644
--- a/config/common_base
+++ b/config/common_base
@@ -266,7 +266,8 @@ CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n
 # Compile burst-oriented Netronome NFP PMD driver
 #
 CONFIG_RTE_LIBRTE_NFP_PMD=n
-CONFIG_RTE_LIBRTE_NFP_DEBUG=n
+CONFIG_RTE_LIBRTE_NFP_DEBUG_TX=n
+CONFIG_RTE_LIBRTE_NFP_DEBUG_RX=n
 
 #
 # Compile Marvell PMD driver
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 198db6733..4d7822f0b 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3085,6 +3085,9 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	return ret;
 }
 
+int nfp_logtype_init;
+int nfp_logtype_driver;
+
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
@@ -3158,6 +3161,17 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
 
+RTE_INIT(nfp_init_log);
+static void
+nfp_init_log(void)
+{
+	nfp_logtype_init = rte_log_register("pmd.nfp.init");
+	if (nfp_logtype_init >= 0)
+		rte_log_set_level(nfp_logtype_init, RTE_LOG_NOTICE);
+	nfp_logtype_driver = rte_log_register("pmd.nfp.driver");
+	if (nfp_logtype_driver >= 0)
+		rte_log_set_level(nfp_logtype_driver, RTE_LOG_NOTICE);
+}
 /*
  * Local variables:
  * c-file-style: "Linux"
diff --git a/drivers/net/nfp/nfp_net_logs.h b/drivers/net/nfp/nfp_net_logs.h
index 0b966e431..3fe24e96b 100644
--- a/drivers/net/nfp/nfp_net_logs.h
+++ b/drivers/net/nfp/nfp_net_logs.h
@@ -34,16 +34,10 @@
 
 #include <rte_log.h>
 
-#define RTE_LIBRTE_NFP_NET_DEBUG_INIT 1
-
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_INIT
+extern int nfp_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_LOG(level, fmt, args...) do { } while (0)
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -55,21 +49,15 @@
 #ifdef RTE_LIBRTE_NFP_NET_DEBUG_TX
 #define PMD_TX_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s() tx: " fmt, __func__, ## args)
+#define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
 #else
 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
+#define ASSERT(x) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_DRIVER
+extern int nfp_logtype_driver;
 #define PMD_DRV_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
-
-#ifdef RTE_LIBRTE_NFP_NET_DEBUG_INIT
-#define ASSERT(x) if (!(x)) rte_panic("NFP_NET: x")
-#else
-#define ASSERT(x) do { } while (0)
-#endif
+	rte_log(RTE_LOG_ ## level, nfp_logtype_driver, \
+		"%s(): " fmt, __func__, ## args)
 
 #endif /* _NFP_NET_LOGS_H_ */
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 09/12] net/fm10k: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (6 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 08/12] net/nfp: implement dynamic logging Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 10/12] net/ena: " Ferruh Yigit
                     ` (3 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Qi Zhang, Xiao Wang
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base               |  2 --
 drivers/net/fm10k/fm10k_ethdev.c | 15 +++++++++++++++
 drivers/net/fm10k/fm10k_logs.h   | 16 ++++++----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 3aad34b58..0cdaadea6 100644
--- a/config/common_base
+++ b/config/common_base
@@ -213,11 +213,9 @@ CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1
 # Compile burst-oriented FM10K PMD
 #
 CONFIG_RTE_LIBRTE_FM10K_PMD=y
-CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y
 CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y
 
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index c82337255..3db21adae 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -40,6 +40,9 @@
 #define GLORT_FD_MASK    GLORT_PF_MASK
 #define GLORT_FD_INDEX   GLORT_FD_Q_BASE
 
+int fm10k_logtype_init;
+int fm10k_logtype_driver;
+
 static void fm10k_close_mbx_service(struct fm10k_hw *hw);
 static void fm10k_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static void fm10k_dev_promiscuous_disable(struct rte_eth_dev *dev);
@@ -3233,3 +3236,15 @@ static struct rte_pci_driver rte_pmd_fm10k = {
 RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k);
 RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(fm10k_init_log);
+static void
+fm10k_init_log(void)
+{
+	fm10k_logtype_init = rte_log_register("pmd.fm10k.init");
+	if (fm10k_logtype_init >= 0)
+		rte_log_set_level(fm10k_logtype_init, RTE_LOG_NOTICE);
+	fm10k_logtype_driver = rte_log_register("pmd.fm10k.driver");
+	if (fm10k_logtype_driver >= 0)
+		rte_log_set_level(fm10k_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/fm10k/fm10k_logs.h b/drivers/net/fm10k/fm10k_logs.h
index ab8303cd8..df56a51ca 100644
--- a/drivers/net/fm10k/fm10k_logs.h
+++ b/drivers/net/fm10k/fm10k_logs.h
@@ -7,14 +7,12 @@
 
 #include <rte_log.h>
 
+extern int fm10k_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args)
+	rte_log(RTE_LOG_ ## level, fm10k_logtype_init, \
+		"%s(): " fmt "\n", __func__, ##args)
 
-#ifdef RTE_LIBRTE_FM10K_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -37,12 +35,10 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_FM10K_DEBUG_DRIVER
+extern int fm10k_logtype_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
+	rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
+		__func__, ## args)
 
 #define PMD_DRV_LOG(level, fmt, args...) \
 	PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 10/12] net/ena: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (7 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 09/12] net/fm10k: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 11/12] net/qede: " Ferruh Yigit
                     ` (2 subsequent siblings)
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

Use dynamic rather static configuration for logging.
Also include ena_assert_msg.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  1 -
 drivers/net/ena/ena_ethdev.c   | 15 +++++++++++++++
 drivers/net/ena/ena_logs.h     | 14 ++++++--------
 drivers/net/ena/ena_platform.h |  2 +-
 4 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/config/common_base b/config/common_base
index 0cdaadea6..5e7b9be0f 100644
--- a/config/common_base
+++ b/config/common_base
@@ -169,7 +169,6 @@ CONFIG_RTE_LIBRTE_ENA_PMD=y
 CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n
 
 #
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 22db8951f..3f379a9b2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -178,6 +178,9 @@ static const struct ena_stats ena_stats_ena_com_strings[] = {
 #define	ENA_TX_OFFLOAD_NOTSUP_MASK	\
 	(PKT_TX_OFFLOAD_MASK ^ ENA_TX_OFFLOAD_MASK)
 
+int ena_logtype_init;
+int ena_logtype_driver;
+
 static const struct rte_pci_id pci_id_ena_map[] = {
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_VF) },
 	{ RTE_PCI_DEVICE(PCI_VENDOR_ID_AMAZON, PCI_DEVICE_ID_ENA_LLQ_VF) },
@@ -1814,3 +1817,15 @@ static struct rte_pci_driver rte_ena_pmd = {
 RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci");
+
+RTE_INIT(ena_init_log);
+static void
+ena_init_log(void)
+{
+	ena_logtype_init = rte_log_register("pmd.ena.init");
+	if (ena_logtype_init >= 0)
+		rte_log_set_level(ena_logtype_init, RTE_LOG_NOTICE);
+	ena_logtype_driver = rte_log_register("pmd.ena.driver");
+	if (ena_logtype_driver >= 0)
+		rte_log_set_level(ena_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/ena/ena_logs.h b/drivers/net/ena/ena_logs.h
index c6c8a41bd..2c0e91b65 100644
--- a/drivers/net/ena/ena_logs.h
+++ b/drivers/net/ena/ena_logs.h
@@ -34,10 +34,10 @@
 #ifndef _ENA_LOGS_H_
 #define _ENA_LOGS_H_
 
-#define RTE_LOGTYPE_ENA RTE_LOGTYPE_USER1
-
+extern int ena_logtype_init;
 #define PMD_INIT_LOG(level, fmt, args...) \
-	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+	rte_log(RTE_LOG_ ## level, ena_logtype_init, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #ifdef RTE_LIBRTE_ENA_DEBUG_RX
 #define PMD_RX_LOG(level, fmt, args...) \
@@ -60,11 +60,9 @@
 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
 #endif
 
-#ifdef RTE_LIBRTE_ENA_DEBUG_DRIVER
+extern int ena_logtype_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, ena_logtype_driver, \
+		"%s(): " fmt "\n", __func__, ## args)
 
 #endif /* _ENA_LOGS_H_ */
diff --git a/drivers/net/ena/ena_platform.h b/drivers/net/ena/ena_platform.h
index 0df82d6fd..a2239a92c 100644
--- a/drivers/net/ena/ena_platform.h
+++ b/drivers/net/ena/ena_platform.h
@@ -49,7 +49,7 @@
 #define ena_assert_msg(cond, msg)		\
 	do {					\
 		if (unlikely(!(cond))) {	\
-			RTE_LOG(ERR, ENA,	\
+			rte_log(RTE_LOG_ERR, ena_logtype_driver, \
 				"Assert failed on %s:%s:%d: ",	\
 				__FILE__, __func__, __LINE__);	\
 			rte_panic(msg);		\
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 11/12] net/qede: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (8 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 10/12] net/ena: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 12/12] net/liquidio: " Ferruh Yigit
  2018-01-09 12:23   ` [dpdk-dev] [PATCH v2 01/12] net/avp: " Ferruh Yigit
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Rasesh Mody,
	Harish Patil, Shahed Shaikh
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

This driver is mostly like others with slightly different logging
macros. The semantics were retained, with some minor reformatting.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base             |  2 --
 drivers/net/qede/qede_ethdev.c | 15 ++++++++++++
 drivers/net/qede/qede_logs.h   | 53 +++++++++++++++++++-----------------------
 3 files changed, 39 insertions(+), 31 deletions(-)

diff --git a/config/common_base b/config/common_base
index 5e7b9be0f..2eee92a01 100644
--- a/config/common_base
+++ b/config/common_base
@@ -397,9 +397,7 @@ CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
 # QLogic 10G/25G/40G/50G/100G PMD
 #
 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_TX=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 68e99c594..071c44110 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -11,6 +11,9 @@
 #include <rte_version.h>
 
 /* Globals */
+int qede_logtype_init;
+int qede_logtype_driver;
+
 static const struct qed_eth_ops *qed_ops;
 static int64_t timer_period = 1;
 
@@ -3125,3 +3128,15 @@ RTE_PMD_REGISTER_KMOD_DEP(net_qede, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci");
+
+RTE_INIT(qede_init_log);
+static void
+qede_init_log(void)
+{
+	qede_logtype_init = rte_log_register("pmd.qede.init");
+	if (qede_logtype_init >= 0)
+		rte_log_set_level(qede_logtype_init, RTE_LOG_NOTICE);
+	qede_logtype_driver = rte_log_register("pmd.qede.driver");
+	if (qede_logtype_driver >= 0)
+		rte_log_set_level(qede_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/qede/qede_logs.h b/drivers/net/qede/qede_logs.h
index 15821151c..b7ecf1c27 100644
--- a/drivers/net/qede/qede_logs.h
+++ b/drivers/net/qede/qede_logs.h
@@ -9,23 +9,25 @@
 #ifndef _QEDE_LOGS_H_
 #define _QEDE_LOGS_H_
 
-#define DP_ERR(p_dev, fmt, ...) \
-	rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, \
-		"[%s:%d(%s)]" fmt, \
-		  __func__, __LINE__, \
-		(p_dev)->name ? (p_dev)->name : "", \
+extern int qede_logtype_driver;
+
+#define DP_ERR(p_dev, fmt, ...)				\
+	rte_log(RTE_LOG_ERR, qede_logtype_driver,	\
+		"[%s:%d(%s)]" fmt,			\
+		__func__, __LINE__,			\
+		(p_dev)->name ? (p_dev)->name : "",	\
 		##__VA_ARGS__)
 
 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
 do { \
 	if (is_assert) \
-		rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD,\
+		rte_log(RTE_LOG_ERR, qede_logtype_driver,\
 			"[QEDE PMD: (%s)]%s:" fmt, \
 			(p_dev)->name ? (p_dev)->name : "", \
 			 __func__, \
 			##__VA_ARGS__); \
 	else \
-		rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
+		rte_log(RTE_LOG_NOTICE, qede_logtype_driver,\
 			"[QEDE PMD: (%s)]%s:" fmt, \
 			(p_dev)->name ? (p_dev)->name : "", \
 			 __func__, \
@@ -34,7 +36,7 @@ do { \
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
 #define DP_INFO(p_dev, fmt, ...) \
-	rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
+	rte_log(RTE_LOG_INFO, qede_logtype_driver, \
 		"[%s:%d(%s)]" fmt, \
 		__func__, __LINE__, \
 		(p_dev)->name ? (p_dev)->name : "", \
@@ -43,30 +45,23 @@ do { \
 #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) \
-		rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_PMD, \
-			"[%s:%d(%s)]" fmt, \
-		      __func__, __LINE__, \
-		      (p_dev)->name ? (p_dev)->name : "", \
-		      ##__VA_ARGS__); \
-} while (0)
-#else
-#define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
-#endif
+#define DP_VERBOSE(p_dev, module, fmt, ...)				\
+	do {								\
+		if ((p_dev)->dp_module & module)			\
+			rte_log(RTE_LOG_DEBUG, qede_logtype_driver,	\
+				"[%s:%d(%s)]" fmt,			\
+				__func__, __LINE__,			\
+				(p_dev)->name ? (p_dev)->name : "",	\
+				##__VA_ARGS__);				\
+	} while (0)
 
-#define PMD_INIT_LOG(level, edev, fmt, args...)	\
-	rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
-		"[qede_pmd: %s] %s() " fmt "\n", \
-	(edev)->name, __func__, ##args)
+extern int qede_logtype_init;
+#define PMD_INIT_LOG(level, edev, fmt, args...)		\
+	rte_log(RTE_LOG_ ## level, qede_logtype_init,	\
+		"[qede_pmd: %s] %s() " fmt "\n",	\
+		(edev)->name, __func__, ##args)
 
-#ifdef RTE_LIBRTE_QEDE_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
-#else
-#define PMD_INIT_FUNC_TRACE(edev) do { } while (0)
-#endif
 
 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
 #define PMD_TX_LOG(level, q, fmt, args...) \
-- 
2.14.3

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

* [dpdk-dev] [PATCH v2 12/12] net/liquidio: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (9 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 11/12] net/qede: " Ferruh Yigit
@ 2018-01-09 12:10   ` Ferruh Yigit
  2018-01-09 12:23   ` [dpdk-dev] [PATCH v2 01/12] net/avp: " Ferruh Yigit
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:10 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Shijith Thotton,
	Srisivasubramanian Srinivasan
  Cc: dev, Ferruh Yigit, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

This driver mostly uses the common pattern. Convert this to the
dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                |  2 --
 drivers/net/liquidio/lio_ethdev.c | 15 +++++++++++++++
 drivers/net/liquidio/lio_logs.h   | 20 ++++++++------------
 3 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/config/common_base b/config/common_base
index 2eee92a01..071bd0ec1 100644
--- a/config/common_base
+++ b/config/common_base
@@ -311,8 +311,6 @@ CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n
 # Compile burst-oriented Cavium LiquidIO PMD driver
 #
 CONFIG_RTE_LIBRTE_LIO_PMD=y
-CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n
-CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index 6b5d52ef7..b90d0545b 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -43,6 +43,9 @@
 #include "lio_ethdev.h"
 #include "lio_rxtx.h"
 
+int lio_logtype_init;
+int lio_logtype_driver;
+
 /* Default RSS key in use */
 static uint8_t lio_rss_key[40] = {
 	0x6D, 0x5A, 0x56, 0xDA, 0x25, 0x5B, 0x0E, 0xC2,
@@ -2210,3 +2213,15 @@ static struct rte_pci_driver rte_liovf_pmd = {
 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci");
+
+RTE_INIT(lio_init_log);
+static void
+lio_init_log(void)
+{
+	lio_logtype_init = rte_log_register("pmd.lio.init");
+	if (lio_logtype_init >= 0)
+		rte_log_set_level(lio_logtype_init, RTE_LOG_NOTICE);
+	lio_logtype_driver = rte_log_register("pmd.lio.driver");
+	if (lio_logtype_driver >= 0)
+		rte_log_set_level(lio_logtype_driver, RTE_LOG_NOTICE);
+}
diff --git a/drivers/net/liquidio/lio_logs.h b/drivers/net/liquidio/lio_logs.h
index a4c9ca4db..c6f9bd15b 100644
--- a/drivers/net/liquidio/lio_logs.h
+++ b/drivers/net/liquidio/lio_logs.h
@@ -34,8 +34,10 @@
 #ifndef _LIO_LOGS_H_
 #define _LIO_LOGS_H_
 
-#define lio_dev_printf(lio_dev, level, fmt, args...)			\
-	RTE_LOG(level, PMD, "%s" fmt, (lio_dev)->dev_string, ##args)
+extern int lio_logtype_driver;
+#define lio_dev_printf(lio_dev, level, fmt, args...)		\
+	rte_log(RTE_LOG_ ## level, lio_logtype_driver,		\
+		"%s" fmt, (lio_dev)->dev_string, ##args)
 
 #define lio_dev_info(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, INFO, "INFO: " fmt, ##args)
@@ -43,22 +45,16 @@
 #define lio_dev_err(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, ERR, "ERROR: %s() " fmt, __func__, ##args)
 
-#define PMD_INIT_LOG(level, fmt, args...) RTE_LOG(level, PMD, fmt, ## args)
+extern int lio_logtype_init;
+#define PMD_INIT_LOG(level, fmt, args...) \
+	rte_log(RTE_LOG_ ## level, lio_logtype_init, \
+		fmt, ## args)
 
 /* Enable these through config options */
-
-#ifdef RTE_LIBRTE_LIO_DEBUG_INIT
 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, "%s() >>\n", __func__)
-#else /* !RTE_LIBRTE_LIO_DEBUG_INIT */
-#define PMD_INIT_FUNC_TRACE() do { } while (0)
-#endif /* RTE_LIBRTE_LIO_DEBUG_INIT */
 
-#ifdef RTE_LIBRTE_LIO_DEBUG_DRIVER
 #define lio_dev_dbg(lio_dev, fmt, args...)				\
 	lio_dev_printf(lio_dev, DEBUG, "DEBUG: %s() " fmt, __func__, ##args)
-#else /* !RTE_LIBRTE_LIO_DEBUG_DRIVER */
-#define lio_dev_dbg(lio_dev, fmt, args...) do { } while (0)
-#endif /* RTE_LIBRTE_LIO_DEBUG_DRIVER */
 
 #ifdef RTE_LIBRTE_LIO_DEBUG_RX
 #define PMD_RX_LOG(lio_dev, level, fmt, args...)			\
-- 
2.14.3

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

* Re: [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging
  2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
                     ` (10 preceding siblings ...)
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 12/12] net/liquidio: " Ferruh Yigit
@ 2018-01-09 12:23   ` Ferruh Yigit
  11 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-09 12:23 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters; +Cc: dev, Stephen Hemminger

On 1/9/2018 12:10 PM, Ferruh Yigit wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
> 
> All PMD should be using dynamic log levels.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

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

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

* Re: [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled
  2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled Ferruh Yigit
@ 2018-01-10 12:09     ` Ferruh Yigit
  0 siblings, 0 replies; 36+ messages in thread
From: Ferruh Yigit @ 2018-01-10 12:09 UTC (permalink / raw)
  To: Thomas Monjalon, Allain Legacy, Matt Peters, Alejandro Lucero
  Cc: dev, Stephen Hemminger, stable

On 1/9/2018 12:10 PM, Ferruh Yigit wrote:
> build error:
> .../drivers/net/nfp/nfp_net.c:1497:8: error:
> ‘dev_data’ undeclared (first use in this function); did you mean
> ‘dev_t’?
>         dev_data->port_id);
> 	        ^
> 
> Fixes: 7ccf1115f0ab ("net/nfp: fix jumbo settings")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

This one squashed with the relevant commit in next-net.

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

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

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19  6:38 [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 01/11] avp: implement dynamic logging Stephen Hemminger
2017-12-20  1:53   ` Ferruh Yigit
2017-12-20 18:58     ` Stephen Hemminger
2017-12-21 18:02       ` Ferruh Yigit
2017-12-22 13:45         ` Olivier MATZ
2017-12-19  6:38 ` [dpdk-dev] [PATCH 02/11] bnx2x: " Stephen Hemminger
2017-12-20  1:51   ` Ferruh Yigit
2017-12-20 18:58     ` Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 03/11] vmxnet3: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 04/11] ixgbe: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 05/11] e1000: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 06/11] virtio: " Stephen Hemminger
2018-01-09  9:18   ` Maxime Coquelin
2017-12-19  6:38 ` [dpdk-dev] [PATCH 07/11] nfp: " Stephen Hemminger
2017-12-20  1:52   ` Ferruh Yigit
2017-12-19  6:38 ` [dpdk-dev] [PATCH 08/11] fm10k: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 09/11] ena: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 10/11] qede: " Stephen Hemminger
2017-12-19  6:38 ` [dpdk-dev] [PATCH 11/11] lio: " Stephen Hemminger
2017-12-20  1:51 ` [dpdk-dev] [PATCH 00/11] Dynamic logging (just do it) Ferruh Yigit
2017-12-20 18:59   ` Stephen Hemminger
2018-01-09 12:10 ` [dpdk-dev] [PATCH v2 01/12] net/avp: implement dynamic logging Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 02/12] net/bnx2x: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 03/12] net/vmxnet3: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 04/12] net/ixgbe: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 05/12] net/e1000: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 06/12] net/virtio: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 07/12] net/nfp: fix build when debug enabled Ferruh Yigit
2018-01-10 12:09     ` Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 08/12] net/nfp: implement dynamic logging Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 09/12] net/fm10k: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 10/12] net/ena: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 11/12] net/qede: " Ferruh Yigit
2018-01-09 12:10   ` [dpdk-dev] [PATCH v2 12/12] net/liquidio: " Ferruh Yigit
2018-01-09 12:23   ` [dpdk-dev] [PATCH v2 01/12] net/avp: " 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).