From: Ben Hutchings <bhutchings@solarflare.com>
To: Amit Kumar Salecha <amit.salecha@qlogic.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
ameen.rahman@qlogic.com, sucheta.chakraborty@qlogic.com,
anirban.chakraborty@qlogic.com
Subject: Re: [PATCH] net: ethtool support to configure number of channels
Date: Fri, 01 Apr 2011 18:10:24 +0100 [thread overview]
Message-ID: <1301677824.4679.10.camel@bwh-desktop> (raw)
In-Reply-To: <1301652075-382-1-git-send-email-amit.salecha@qlogic.com>
On Fri, 2011-04-01 at 03:01 -0700, Amit Kumar Salecha wrote:
> o Instead of cluttering struct ethtool_channels, defined channel type in
> struct ethtool_channels, making it scalable for addition future channels.
> Application needs to send different ioctl for each channel type.
> o There exist ETHTOOL_GRXRINGS command for getting number of RX rings,
> but it is tigtly coupled with RX flow hash configuration.
> o New channel id can be added in ethtool_channel_id to make it configurable.
> o Patches for qlcnic and netxen_nic driver supporting rx channel will follow
> soon.
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Since you have modified this, you must not use my Signed-off-by without
explaining that you have done so.
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
> ---
> include/linux/ethtool.h | 27 +++++++++++++++++++++++++++
> net/core/ethtool.c | 41 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 68 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index c8fcbdd..cdb69d6 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -229,6 +229,28 @@ struct ethtool_ringparam {
> __u32 tx_pending;
> };
>
> +/* for configuring number of network channel */
> +struct ethtool_channels {
> + __u32 cmd; /* ETHTOOL_{G,S}CHANNELS */
> + __u32 type; /* Channel type defined in ethtool_channel_id */
> +
> + /* Read only attributes. These indicate the maximum number
> + * of channel the driver will allow the user to set.
> + */
> + __u32 max;
This is a single read-only attribute, not 'attributes'.
> + /* Values changeable by the user. The valid values are
> + * in the range 1 to the "*_max" counterpart above.
> + */
> + __u32 pending;
> +};
Please could you use a kernel-doc comment to describe the structure. I
know my earlier patch (and most of the existing structures in ethtool.h)
didn't, but I have been gradually changing that.
I'm not sure why you reduced this to a single count. If if the driver
or hardware doesn't allow certain combinations of counts, it might be
necessary to configure several types at the same time
> +/* Channel ID is made up of a type */
> +enum ethtool_channel_id {
> + ETH_CHAN_TYPE_RX = 0x1,
> + ETH_CHAN_TYPE_TX = 0x2
> +};
[...]
enum ethtool_channel_id was meant to be an identifier of a specific
channel. An enumeration of channel types should be named differently.
This also omits the 'combined' and 'other' types. Most multiqueue
drivers pair up RX and TX queues so that most channels combine RX and TX
work.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-04-01 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 10:01 [PATCH] net: ethtool support to configure number of channels Amit Kumar Salecha
2011-04-01 17:10 ` Ben Hutchings [this message]
2011-04-02 2:36 ` Amit Salecha
2011-04-02 2:55 ` Ben Hutchings
2011-04-02 3:13 ` Amit Salecha
2011-04-02 3:22 ` Amit Salecha
2011-04-02 5:47 ` Anirban Chakraborty
2011-04-06 22:18 ` Ben Hutchings
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=1301677824.4679.10.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=ameen.rahman@qlogic.com \
--cc=amit.salecha@qlogic.com \
--cc=anirban.chakraborty@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sucheta.chakraborty@qlogic.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).