DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH v3 5/6] net/sfc: remove dedicated init log parameter
Date: Wed, 21 Mar 2018 11:28:20 +0000	[thread overview]
Message-ID: <1521631701-11282-6-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1521631701-11282-1-git-send-email-arybchenko@solarflare.com>

From: Ivan Malov <ivan.malov@oktetlabs.ru>

The previous patches in the set convert per-port
logging to use NOTICE level and make this level default.
This provides the possibility to remove the dedicated
toggle for init-related messages and merge init logging
with the main log type. In order to keep these logs silent
by default, INFO level should be used.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 doc/guides/nics/sfc_efx.rst  |  4 ----
 drivers/net/sfc/sfc.h        |  1 -
 drivers/net/sfc/sfc_ethdev.c |  9 +--------
 drivers/net/sfc/sfc_kvargs.c |  1 -
 drivers/net/sfc/sfc_kvargs.h |  2 --
 drivers/net/sfc/sfc_log.h    | 11 +++++------
 6 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index a580d94..c0b52d3 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -321,10 +321,6 @@ boolean parameters value.
   **auto** allows NIC firmware to make a choice based on
   installed licences and firmware variant configured using **sfboot**.
 
-- ``debug_init`` [bool] (default **n**)
-
-  Enable extra logging during device initialization and startup.
-
 - ``mcdi_logging`` [bool] (default **n**)
 
   Enable extra logging of the communication with the NIC's management CPU.
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 768578e..378c675 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -171,7 +171,6 @@ struct sfc_adapter {
 	struct rte_eth_dev		*eth_dev;
 	struct rte_kvargs		*kvargs;
 	uint32_t			logtype_main;
-	bool				debug_init;
 	int				socket_id;
 	efsys_bar_t			mem_bar;
 	efx_family_t			family;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index f27ce63..ebd0a23 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1931,11 +1931,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	if (rc != 0)
 		goto fail_kvargs_parse;
 
-	rc = sfc_kvargs_process(sa, SFC_KVARG_DEBUG_INIT,
-				sfc_kvarg_bool_handler, &sa->debug_init);
-	if (rc != 0)
-		goto fail_kvarg_debug_init;
-
 	sfc_log_init(sa, "entry");
 
 	dev->data->mac_addrs = rte_zmalloc("sfc", ETHER_ADDR_LEN, 0);
@@ -1989,7 +1984,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	dev->data->mac_addrs = NULL;
 
 fail_mac_addrs:
-fail_kvarg_debug_init:
 	sfc_kvargs_cleanup(sa);
 
 fail_kvargs_parse:
@@ -2072,8 +2066,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx,
 	SFC_KVARG_TX_DATAPATH "=" SFC_KVARG_VALUES_TX_DATAPATH " "
 	SFC_KVARG_PERF_PROFILE "=" SFC_KVARG_VALUES_PERF_PROFILE " "
 	SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long> "
-	SFC_KVARG_MCDI_LOGGING "=" SFC_KVARG_VALUES_BOOL " "
-	SFC_KVARG_DEBUG_INIT "=" SFC_KVARG_VALUES_BOOL);
+	SFC_KVARG_MCDI_LOGGING "=" SFC_KVARG_VALUES_BOOL);
 
 RTE_INIT(sfc_driver_register_logtype);
 static void
diff --git a/drivers/net/sfc/sfc_kvargs.c b/drivers/net/sfc/sfc_kvargs.c
index 8f55e99..860adeb 100644
--- a/drivers/net/sfc/sfc_kvargs.c
+++ b/drivers/net/sfc/sfc_kvargs.c
@@ -23,7 +23,6 @@ sfc_kvargs_parse(struct sfc_adapter *sa)
 	struct rte_devargs *devargs = eth_dev->device->devargs;
 	const char **params = (const char *[]){
 		SFC_KVARG_STATS_UPDATE_PERIOD_MS,
-		SFC_KVARG_DEBUG_INIT,
 		SFC_KVARG_MCDI_LOGGING,
 		SFC_KVARG_PERF_PROFILE,
 		SFC_KVARG_RX_DATAPATH,
diff --git a/drivers/net/sfc/sfc_kvargs.h b/drivers/net/sfc/sfc_kvargs.h
index e7044ca..2c7aaaf 100644
--- a/drivers/net/sfc/sfc_kvargs.h
+++ b/drivers/net/sfc/sfc_kvargs.h
@@ -18,8 +18,6 @@ extern "C" {
 
 #define SFC_KVARG_VALUES_BOOL		"[1|y|yes|on|0|n|no|off]"
 
-#define SFC_KVARG_DEBUG_INIT		"debug_init"
-
 #define SFC_KVARG_MCDI_LOGGING		"mcdi_logging"
 
 #define SFC_KVARG_PERF_PROFILE		"perf_profile"
diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index ec903db..6daab1c 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -77,12 +77,11 @@ extern uint32_t sfc_logtype_driver;
 	do {								\
 		const struct sfc_adapter *_sa = (sa);			\
 									\
-		if (_sa->debug_init)					\
-			SFC_LOG(_sa, RTE_LOG_INFO, _sa->logtype_main,	\
-				RTE_FMT("%s(): "			\
-					RTE_FMT_HEAD(__VA_ARGS__,),	\
-					__func__,			\
-					RTE_FMT_TAIL(__VA_ARGS__,)));	\
+		SFC_LOG(_sa, RTE_LOG_INFO, _sa->logtype_main,		\
+			RTE_FMT("%s(): "				\
+				RTE_FMT_HEAD(__VA_ARGS__ ,),		\
+				__func__,				\
+				RTE_FMT_TAIL(__VA_ARGS__ ,)));		\
 	} while (0)
 
 #endif /* _SFC_LOG_H_ */
-- 
2.7.4

  parent reply	other threads:[~2018-03-21 11:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 17:00 [dpdk-dev] [PATCH 0/6] net/sfc: implement dynamic logging Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 1/6] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 2/6] net/sfc: add support for driver-wide dynamic logging Andrew Rybchenko
2018-01-25 18:42   ` Stephen Hemminger
2018-01-26  6:51     ` Andrew Rybchenko
2018-03-05 14:59   ` Ferruh Yigit
2018-03-06 14:45     ` Andrew Rybchenko
2018-03-06 14:56       ` Andrew Rybchenko
2018-03-06 15:26         ` Ferruh Yigit
2018-01-25 17:00 ` [dpdk-dev] [PATCH 3/6] net/sfc: add support for per-port " Andrew Rybchenko
2018-03-15 15:45   ` Ferruh Yigit
2018-01-25 17:00 ` [dpdk-dev] [PATCH 4/6] net/sfc: prepare to merge init logs with main log type Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 5/6] net/sfc: remove dedicated init log parameter Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 6/6] net/sfc: add dynamic log level for MCDI messages Andrew Rybchenko
2018-01-25 21:38 ` [dpdk-dev] [PATCH 0/6] net/sfc: implement dynamic logging Thomas Monjalon
2018-01-26  5:59   ` Andrew Rybchenko
2018-01-26  7:44     ` Thomas Monjalon
2018-02-15 11:35 ` [dpdk-dev] [PATCH v2] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-03-05 15:00 ` [dpdk-dev] [PATCH 0/6] net/sfc: implement dynamic logging Ferruh Yigit
2018-03-21 11:28 ` [dpdk-dev] [PATCH v3 " Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 1/6] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-03-22 10:21     ` Ferruh Yigit
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 2/6] net/sfc: add support for driver-wide dynamic logging Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 3/6] net/sfc: add support for per-port " Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 4/6] net/sfc: prepare to merge init logs with main log type Andrew Rybchenko
2018-03-21 11:28   ` Andrew Rybchenko [this message]
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 6/6] net/sfc: add dynamic log level for MCDI messages Andrew Rybchenko
2018-03-22 10:22   ` [dpdk-dev] [PATCH v3 0/6] net/sfc: implement dynamic logging Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1521631701-11282-6-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).