From: Stephen Hemminger <shemminger@vyatta.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: kernel-janitors@vger.kernel.org,
e1000-devel@lists.sourceforge.net,
Bruce Allan <bruce.w.allan@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
John Ronciak <john.ronciak@intel.com>,
netdev@vger.kernel.org, Peter,
"David S. Miller" <davem@davemloft.net>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] intel: make wired ethernet driver message level consistent
Date: Sun, 11 Mar 2012 00:44:35 +0000 [thread overview]
Message-ID: <20120310164435.70bcd0e5@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1331426337.3022.106.camel@deadeye>
On Sun, 11 Mar 2012 00:38:57 +0000
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Sat, 2012-03-10 at 16:01 -0800, Stephen Hemminger wrote:
> > Dan Carpenter noticed that ixgbevf initial default was different than
> > the rest. But the problem is broader than that, only one Intel driver (ixgb)
> > was doing it right.
> >
> > The convention for default debug level should be consistent among
> > Intel drivers and follow established convention.
> [...]
> > --- a/drivers/net/ethernet/intel/e1000/e1000_main.c 2012-02-27 08:43:02.348936997 -0800
> > +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c 2012-03-10 15:50:57.199452804 -0800
> > @@ -215,7 +215,8 @@ MODULE_DESCRIPTION("Intel(R) PRO/1000 Ne
> > MODULE_LICENSE("GPL");
> > MODULE_VERSION(DRV_VERSION);
> >
> > -static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE;
> > +#define DEFAULT_DEBUG_LEVEL_SHIFT 3
>
> Wonder if this should really be 2 (enable DRV and PROBE) or 3 (enable
> DRV, PROBE and LINK; equivalent to current behaviour)?
That is really up to intel, the link up/down is useful, but nuisance
with lots of devices.
> > +static int debug = DEFAULT_DEBUG_LEVEL_SHIFT;
> > module_param(debug, int, 0);
> > MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
> >
> > @@ -979,7 +980,7 @@ static int __devinit e1000_probe(struct
> > adapter = netdev_priv(netdev);
> > adapter->netdev = netdev;
> > adapter->pdev = pdev;
> > - adapter->msg_enable = (1 << debug) - 1;
> > + adapter->msg_enable = netif_msg_init(debug, DEFAULT_DEBUG_LEVEL_SHIFT);
> [...]
>
> This works, but not the way you intended. The first parameter is
> supposed to be a module parameter with a default of -1. The second
> parameter is supposed to be the bitmask to use when that default is not
> overridden.
I'll fix that.
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: kernel-janitors@vger.kernel.org,
e1000-devel@lists.sourceforge.net,
Bruce Allan <bruce.w.allan@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
John Ronciak <john.ronciak@intel.com>,
netdev@vger.kernel.org, Peter,
"David S. Miller" <davem@davemloft.net>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] intel: make wired ethernet driver message level consistent
Date: Sat, 10 Mar 2012 16:44:35 -0800 [thread overview]
Message-ID: <20120310164435.70bcd0e5@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1331426337.3022.106.camel@deadeye>
On Sun, 11 Mar 2012 00:38:57 +0000
Ben Hutchings <bhutchings@solarflare.com> wrote:
> On Sat, 2012-03-10 at 16:01 -0800, Stephen Hemminger wrote:
> > Dan Carpenter noticed that ixgbevf initial default was different than
> > the rest. But the problem is broader than that, only one Intel driver (ixgb)
> > was doing it right.
> >
> > The convention for default debug level should be consistent among
> > Intel drivers and follow established convention.
> [...]
> > --- a/drivers/net/ethernet/intel/e1000/e1000_main.c 2012-02-27 08:43:02.348936997 -0800
> > +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c 2012-03-10 15:50:57.199452804 -0800
> > @@ -215,7 +215,8 @@ MODULE_DESCRIPTION("Intel(R) PRO/1000 Ne
> > MODULE_LICENSE("GPL");
> > MODULE_VERSION(DRV_VERSION);
> >
> > -static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE;
> > +#define DEFAULT_DEBUG_LEVEL_SHIFT 3
>
> Wonder if this should really be 2 (enable DRV and PROBE) or 3 (enable
> DRV, PROBE and LINK; equivalent to current behaviour)?
That is really up to intel, the link up/down is useful, but nuisance
with lots of devices.
> > +static int debug = DEFAULT_DEBUG_LEVEL_SHIFT;
> > module_param(debug, int, 0);
> > MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
> >
> > @@ -979,7 +980,7 @@ static int __devinit e1000_probe(struct
> > adapter = netdev_priv(netdev);
> > adapter->netdev = netdev;
> > adapter->pdev = pdev;
> > - adapter->msg_enable = (1 << debug) - 1;
> > + adapter->msg_enable = netif_msg_init(debug, DEFAULT_DEBUG_LEVEL_SHIFT);
> [...]
>
> This works, but not the way you intended. The first parameter is
> supposed to be a module parameter with a default of -1. The second
> parameter is supposed to be the bitmask to use when that default is not
> overridden.
I'll fix that.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2012-03-11 0:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 8:49 [patch] e1000e, igbvf: fix default message level Dan Carpenter
2012-03-10 8:49 ` Dan Carpenter
2012-03-10 9:02 ` Jeff Kirsher
2012-03-10 9:02 ` Jeff Kirsher
2012-03-10 23:06 ` Ben Hutchings
2012-03-10 23:06 ` Ben Hutchings
2012-03-11 0:01 ` [PATCH] intel: make wired ethernet driver message level consistent Stephen Hemminger
2012-03-11 0:01 ` Stephen Hemminger
2012-03-11 0:38 ` Ben Hutchings
2012-03-11 0:38 ` Ben Hutchings
2012-03-11 0:44 ` Stephen Hemminger [this message]
2012-03-11 0:44 ` Stephen Hemminger
2012-03-11 9:57 ` Jeff Kirsher
2012-03-11 9:57 ` Jeff Kirsher
2012-03-11 22:12 ` [PATCH] intel: make wired ethernet driver message level consistent (rev2) Stephen Hemminger
2012-03-11 22:12 ` Stephen Hemminger
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=20120310164435.70bcd0e5@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=bhutchings@solarflare.com \
--cc=bruce.w.allan@intel.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.