From: Ben Hutchings <bhutchings@solarflare.com>
To: Sathya Perla <sathya.perla@emulex.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] be2net: hash key for rss-config cmd not set
Date: Mon, 23 May 2011 08:48:38 -0700 [thread overview]
Message-ID: <1306165718.3456.53.camel@localhost> (raw)
In-Reply-To: <249a7eac-6aa7-481d-b7b0-a2a3b144963f@exht1.ad.emulex.com>
On Mon, 2011-05-23 at 17:55 +0530, Sathya Perla wrote:
> Need a random hash key to effectively hash incoming connections into
> multiple RX rings.
>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
> drivers/net/benet/be_cmds.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
> index 2463b1c..81654ae 100644
> --- a/drivers/net/benet/be_cmds.c
> +++ b/drivers/net/benet/be_cmds.c
> @@ -1703,7 +1703,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
> {
> struct be_mcc_wrb *wrb;
> struct be_cmd_req_rss_config *req;
> - u32 myhash[10];
/* Chosen by a fair dice roll */ ?
> + u32 myhash[10] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF,
> + 0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF};
> int status;
>
> if (mutex_lock_interruptible(&adapter->mbox_lock))
This is of course less random than the stack garbage you were presumably
using before. Though I don't know to what extent random hash keys are
really a good idea.
I have heard the suggestion that Toeplitz hash keys should in fact be
randomised per-system, so that flows will be hashed to the same queue
numbers on each interface if their hash indirection tales are also the
same. This would presumably be good for bonding with multiple active
links, forwarding, etc., especially when multiple drivers (which
currently have different behaviour) are involved.
Ben.
--
Ben Hutchings, Senior Software 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.
next prev parent reply other threads:[~2011-05-23 15:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 12:25 [PATCH] be2net: hash key for rss-config cmd not set Sathya Perla
2011-05-23 15:48 ` Ben Hutchings [this message]
2011-05-23 19:52 ` David Miller
2011-05-24 5:46 ` Sathya.Perla
2011-05-24 6:22 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2011-05-24 6:29 Sathya Perla
2011-05-24 13:12 ` Flavio Leitner
2011-05-24 17:34 ` David Miller
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=1306165718.3456.53.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=sathya.perla@emulex.com \
/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;
as well as URLs for NNTP newsgroup(s).