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]
Date:	Sat, 22 Jan 2011 15:12:22 -0800
From:	Joe Perches <joe@...ches.com>
To:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc:	netdev@...r.kernel.org, Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH v2 03/16] net: reduce and unify printk level in
 netdev_fix_features()

On Sat, 2011-01-22 at 23:14 +0100, Michał Mirosław wrote:
> Reduce printk() levels to KERN_INFO in netdev_fix_features() as this will
> be used by ethtool and might spam dmesg unnecessarily.
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 01d7ce2..168588f 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5127,58 +5127,52 @@ static void rollback_registered(struct net_device *dev)
>  	rollback_registered_many(&single);
>  }
>  
> -u32 netdev_fix_features(u32 features, const char *name)
> +u32 netdev_fix_features(struct net_device *dev, u32 features)

Perhaps this would be simpler as:
void netdev_fix_features(struct net_device *dev)

>  {
>  	/* Fix illegal checksum combinations */
>  	if ((features & NETIF_F_HW_CSUM) &&
>  	    (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {

	if (dev->features & etc...) {
		dev->features &= etc...)

> +		netdev_info(dev,0
> +			"mixed HW and IP checksum settings.\n");

Fits nicely on a single line:

		netdev_info(dev, "mixed HW and IP checksum settings\n"); 

>  		features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
>  	}
>  
>  	if ((features & NETIF_F_NO_CSUM) &&
>  	    (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
> -		if (name)
> -			printk(KERN_NOTICE "%s: mixed no checksumming and other settings.\n",
> -				name);
> +		netdev_info(dev,
> +			"mixed no checksumming and other settings.\n");

Here too, etc...

		netdev_info(dev, "mixed no checksumming and other settings\n");


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ