[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110421221548.GA7888@rere.qmqm.pl>
Date: Fri, 22 Apr 2011 00:15:48 +0200
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Ben Hutchings <bhutchings@...arflare.com>
Cc: Vladislav Zolotarov <vladz@...adcom.com>,
Eric Dumazet <eric.dumazet@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eilon Greenstein <eilong@...adcom.com>
Subject: Re: [PATCH v5] net: bnx2x: convert to hw_features
On Thu, Apr 21, 2011 at 08:19:19PM +0100, Ben Hutchings wrote:
> /* Transfer changeable features to wanted_features and enable
> * software offloads (GSO and GRO).
> */
> dev->hw_features |= NETIF_F_SOFT_FEATURES;
> dev->features |= NETIF_F_SOFT_FEATURES;
> dev->wanted_features = dev->features & dev->hw_features;
>
> This doesn't work correctly for features that are always enabled, like
> NETIF_F_HW_VLAN_RX in bnx2x, which are set in dev->features but not in
> dev->hw_features.
> The name 'hw_features' really wasn't a good choice - the obvious meaning
> and the meaning assumed by this code is 'hardware-supported features'
> and not 'hardware-supported features that can be toggled'. And since we
> add NETIF_F_SOFT_FEATURES, it really only means 'features that can be
> toggled'.
I won't argue about hw_features name - I just couldn't find a better one.
Comment in include/linux/netdevice.h clearly explains the purpose of this
field.
wanted_features is supposed to be limited by hw_features (so that it's always
true that (hw_features & wanted_features) == wanted_features). If you have
an idea how to make that more clear, I'd be happy to update descriptions.
Best Regards,
Michał Mirosław
--
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