Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193899
b: refs/heads/master
c: b00fabb
h: refs/heads/master
i:
  193897: 87c318a
  193895: 31047d6
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Mar 31, 2010
1 parent a7399fd commit 26e4f2c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 757b77e2b208490868cf21fd22d796eb9bd199c5
refs/heads/master: b00fabb4020d17bda4bea59507e09fadf573088d
1 change: 1 addition & 0 deletions trunk/include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ struct ethtool_perm_addr {
enum ethtool_flags {
ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */
ETH_FLAG_RXHASH = (1 << 28),
};

/* The following structures are for supporting RX network flow
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ struct net_device {
#define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */
#define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/
#define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */
#define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */

/* Segmentation offload features */
#define NETIF_F_GSO_SHIFT 16
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 26e4f2c

Please sign in to comment.