netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] tun: use ethtool msglevel bit mask convention
Date: Mon, 06 Feb 2012 16:46:33 -0800	[thread overview]
Message-ID: <1328575593.3949.6.camel@joe2Laptop> (raw)
In-Reply-To: <20120206163159.77940478@nehalam.linuxnetplumber.net>

On Mon, 2012-02-06 at 16:31 -0800, Stephen Hemminger wrote:
> Replace custom debug printk with standard network device message level
> interface. The messages about open/close/read/write are debug messages which can
> be enabled at compile time or dynamic debug.

Seems sensible.

trivial comments below:

> --- a/drivers/net/tun.c	2012-01-10 10:56:57.027157981 -0800
> @@ -381,7 +355,8 @@ static netdev_tx_t tun_net_xmit(struct s
>  {
>  	struct tun_struct *tun = netdev_priv(dev);
>  
> -	tun_debug(KERN_INFO, tun, "tun_net_xmit %d\n", skb->len);
> +	netif_info(tun, tx_queued, dev,
> +		   "tun_net_xmit %d\n", skb->len);

Fits on a single line
 

> @@ -1147,7 +1129,7 @@ static int tun_set_iff(struct net *net,
>  			goto failed;
>  	}
>  
> -	tun_debug(KERN_INFO, tun, "tun_set_iff\n");
> +	netif_info(tun, drv, tun->dev, "tun_set_iff flags %#x\n", ifr->ifr_flags);

This one is a little long.
> @@ -1277,7 +1259,8 @@ static long __tun_chr_ioctl(struct file
>  	if (!tun)
>  		goto unlock;
>  
> -	tun_debug(KERN_INFO, tun, "tun_chr_ioctl cmd %d\n", cmd);
> +	netif_info(tun, drv, tun->dev,
> +		   "tun_chr_ioctl cmd %#x\n", cmd);

Another one on a single line.

> @@ -1294,7 +1277,8 @@ static long __tun_chr_ioctl(struct file
>  		/* Disable/Enable checksum */
>  
>  		/* [unimplemented] */
> -		tun_debug(KERN_INFO, tun, "ignored: set checksum %s\n",
> +		netif_info(tun, drv, tun->dev,
> +			   "ignored: set checksum %s\n",
>  			  arg ? "disabled" : "enabled");

I'd write this one on 2 lines as:

		netif_info(tun, drv, tun->dev, "ignored: set checksum %s\n",
			   arg ? "disabled", "Enabled");

      reply	other threads:[~2012-02-07  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07  0:31 [PATCH] tun: use ethtool msglevel bit mask convention Stephen Hemminger
2012-02-07  0:46 ` Joe Perches [this message]

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=1328575593.3949.6.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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).