Thread (6 messages) 6 messages, 3 authors, 2006-06-01

Re: Question about tcp hash function tcp_hashfn()

flat view

From: David Miller <davem@davemloft.net>
Date: 2006-05-31 18:40:58
Also in: lkml

From: Evgeniy Polyakov <redacted>
Date: Wed, 31 May 2006 14:58:18 +0400
On Wed, May 31, 2006 at 03:51:24AM -0600, Brian F. G. Bidulock (bidulock@openss7.org) wrote:
quoted
  Worse: he folded the jenkins algorith result with

   h ^= h >> 16;
   h ^= h >> 8;

  Destroying the coverage of the function.
It was done to simulate socket code which uses the same folding.
Leaving 32bit space is just wrong, consider hash table size with that
index.
You absolutely show not do this shifting on the jenkins hash
result, you destroy the distribution entirely.  Just mask
it with the hash mask and that's all you need to do.

Brian is right, this is absolutely critical to using the Jenkins hash
correctly.  You're "unmixing" the bits it worked so hard to mix.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help