From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next-2.6 PATCH] ethtool: Add n-tuple string length to drvinfo and return it
Date: Fri, 26 Feb 2010 03:54:20 -0800 [thread overview]
Message-ID: <20100226115355.20213.59254.stgit@localhost.localdomain> (raw)
From: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>
The drvinfo struct should include the number of strings that
get_rx_ntuple will return. It will be variable if an underlying
driver implements its own get_rx_ntuple routine, so userspace
needs to know how much data is coming.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
include/linux/ethtool.h | 1 +
net/core/ethtool.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index cca1c3d..f7992a2 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -63,6 +63,7 @@ struct ethtool_drvinfo {
char reserved2[12];
__u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
__u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
+ __u32 n_ntuples; /* number of n-tuple filters from GSTRINGS */
__u32 testinfo_len;
__u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */
__u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 31b1edd..1c94f48 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -224,6 +224,9 @@ static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *use
rc = ops->get_sset_count(dev, ETH_SS_PRIV_FLAGS);
if (rc >= 0)
info.n_priv_flags = rc;
+ rc = ops->get_sset_count(dev, ETH_SS_NTUPLE_FILTERS);
+ if (rc >= 0)
+ info.n_ntuples = rc;
}
if (ops->get_regs_len)
info.regdump_len = ops->get_regs_len(dev);
next reply other threads:[~2010-02-26 11:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 11:54 Jeff Kirsher [this message]
2010-02-26 12:20 ` [net-next-2.6 PATCH] ethtool: Add n-tuple string length to drvinfo and return it David Miller
2010-02-26 13:05 ` Jeff Garzik
2010-02-26 13:11 ` David Miller
2010-02-26 20:08 ` Peter P Waskiewicz Jr
2010-02-26 13:44 ` [PATCH] " Jeff Garzik
2010-02-26 13:56 ` Jeff Garzik
2010-02-26 13:59 ` Jeff Garzik
2010-02-26 23:49 ` Peter P Waskiewicz Jr
2010-02-27 6:31 ` Jeff Garzik
2010-02-27 7:25 ` Jeff Garzik
2010-02-27 20:28 ` Waskiewicz Jr, Peter P
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=20100226115355.20213.59254.stgit@localhost.localdomain \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
/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).