netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
@ 2011-03-31  9:58 Michał Mirosław
  2011-04-02  3:23 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Mirosław @ 2011-03-31  9:58 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller

dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
changeable and driver is converted to hw_features and friends. Fix this.

(dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
[this is a fix also for 2.6.39]

 include/linux/netdevice.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5eeb2cd..0249fe7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev,
 
 static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
 {
-	if (dev->hw_features & NETIF_F_RXCSUM)
-		return !!(dev->features & NETIF_F_RXCSUM);
+	if (dev->features & NETIF_F_RXCSUM)
+		return 1;
 	if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
 		return 0;
 	return dev->ethtool_ops->get_rx_csum(dev);
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
  2011-03-31  9:58 [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM Michał Mirosław
@ 2011-04-02  3:23 ` David Miller
  2011-04-04 14:14   ` Michał Mirosław
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-04-02  3:23 UTC (permalink / raw)
  To: mirq-linux; +Cc: netdev

From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: Thu, 31 Mar 2011 11:58:08 +0200 (CEST)

> dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
> changeable and driver is converted to hw_features and friends. Fix this.
> 
> (dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
> ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
  2011-04-02  3:23 ` David Miller
@ 2011-04-04 14:14   ` Michał Mirosław
  2011-04-04 14:54     ` Ben Hutchings
  0 siblings, 1 reply; 5+ messages in thread
From: Michał Mirosław @ 2011-04-04 14:14 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Fri, Apr 01, 2011 at 08:23:35PM -0700, David Miller wrote:
> From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Date: Thu, 31 Mar 2011 11:58:08 +0200 (CEST)
> > dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
> > changeable and driver is converted to hw_features and friends. Fix this.
> > 
> > (dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
> > ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.
> > 
> > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Applied, thanks.

I noticed this didn't get into your net-next tree (it's only in net).
This impacts the hw_features conversions that are in net-next.

BTW, what's the policy for this kind of patches? I send them relative
to net-next normally and note if this is also for -rc/stable - is this
The Good Way(tm)?

Best Regards,
Michał Mirosław

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
  2011-04-04 14:14   ` Michał Mirosław
@ 2011-04-04 14:54     ` Ben Hutchings
  2011-04-04 18:07       ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2011-04-04 14:54 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: David Miller, netdev

On Mon, 2011-04-04 at 16:14 +0200, Michał Mirosław wrote:
> On Fri, Apr 01, 2011 at 08:23:35PM -0700, David Miller wrote:
> > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > Date: Thu, 31 Mar 2011 11:58:08 +0200 (CEST)
> > > dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
> > > changeable and driver is converted to hw_features and friends. Fix this.
> > > 
> > > (dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
> > > ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.
> > > 
> > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> > Applied, thanks.
> 
> I noticed this didn't get into your net-next tree (it's only in net).
> This impacts the hw_features conversions that are in net-next.
> 
> BTW, what's the policy for this kind of patches? I send them relative
> to net-next normally and note if this is also for -rc/stable - is this
> The Good Way(tm)?

If you want a change to be included in the upcoming release, it must be
applied initially to net-2.6; therefore it must be based on net-2.6.

David will periodically merge net-2.6 into net-next-2.6.  You can
probably do a test merge yourself if you want to see what the result
will be.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
  2011-04-04 14:54     ` Ben Hutchings
@ 2011-04-04 18:07       ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-04-04 18:07 UTC (permalink / raw)
  To: bhutchings; +Cc: mirq-linux, netdev

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Mon, 04 Apr 2011 15:54:40 +0100

> On Mon, 2011-04-04 at 16:14 +0200, Michał Mirosław wrote:
>> On Fri, Apr 01, 2011 at 08:23:35PM -0700, David Miller wrote:
>> > From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>> > Date: Thu, 31 Mar 2011 11:58:08 +0200 (CEST)
>> > > dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
>> > > changeable and driver is converted to hw_features and friends. Fix this.
>> > > 
>> > > (dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
>> > > ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.
>> > > 
>> > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>> > Applied, thanks.
>> 
>> I noticed this didn't get into your net-next tree (it's only in net).
>> This impacts the hw_features conversions that are in net-next.
>> 
>> BTW, what's the policy for this kind of patches? I send them relative
>> to net-next normally and note if this is also for -rc/stable - is this
>> The Good Way(tm)?
> 
> If you want a change to be included in the upcoming release, it must be
> applied initially to net-2.6; therefore it must be based on net-2.6.
> 
> David will periodically merge net-2.6 into net-next-2.6.  You can
> probably do a test merge yourself if you want to see what the result
> will be.

I've just merged net-2.6 into net-next-2.6, so anything which exists in
net-2.6 will show up in net-next-2.6 now too.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-04 18:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31  9:58 [PATCH] net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM Michał Mirosław
2011-04-02  3:23 ` David Miller
2011-04-04 14:14   ` Michał Mirosław
2011-04-04 14:54     ` Ben Hutchings
2011-04-04 18:07       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).