From: Andi Kleen <andi@firstfloor.org>
To: David Miller <davem@davemloft.net>
Cc: andi@firstfloor.org, netdev@vger.kernel.org
Subject: Re: [PATCH] Make simple TX hash little endian safe.
Date: Mon, 21 Jul 2008 19:20:01 +0200 [thread overview]
Message-ID: <20080721172001.GD29543@basil.nowhere.org> (raw)
In-Reply-To: <20080721.094433.235903960.davem@davemloft.net>
On Mon, Jul 21, 2008 at 09:44:33AM -0700, David Miller wrote:
> From: Andi Kleen <andi@firstfloor.org>
> Date: Mon, 21 Jul 2008 10:48:07 +0200
>
> > Currently it will not use the lower
> > bits at all on big endian system, mapping e.g. all connections to a single
> > queue on a local network which only differs in the low bits.
> >
> > Also fold the upper 16 bits always in the lower 16bits.
> >
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> I plan to make this use jhash plus a reciprocol multiply
> to fix the hash effectiveness as well as get rid of the
> modulus and make the hash not attackable.
Ok makes sense to use jhash and also the multiplication.
Hmm but randomizations means it won't be stable on benchmarks, will it?
Is attacking such a hash really a problem? Having stable performance
on benchmarks might be preferable.
The other thing (one of my favourite pet peeves) is that
get_random_bytes() on reasonably early kernel boot
is not very random because there will be hardly any entropy in the pool.
So I'm not sure it is actually particularly non predictible,
at least on systems who transmit packets early.
-Andi
prev parent reply other threads:[~2008-07-21 17:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 8:48 [PATCH] Make simple TX hash little endian safe Andi Kleen
2008-07-21 8:48 ` [PATCH] Add a statistics counter for tx hash miss Andi Kleen
2008-07-21 16:33 ` David Miller
2008-07-21 16:44 ` Andi Kleen
2008-07-21 16:51 ` David Miller
2008-07-21 12:32 ` [PATCH] Make simple TX hash little endian safe Jarek Poplawski
2008-07-21 15:17 ` Andi Kleen
2008-07-21 16:44 ` David Miller
2008-07-21 17:20 ` Andi Kleen [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=20080721172001.GD29543@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=davem@davemloft.net \
--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;
as well as URLs for NNTP newsgroup(s).