Thread (21 messages) flat view 21 messages, 6 authors, 2011-07-10

Re: ipv4: Simplify ARP hash function.

From: David Miller <davem@davemloft.net>
Date: 2011-07-08 23:48:02

From: Stephen Hemminger <redacted>
Date: Fri, 8 Jul 2011 16:41:28 -0700
What about using murmur hash which has a four byte pass as well.
  https://sites.google.com/site/murmurhash/
I'm trying to avoid multiplies that are not done in hardware on some
cpus.

Right now I'm looking at one of Thomas Wang's hashes, referenced on
Bob Jenkin's hash analysis page:

u32 hashint(u32 a)
{
	a += ~(a<<15);
	a ^=  (a>>10);
	a +=  (a<<3);
	a ^=  (a>>6);
	a += ~(a<<11);
	a ^=  (a>>16);

	return a;
}

It's 15 instructions, and produces better entropy in the low bits of
the result than the high bits, which is fine for how we'll use this
thing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help