From: Joe Perches <joe@perches.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: netdev@vger.kernel.org, Ben Hutchings <bhutchings@solarflare.com>
Subject: Re: [PATCH v2 03/16] net: reduce and unify printk level in netdev_fix_features()
Date: Sat, 22 Jan 2011 15:12:22 -0800 [thread overview]
Message-ID: <1295737942.25868.114.camel@Joe-Laptop> (raw)
In-Reply-To: <29e476c368b6580f7ff5215ca759b69c75d0e021.1295734271.git.mirq-linux@rere.qmqm.pl>
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");
next prev parent reply other threads:[~2011-01-22 23:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-22 22:14 [PATCH v2 00/16] net: Unified offload configuration Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 03/16] net: reduce and unify printk level in netdev_fix_features() Michał Mirosław
2011-01-22 23:12 ` Joe Perches [this message]
2011-01-22 23:40 ` Michał Mirosław
2011-01-23 12:44 ` [PATCH] " Michał Mirosław
2011-01-22 23:48 ` [PATCH v2 03/16] " Michał Mirosław
2011-01-24 23:45 ` David Miller
2011-01-22 22:14 ` [PATCH v2 01/16] net: Move check of checksum features to netdev_fix_features() Michał Mirosław
2011-01-24 23:29 ` David Miller
2011-01-22 22:14 ` [PATCH v2 02/16] net: change netdev->features to u32 Michał Mirosław
2011-01-23 10:35 ` Eric Dumazet
2011-01-23 12:44 ` [PATCH] " Michał Mirosław
2011-01-24 23:30 ` [PATCH v2 02/16] " David Miller
2011-01-25 11:07 ` Michał Mirosław
2011-01-25 20:37 ` David Miller
2011-01-22 22:14 ` [PATCH v2 11/16] bonding: convert to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 05/16] net: ethtool: use ndo_fix_features for offload setting Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 10/16] vlan: convert VLAN devices to use ndo_fix_features() Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 12/16] jme: convert offload constraints to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 07/16] net: introduce NETIF_F_RXCSUM Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 08/16] loopback: convert to hw_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 04/16] net: Introduce new feature setting ops Michał Mirosław
2011-01-24 23:51 ` David Miller
2011-01-25 1:26 ` Ben Hutchings
2011-01-22 22:14 ` [PATCH v2 09/16] bridge: convert br_features_recompute() to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 06/16] net: use ndo_fix_features for ethtool_ops->set_flags Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 16/16] skge: convert to hw_features Michał Mirosław
2011-01-31 16:45 ` Stephen Hemminger
2011-01-31 21:53 ` Michał Mirosław
2011-01-31 22:40 ` Michał Mirosław
2011-01-31 23:08 ` Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 14/16] Intel net drivers: convert to ndo_fix_features Michał Mirosław
2011-01-24 7:06 ` Jeff Kirsher
2011-01-26 9:47 ` Jeff Kirsher
2011-04-07 12:51 ` Michał Mirosław
2011-04-07 15:00 ` Jeff Kirsher
2011-01-22 22:14 ` [PATCH v2 13/16] virtio_net: " Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 15/16] veth: convert to hw_features Michał Mirosław
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=1295737942.25868.114.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=bhutchings@solarflare.com \
--cc=mirq-linux@rere.qmqm.pl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox