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  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]
Date:	Sun, 09 Mar 2014 23:23:02 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Venkata Duvvuru <VenkatKumar.Duvvuru@...lex.Com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next 1/2] ethtool: Support for configurable RSS
 hash key

On Thu, 2014-03-06 at 14:23 +0000, Venkata Duvvuru wrote:
> > > + * @get_rxfh: Get the contents of the RX flow hash indirection table and
> > hash
> > > + *	key.
> > > + *	Will not be called if @get_rxfh_indir_size and @get_rxfh_key_size
> > > + *	returns zero.
> > 
> > Shouldn't that 'and' be an 'or'?  I.e. this is only called if the driver exposes both
> > the key and the indirection table.
> What about the existing drivers those support only indirection configuration.

Right, I forgot to revise this after reading further.

[...]
> > > +	rss_info->indir_size = user_indir_size;
> > > +	rss_info->key_size = user_key_size;
> > > +	ret = dev->ethtool_ops->get_rxfh(dev, rss_info);
> > 
> > I think it would be better to pass the driver two separate pointers into the
> > buffer, one for the indirection table and one for the key.
> The intention is to avoid changing "get_rxfh/set_rxfh" interface every
> time a new configurable parameter is introduced.

OK.

> > > +	if ((user_indir_size && ((user_indir_size != 0xDEADBEEF) &&
> > > +				 user_indir_size != dev_indir_size)) ||
> > > +	    (user_key_size && (user_key_size != dev_key_size)))
> > > +		return -EINVAL;
> > > +
> > > +	if (user_indir_size && user_indir_size != 0xDEADBEEF)
> > > +		indir_bytes = user_indir_size * sizeof(rss_info->rss_config[0]);
> > 
> > Why is 0xDEADBEEF special?
> Since 0 is used as a hint to reset to default, we should have a way to
> hint that indirection table configuration is not requested in this
> context.

That's not necessary, as you can read and then write back the same
values.

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.

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

Powered by blists - more mailing lists