Thread (27 messages) 27 messages, 8 authors, 2011-07-30

Re: [RFC net-next PATCH 3/4] ethtool: Add new set commands

From: Ben Hutchings <hidden>
Date: 2011-07-28 21:14:50

On Thu, 2011-07-28 at 09:14 -0700, David Miller wrote:
From: "Rose, Gregory V" <redacted>
Date: Thu, 28 Jul 2011 08:51:05 -0700
quoted
quoted
-----Original Message-----
From: David Miller [mailto:davem@davemloft.net]
Sent: Wednesday, July 27, 2011 10:28 PM
To: Rose, Gregory V
Cc: netdev@vger.kernel.org; bhutchings@solarflare.com; Kirsher, Jeffrey T
Subject: Re: [RFC net-next PATCH 3/4] ethtool: Add new set commands

From: Greg Rose <redacted>
Date: Wed, 27 Jul 2011 15:17:59 -0700
quoted
Add new set commands to configure the number of SR-IOV VFs, the
number of VM queues and spoof checking on/off switch.

Signed-off-by: Greg Rose <redacted>
---

 include/linux/ethtool.h |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c6e427a..c4972ba 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -36,12 +36,14 @@ struct ethtool_cmd {
 	__u8	mdio_support;
 	__u32	maxtxpkt;	/* Tx pkts before generating tx int */
 	__u32	maxrxpkt;	/* Rx pkts before generating rx int */
+	__u32	num_vfs;	/* Enable SR-IOV VFs */
+	__u32	num_vmqs;	/* Set number of queues for VMDq */
You can't change the layout of this datastructure in this way without
breaking every ethtool binary out there.

You have to find another place to add these knobs.
Perhaps at the end of the ethtool_cmd structure?  Something like this:
Either use the two reserved u32's we have there, or create a new
ethtool command and control structure.
I'm going to insist on the latter.  As I see it, struct ethtool_cmd is
for Ethernet PHY settings.  (The max{rx,tx}pkt fields weren't, but
they're obsolete.)

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help