netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] sfc: set/clear NETIF_F_RXHASH bit directly
@ 2010-06-29 14:35 Stanislaw Gruszka
  2010-06-29 14:43 ` Ben Hutchings
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2010-06-29 14:35 UTC (permalink / raw)
  To: netdev; +Cc: Amerigo Wang, Ben Hutchings

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/sfc/ethtool.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 7693cfb..fd55123 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -554,7 +554,12 @@ static int efx_ethtool_set_flags(struct net_device *net_dev, u32 data)
 	if (data & ~supported)
 		return -EOPNOTSUPP;
 
-	return ethtool_op_set_flags(net_dev, data);
+	if (data & ETH_FLAG_RXHASH)
+		net_dev->features |= NETIF_F_RXHASH;
+	else
+		net_dev->features &= ~NETIF_F_RXHASH;
+
+	return 0;
 }
 
 static void efx_ethtool_self_test(struct net_device *net_dev,
-- 
1.5.5.6


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

* Re: [PATCH -next] sfc: set/clear NETIF_F_RXHASH bit directly
  2010-06-29 14:35 [PATCH -next] sfc: set/clear NETIF_F_RXHASH bit directly Stanislaw Gruszka
@ 2010-06-29 14:43 ` Ben Hutchings
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Hutchings @ 2010-06-29 14:43 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: netdev, Amerigo Wang

On Tue, 2010-06-29 at 16:35 +0200, Stanislaw Gruszka wrote:
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
[...]

I don't think this is a positive change.

Please change ethtool_op_set_flags; then in efx_ethtool_set_flags() you
can do:

-	if (data & ~supported)
- 		return -EOPNOTSUPP;
- 
-	return ethtool_op_set_flags(net_dev, data);
+	return ethtool_op_set_flags(net_dev, data, supported);

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
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] 2+ messages in thread

end of thread, other threads:[~2010-06-29 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-29 14:35 [PATCH -next] sfc: set/clear NETIF_F_RXHASH bit directly Stanislaw Gruszka
2010-06-29 14:43 ` Ben Hutchings

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