From: Ben Hutchings <bhutchings@solarflare.com>
To: Matt Carlson <mcarlson@broadcom.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
Michael Chan <mchan@broadcom.com>
Subject: Re: [PATCH v3] tg3: Make the RSS indir tbl admin configurable
Date: Fri, 16 Dec 2011 22:58:38 +0000 [thread overview]
Message-ID: <1324076318.2798.27.camel@bwh-desktop> (raw)
In-Reply-To: <1324074791-10463-1-git-send-email-mcarlson@broadcom.com>
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@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.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.
prev parent reply other threads:[~2011-12-16 22:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 22:33 [PATCH v3] tg3: Make the RSS indir tbl admin configurable Matt Carlson
2011-12-16 22:58 ` Ben Hutchings [this message]
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=1324076318.2798.27.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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