lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20120310164435.70bcd0e5@nehalam.linuxnetplumber.net> Date: Sat, 10 Mar 2012 16:44:35 -0800 From: Stephen Hemminger <shemminger@...tta.com> To: Ben Hutchings <bhutchings@...arflare.com> Cc: Dan Carpenter <dan.carpenter@...cle.com>, Jeff Kirsher <jeffrey.t.kirsher@...el.com>, Jesse Brandeburg <jesse.brandeburg@...el.com>, Bruce Allan <bruce.w.allan@...el.com>, Carolyn Wyborny <carolyn.wyborny@...el.com>, Don Skidmore <donald.c.skidmore@...el.com>, Greg Rose <gregory.v.rose@...el.com>, Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>, Alex Duyck <alexander.h.duyck@...el.com>, John Ronciak <john.ronciak@...el.com>, "David S. Miller" <davem@...emloft.net>, <e1000-devel@...ts.sourceforge.net>, <netdev@...r.kernel.org>, <kernel-janitors@...r.kernel.org> Subject: Re: [PATCH] intel: make wired ethernet driver message level consistent On Sun, 11 Mar 2012 00:38:57 +0000 Ben Hutchings <bhutchings@...arflare.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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists