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 882CB1B1D5 for ; Thu, 25 Jan 2018 18:01:02 +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 5E4B4940095; 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 w0PH0uCk024571; 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 w0PH0uQO008590; Thu, 25 Jan 2018 17:00:56 GMT From: Andrew Rybchenko To: CC: Ivan Malov Date: Thu, 25 Jan 2018 17:00:45 +0000 Message-ID: <1516899647-8541-5-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-0H2eQ0SY-kYL Subject: [dpdk-dev] [PATCH 4/6] net/sfc: prepare to merge init logs with main log type 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:03 -0000 From: Ivan Malov Conversion to dynamic logging done in the previous patches makes it possible to simplify internal controls for init logging. This patch allows to prepare for such a change. It makes init-unrelated messages use NOTICE level so that the following patch will be able to convert init logging to use INFO level and remain silent by default. Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc.c | 6 +++--- drivers/net/sfc/sfc_ethdev.c | 10 +++++----- drivers/net/sfc/sfc_intr.c | 6 +++--- drivers/net/sfc/sfc_mcdi.c | 6 +++--- drivers/net/sfc/sfc_rx.c | 2 +- drivers/net/sfc/sfc_tx.c | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c index d31b0b1..2381505 100644 --- a/drivers/net/sfc/sfc.c +++ b/drivers/net/sfc/sfc.c @@ -344,7 +344,7 @@ sfc_start(struct sfc_adapter *sa) case SFC_ADAPTER_CONFIGURED: break; case SFC_ADAPTER_STARTED: - sfc_info(sa, "already started"); + sfc_notice(sa, "already started"); return 0; default: rc = EINVAL; @@ -383,7 +383,7 @@ sfc_stop(struct sfc_adapter *sa) case SFC_ADAPTER_STARTED: break; case SFC_ADAPTER_CONFIGURED: - sfc_info(sa, "already stopped"); + sfc_notice(sa, "already stopped"); return; default: sfc_err(sa, "stop in unexpected state %u", sa->state); @@ -454,7 +454,7 @@ sfc_schedule_restart(struct sfc_adapter *sa) else if (rc != 0) sfc_err(sa, "cannot arm restart alarm (rc=%d)", rc); else - sfc_info(sa, "restart scheduled"); + sfc_notice(sa, "restart scheduled"); } int diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index a244d27..83175e6 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -272,7 +272,7 @@ sfc_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) } if (old_link.link_status != current_link.link_status) - sfc_info(sa, "Link status is %s", + sfc_notice(sa, "Link status is %s", current_link.link_status ? "UP" : "DOWN"); return old_link.link_status == current_link.link_status ? 0 : -1; @@ -945,8 +945,8 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr) } if (sa->state != SFC_ADAPTER_STARTED) { - sfc_info(sa, "the port is not started"); - sfc_info(sa, "the new MAC address will be set on port start"); + sfc_notice(sa, "the port is not started"); + sfc_notice(sa, "the new MAC address will be set on port start"); goto unlock; } @@ -1751,7 +1751,7 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) goto fail_dp_rx_name; } - sfc_info(sa, "use %s Rx datapath", sa->dp_rx_name); + sfc_notice(sa, "use %s Rx datapath", sa->dp_rx_name); dev->rx_pkt_burst = sa->dp_rx->pkt_burst; @@ -1790,7 +1790,7 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) goto fail_dp_tx_name; } - sfc_info(sa, "use %s Tx datapath", sa->dp_tx_name); + sfc_notice(sa, "use %s Tx datapath", sa->dp_tx_name); dev->tx_pkt_burst = sa->dp_tx->pkt_burst; diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c index d6c8492..fbdc7ee 100644 --- a/drivers/net/sfc/sfc_intr.c +++ b/drivers/net/sfc/sfc_intr.c @@ -86,7 +86,7 @@ sfc_intr_line_handler(void *cb_arg) exit: if (lsc_seq != sa->port.lsc_seq) { - sfc_info(sa, "link status change event: link %s", + sfc_notice(sa, "link status change event: link %s", sa->eth_dev->data->dev_link.link_status ? "UP" : "DOWN"); _rte_eth_dev_callback_process(sa->eth_dev, @@ -130,7 +130,7 @@ sfc_intr_message_handler(void *cb_arg) exit: if (lsc_seq != sa->port.lsc_seq) { - sfc_info(sa, "link status change event"); + sfc_notice(sa, "link status change event"); _rte_eth_dev_callback_process(sa->eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL); @@ -251,7 +251,7 @@ sfc_intr_configure(struct sfc_adapter *sa) intr->handler = NULL; intr->lsc_intr = (sa->eth_dev->data->dev_conf.intr_conf.lsc != 0); if (!intr->lsc_intr) { - sfc_info(sa, "LSC tracking using interrupts is disabled"); + sfc_notice(sa, "LSC tracking using interrupts is disabled"); goto done; } diff --git a/drivers/net/sfc/sfc_mcdi.c b/drivers/net/sfc/sfc_mcdi.c index 9d92b8c..895c2f5 100644 --- a/drivers/net/sfc/sfc_mcdi.c +++ b/drivers/net/sfc/sfc_mcdi.c @@ -176,7 +176,7 @@ sfc_mcdi_do_log(const struct sfc_adapter *sa, * at the end which is required by netlogdecode. */ buffer[position] = '\0'; - sfc_info(sa, "%s \\", buffer); + sfc_notice(sa, "%s \\", buffer); /* Preserve prefix for the next log message */ position = pfxsize; } @@ -201,7 +201,7 @@ sfc_mcdi_logger(void *arg, efx_log_msg_t type, if (!sa->mcdi.logging) return; - /* The format including prefix added by sfc_info() is the format + /* The format including prefix added by sfc_notice() is the format * consumed by the Solarflare netlogdecode tool. */ pfxsize = snprintf(buffer, sizeof(buffer), "MCDI RPC %s:", @@ -212,7 +212,7 @@ sfc_mcdi_logger(void *arg, efx_log_msg_t type, start = sfc_mcdi_do_log(sa, buffer, data, data_size, pfxsize, start); if (start != pfxsize) { buffer[start] = '\0'; - sfc_info(sa, "%s", buffer); + sfc_notice(sa, "%s", buffer); } } diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index abc53fb..f7aaab0 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -608,7 +608,7 @@ sfc_rx_qflush(struct sfc_adapter *sa, unsigned int sw_index) sfc_err(sa, "RxQ %u flush failed", sw_index); if (rxq->state & SFC_RXQ_FLUSHED) - sfc_info(sa, "RxQ %u flushed", sw_index); + sfc_notice(sa, "RxQ %u flushed", sw_index); } sa->dp_rx->qpurge(rxq->dp); diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c index 757b03b..0035c5c 100644 --- a/drivers/net/sfc/sfc_tx.c +++ b/drivers/net/sfc/sfc_tx.c @@ -606,7 +606,7 @@ sfc_tx_qstop(struct sfc_adapter *sa, unsigned int sw_index) sfc_err(sa, "TxQ %u flush timed out", sw_index); if (txq->state & SFC_TXQ_FLUSHED) - sfc_info(sa, "TxQ %u flushed", sw_index); + sfc_notice(sa, "TxQ %u flushed", sw_index); } sa->dp_tx->qreap(txq->dp); -- 2.7.4