Subject: Re: [PATCH] bnx2x: Support for managing RX indirection table

From: Ben Hutchings <[email-masked]>
Date: Tue, 15 Feb 2011 16:48:49 +0000

On Tue, 2011-02-15 at 08:24 -0800, Tom Herbert wrote:
> Support fetching and retrieving RX indirection table via ethtool.
> 
> Signed-off-by: Tom Herbert <[email-masked]>
> ---
>  drivers/net/bnx2x/bnx2x.h         |    2 +
>  drivers/net/bnx2x/bnx2x_ethtool.c |   58 +++++++++++++++++++++++++++++++++++++
>  drivers/net/bnx2x/bnx2x_main.c    |   23 +++++++++++----
>  3 files changed, 77 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
> index 236d79a..bf16119 100644
> --- a/drivers/net/bnx2x/bnx2x.h
> +++ b/drivers/net/bnx2x/bnx2x.h
> @@ -1076,6 +1076,7 @@ struct bnx2x {
>  	int			num_queues;
>  	int			disable_tpa;
>  	int			int_mode;
> +	u32			rx_indir_table[128];

Shouldn't the dimension be TSTORM_INDIRECTION_TABLE_SIZE?

[...]
> +static int bnx2x_set_rxfh_indir(struct net_device *dev,
> +				const struct ethtool_rxfh_indir *indir)
> +{
> +	struct bnx2x *bp = netdev_priv(dev);
> +	size_t i;
> +
> +	if (bp->multi_mode == ETH_RSS_MODE_DISABLED)
> +		return -ENOENT;
[...]

I think the error code for this should be -EOPNOTSUPP.  Similarly in
bnx2x_get_rxfh_indir().

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.