summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorstephen hemminger2010-03-29 16:47:27 +0200
committerDavid S. Miller2010-03-31 08:51:08 +0200
commitb00fabb4020d17bda4bea59507e09fadf573088d (patch)
treedb746ff4c223cc5ba98927d9f9421285952c7231 /net/core
parentigb: add per-packet timestamping (diff)
downloadkernel-qcow2-linux-b00fabb4020d17bda4bea59507e09fadf573088d.tar.gz
kernel-qcow2-linux-b00fabb4020d17bda4bea59507e09fadf573088d.tar.xz
kernel-qcow2-linux-b00fabb4020d17bda4bea59507e09fadf573088d.zip
netdev: ethtool RXHASH flag
This adds ethtool and device feature flag to allow control of receive hashing offload. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/ethtool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index f4cb6b6299d9..73c81edde8d9 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -121,7 +121,7 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data)
* NETIF_F_xxx values in include/linux/netdevice.h
*/
static const u32 flags_dup_features =
- (ETH_FLAG_LRO | ETH_FLAG_NTUPLE);
+ (ETH_FLAG_LRO | ETH_FLAG_NTUPLE | ETH_FLAG_RXHASH);
u32 ethtool_op_get_flags(struct net_device *dev)
{
@@ -152,6 +152,11 @@ int ethtool_op_set_flags(struct net_device *dev, u32 data)
features &= ~NETIF_F_NTUPLE;
}
+ if (data & ETH_FLAG_RXHASH)
+ features |= NETIF_F_RXHASH;
+ else
+ features &= ~NETIF_F_RXHASH;
+
dev->features = features;
return 0;
}