From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id F00731B1D3 for ; Thu, 25 Jan 2018 18:01:01 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 33220940091; Thu, 25 Jan 2018 17:01:00 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 25 Jan 2018 09:00:57 -0800 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Thu, 25 Jan 2018 09:00:57 -0800 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w0PH0uGD024576; Thu, 25 Jan 2018 17:00:56 GMT Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w0PH0uQP008590; Thu, 25 Jan 2018 17:00:56 GMT From: Andrew Rybchenko To: CC: Ivan Malov Date: Thu, 25 Jan 2018 17:00:46 +0000 Message-ID: <1516899647-8541-6-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1516899647-8541-1-git-send-email-arybchenko@solarflare.com> References: <1516899647-8541-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-MDID: 1516899660-zZS3+7g2aUjb Subject: [dpdk-dev] [PATCH 5/6] net/sfc: remove dedicated init log parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 17:01:02 -0000 From: Ivan Malov 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 Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- 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 8d5eb30..0d02f96 100644 --- a/doc/guides/nics/sfc_efx.rst +++ b/doc/guides/nics/sfc_efx.rst @@ -287,10 +287,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 83175e6..f418715 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -1944,11 +1944,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); @@ -2002,7 +1997,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: @@ -2085,8 +2079,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 "= " - 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