From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/2] netdev: ethtool RXHASH flag
Date: Mon, 29 Mar 2010 17:47:27 -0700 [thread overview]
Message-ID: <20100329174727.4654e19c@nehalam> (raw)
In-Reply-To: <20100328154448.701c89ee@nehalam>
This adds ethtool and device feature flag to allow control
of receive hashing offload.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Supersedes earlier patch, decided to call it RXHASH not RSS since
we don't care about other vendors acronyms
--- a/include/linux/ethtool.h 2010-03-28 14:09:58.611267016 -0700
+++ b/include/linux/ethtool.h 2010-03-28 14:19:45.032516128 -0700
@@ -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
--- a/include/linux/netdevice.h 2010-03-28 14:12:13.092517615 -0700
+++ b/include/linux/netdevice.h 2010-03-28 14:13:47.232915349 -0700
@@ -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
--- a/net/core/ethtool.c 2010-03-28 14:12:25.012207457 -0700
+++ b/net/core/ethtool.c 2010-03-28 14:19:41.548521569 -0700
@@ -121,7 +121,7 @@ int ethtool_op_set_ufo(struct net_device
* 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_devi
features &= ~NETIF_F_NTUPLE;
}
+ if (data & ETH_FLAG_RXHASH)
+ features |= NETIF_F_RXHASH;
+ else
+ features &= ~NETIF_F_RXHASH;
+
dev->features = features;
return 0;
}
next prev parent reply other threads:[~2010-03-30 0:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 22:44 [PATCH 1/2] netdev: add support for Receive Side Scaling hash control Stephen Hemminger
2010-03-28 22:47 ` [PATCH 2/2] ethtool: add RSS command flag Stephen Hemminger
2010-03-30 0:47 ` Stephen Hemminger [this message]
2010-03-30 0:53 ` [PATCH 2/2] ethtool: RXHASH flag support Stephen Hemminger
2010-03-30 17:29 ` Jeff Garzik
2010-03-30 17:32 ` Stephen Hemminger
2010-03-30 17:37 ` Jeff Garzik
2010-03-30 21:05 ` Stephen Hemminger
2010-03-30 21:08 ` Jeff Garzik
2010-03-30 21:31 ` Stephen Hemminger
2010-03-30 22:58 ` Jeff Garzik
2010-03-30 17:19 ` [PATCH 1/2] netdev: ethtool RXHASH flag Jeff Garzik
2010-03-31 6:52 ` David Miller
2010-03-31 6:52 ` [PATCH 1/2] netdev: add support for Receive Side Scaling hash control David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100329174727.4654e19c@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).