DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] ixgbe: silence noisy log messages
Date: Thu, 19 Mar 2015 12:26:27 +0100	[thread overview]
Message-ID: <550AB263.5070607@6wind.com> (raw)
In-Reply-To: <1425928715-2980-2-git-send-email-stephen@networkplumber.org>

On 03/09/2015 08:18 PM, Stephen Hemminger wrote:
> The ixgbe driver likes to be far to chatty in the system log
> which is good for the original developer but not good for a production
> product.
>
> Reduce the log spam by doing:
>   * All the normal messages should be changed from INFO to DEBUG.
>   * The log messages should be done with RTE_LOG so that they can be
>     compiled out if RTE_LOG_LEVEL is set.
>   * The link state print routine prints more than is necessary
>     PCI information is already known (earlier in log) and has
>     no purpose here.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

This patch is broken.

The changes are there twice.
I removed the first part of the mail.

> ---
>   lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 15 +++++----------
>   lib/librte_pmd_ixgbe/ixgbe_logs.h   |  3 +--
>   lib/librte_pmd_ixgbe/ixgbe_rxtx.c   | 12 ++++++------
>   3 files changed, 12 insertions(+), 18 deletions(-)
>
> diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> index 9bdc046..171809f 100644
> --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
> @@ -2293,20 +2293,15 @@ ixgbe_dev_link_status_print(struct rte_eth_dev *dev)
>   	memset(&link, 0, sizeof(link));
>   	rte_ixgbe_dev_atomic_read_link_status(dev, &link);
>   	if (link.link_status) {
> -		PMD_INIT_LOG(INFO, "Port %d: Link Up - speed %u Mbps - %s",
> -					(int)(dev->data->port_id),
> +		PMD_INIT_LOG(DEBUG, "Port %u: Link Up - speed %u Mbps - %s",
> +					dev->data->port_id,
>   					(unsigned)link.link_speed,
>   			link.link_duplex == ETH_LINK_FULL_DUPLEX ?
>   					"full-duplex" : "half-duplex");
>   	} else {
> -		PMD_INIT_LOG(INFO, " Port %d: Link Down",
> -				(int)(dev->data->port_id));
> -	}
> -	PMD_INIT_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d",
> -				dev->pci_dev->addr.domain,
> -				dev->pci_dev->addr.bus,
> -				dev->pci_dev->addr.devid,
> -				dev->pci_dev->addr.function);
> +		PMD_INIT_LOG(DEBUG, "Port %d: Link Down",
> +				dev->data->port_id);
> +	}
>   }

Well, I would say that PMD_INIT_LOG should not be called from here.
PMD_DRV_LOG should be the preferred macro (pure debug stuff, out of init).


The rest looks fine to me.


-- 
David Marchand

  reply	other threads:[~2015-03-19 11:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 19:18 [dpdk-dev] [PATCH 0/2] Intel driver silence excess logging Stephen Hemminger
2015-03-09 19:18 ` [dpdk-dev] [PATCH 1/2] ixgbe: silence noisy log messages Stephen Hemminger
2015-03-19 11:26   ` David Marchand [this message]
2015-03-09 19:18 ` [dpdk-dev] [PATCH 2/2] e1000: " Stephen Hemminger
2015-03-19 11:28   ` David Marchand
2015-03-19 11:31 ` [dpdk-dev] [PATCH 0/2] Intel driver silence excess logging David Marchand
2015-04-10 15:18 [dpdk-dev] [PATCH 0/2] fix logging in Intel PMD's Stephen Hemminger
2015-04-10 15:18 ` [dpdk-dev] [PATCH 1/2] ixgbe: silence noisy log messages Stephen Hemminger
2015-04-14  8:44   ` Zhang, Helin

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=550AB263.5070607@6wind.com \
    --to=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).