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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21519.1497577761@famine>
Date:   Thu, 15 Jun 2017 18:49:21 -0700
From:   Jay Vosburgh <jay.vosburgh@...onical.com>
To:     Joe Perches <joe@...ches.com>
cc:     Michael J Dilmore <michael.j.dilmore@...il.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Convert multiple netdev_info messages to netdev_dbg

Joe Perches <joe@...ches.com> wrote:

>On Thu, 2017-06-15 at 19:14 +0100, Michael J Dilmore wrote:
>> Multiple netdev_info messages clutter kernel output. Also add netdev_dbg for packets per slave.
>[]
>> diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
>[]
>> @@ -9,6 +9,8 @@
>>   * (at your option) any later version.
>>   */
>>   
>> +#define DEBUG 1
>
>Is defining DEBUG really worthwhile.

	I don't believe so, since if CONFIG_DYNAMIC_DEBUG is not
enabled, having #define DEBUG will enable all of the netdev_dbg messages
unconditionally, which is the opposite of the stated purpose of the
patch.  If DYNAMIC_DEBUG is enabled, having DEBUG doesn't do anything
that I can see.

	-J

>As well, it's almost always just
>#define DEBUG
>without any level value unless the
>level value is used in the code.
>
>> +
>>  #include <linux/errno.h>
>>  #include <linux/if.h>
>>  #include <linux/netdevice.h>
>> @@ -719,13 +721,13 @@ static int bond_option_mode_set(struct bonding *bond,
>>  				const struct bond_opt_value *newval)
>>  {
>>  	if (!bond_mode_uses_arp(newval->value) && bond->params.arp_interval) {
>> -		netdev_info(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n",
>> +		netdev_dbg(bond->dev, "%s mode is incompatible with arp monitoring, start mii monitoring\n",
>>  			    newval->string);
>
>Please realign any multiple line arguments to the
>open parenthesis at the same time.
>
>>  		/* disable arp monitoring */
>>  		bond->params.arp_interval = 0;
>>  		/* set miimon to default value */
>>  		bond->params.miimon = BOND_DEFAULT_MIIMON;
>> -		netdev_info(bond->dev, "Setting MII monitoring interval to %d\n",
>> +		netdev_dbg(bond->dev, "Setting MII monitoring interval to %d\n",
>>  			    bond->params.miimon);
>
>etc...
>

---
	-Jay Vosburgh, jay.vosburgh@...onical.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ