public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Matt Carlson" <mcarlson@broadcom•com>
To: "Ben Hutchings" <bhutchings@solarflare•com>
Cc: "David Miller" <davem@davemloft•net>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"linux-net-drivers@solarflare•com"
	<linux-net-drivers@solarflare•com>,
	"Matthew Carlson" <mcarlson@broadcom•com>
Subject: Re: [PATCH net-next 1/3] ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR
Date: Thu, 15 Dec 2011 17:14:03 -0800	[thread overview]
Message-ID: <20111216011403.GA8197@mcarlson.broadcom.com> (raw)
In-Reply-To: <1323993076.2773.23.camel@bwh-desktop>

On Thu, Dec 15, 2011 at 03:51:16PM -0800, Ben Hutchings wrote:
> In order to find out the device's RX flow hash table size, ethtool
> initially uses ETHTOOL_GRXFHINDIR with a buffer size of zero.  This
> must be supported, but it is not necessary to support any other user
> buffer size less than the device table size.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare•com>
> ---
>  include/linux/ethtool.h |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 20db5b27..0ec2fd4 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -543,8 +543,9 @@ struct compat_ethtool_rxnfc {
>  /**
>   * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection
>   * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR
> - * @size: On entry, the array size of the user buffer.  On return from
> - *	%ETHTOOL_GRXFHINDIR, the array size of the hardware indirection table.
> + * @size: On entry, the array size of the user buffer, which may be zero
> + *	for %ETHTOOL_GRXFHINDIR.  On return from %ETHTOOL_GRXFHINDIR, the
> + *	array size of the hardware indirection table.

Can we roll in the documentation request you gave me earlier?  Something
to the effect of:

"A zero size with %ETHTOOL_SRXFHINDIR means userspace relinquishes
control of the indirection table."

>   * @ring_index: RX ring/queue index for each hash value
>   */
>  struct ethtool_rxfh_indir {
> -- 
> 1.7.4.4
> 
> 
> 
> -- 
> Ben Hutchings, Staff 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.
> 
> 

  parent reply	other threads:[~2011-12-16  1:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 23:51 [PATCH net-next 1/3] ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR Ben Hutchings
2011-12-15 23:55 ` [PATCH net-next 2/3] ethtool: Centralise validation of ETHTOOL_{G,S}RXFHINDIR parameters Ben Hutchings
2011-12-16  0:51   ` Dimitris Michailidis
2011-12-16 18:53   ` David Miller
2011-12-15 23:56 ` [PATCH net-next 3/3] ethtool: Define and apply a default policy for RX flow hash indirection Ben Hutchings
2011-12-16  3:38   ` Shreyas Bhatewara
2011-12-16 18:54   ` David Miller
2011-12-16  1:14 ` Matt Carlson [this message]
2011-12-16 18:53 ` [PATCH net-next 1/3] ethtool: Clarify use of size field for ETHTOOL_GRXFHINDIR 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=20111216011403.GA8197@mcarlson.broadcom.com \
    --to=mcarlson@broadcom$(echo .)com \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=linux-net-drivers@solarflare$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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