lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1395965668.2898.17.camel@deadeye.wl.decadent.org.uk>
Date:	Fri, 28 Mar 2014 00:14:28 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	"Williams, Mitch A" <mitch.a.williams@...el.com>
Cc:	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"Sullivan, Catherine" <catherine.sullivan@...el.com>
Subject: Re: [net-next 03/16] i40evf: Support RSS option in ethtool

On Wed, 2014-03-26 at 19:21 +0000, Williams, Mitch A wrote:
> 
> > -----Original Message-----
> > From: Ben Hutchings [mailto:ben@...adent.org.uk]
> > Sent: Monday, March 17, 2014 11:54 AM
> > To: Kirsher, Jeffrey T
> > Cc: davem@...emloft.net; Williams, Mitch A; netdev@...r.kernel.org;
> > gospo@...hat.com; sassmann@...hat.com; Sullivan, Catherine
> > Subject: Re: [net-next 03/16] i40evf: Support RSS option in ethtool
> > 
> > On Mon, 2014-03-17 at 05:45 -0700, Jeff Kirsher wrote:
> > > From: Mitch Williams <mitch.a.williams@...el.com>
> > >
> > > Add support for viewing and modifying RSS hash options and RSS hash
> > > look-up table programming through ethtool. Because the lookup table is
> > > so small for the VFs (only 16 registers), we don't bother to maintain a
> > > shadow table in memory, we just read and write the registers directly.
> > [...]
> > > +static int i40evf_get_rss_hash_opts(struct i40evf_adapter *adapter,
> > > +				    struct ethtool_rxnfc *cmd)
> > > +{
> > > +	cmd->data = 0;
> > > +
> > > +	/* Report default options for RSS on i40e */
> > 
> > But you're allowing them to be changed from the defaults, so this is
> > wrong.
> 
> Ben, I've got a question on this. Should the ETHTOOL_GRXFH option
> report what the driver and device are capable of, or should it report
> the current configuration? 

It should report the current configuration.

> If this option is supposed to report device capabilities, how can we
> find out the current configuration? And if it's supposed to report the
> current configuration, then how do we find out the device
> capabilities?

You can't find out the device capabilities except by trial and error (or
driver-specific documentation).  Even if ETHTOOL_GRXFH did tell you
which fields *could* be included in the hash, the structure doesn't have
space to tell you which subsets are supported.

> I've been wading through the kernel source, and I see both. So I'm
> confused.
[...]

The first implementation was in niu, and in the absence of accompanying
documentation that is what I took to define the interface and what I
attempted to document in <linux/ethtool.h>.  If you think the current
kernel-doc comment on struct ethtool_rxnfc is not clear enough, please
do send a patch to improve the wording.

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ