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] [day] [month] [year] [list]
Date:	Fri, 16 Dec 2011 22:58:38 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Matt Carlson <mcarlson@...adcom.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>,
	Michael Chan <mchan@...adcom.com>
Subject: Re: [PATCH v3] tg3: Make the RSS indir tbl admin configurable

On Fri, 2011-12-16 at 14:33 -0800, Matt Carlson wrote:
> This patch adds the ethtool callbacks necessary to change the rss
> indirection table from userspace.  Should the number of interrupts
> change (e.g.  across a close / open call, or through a reset) and
> any one of the indirection table values fall out-of-range, the driver
> will reset the indirection table to a default layout.
> 
> [Integrated many suggestions made by Ben Hutchings.]
> 
> Signed-off-by: Matt Carlson <mcarlson@...adcom.com>
> Signed-off-by: Michael Chan <mchan@...adcom.com>
> Reviewed-by: Benjamin Li <benli@...adcom.com>
Reviewed-by: Ben Hutchings <bhutchings@...arflare.com>

Just a nitpick:

[...]
> +static int tg3_get_rxfh_indir(struct net_device *dev, u32 *indir)
> +{
> +	struct tg3 *tp = netdev_priv(dev);
> +	int i;
> +
> +	if (!tg3_flag(tp, SUPPORT_MSIX))
> +		return -EOPNOTSUPP;

The above check is not needed, because we promise not to to call
get_rxfh_indir() if get_rxfh_indir_size() returns 0.

> +	for (i = 0; i < TG3_RSS_INDIR_TBL_SIZE; i++)
> +		indir[i] = tp->rss_ind_tbl[i];
> +
> +	return 0;
> +}
> +
> +static int tg3_set_rxfh_indir(struct net_device *dev, const u32 *indir)
> +{
> +	struct tg3 *tp = netdev_priv(dev);
> +	size_t i;
> +
> +	if (!tg3_flag(tp, SUPPORT_MSIX))
> +		return -EOPNOTSUPP;
[...]

Same for this one.

Ben.

-- 
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.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ