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-10 19:07:44

From: Roland Dreier <redacted>
Date: Fri, 8 Jul 2011 16:11:00 -0700
Maybe * of hash key with a random odd value is good enough?
Yes, from what I've read over the past few days it should
be.  More precisely:

	(key * hash_rnd) >> (32 - hash_table_size_log2)

where "hash_rnd" is odd.

The reason we want the top bits is because multiplies intrinsically
work such that bits in the inputs can only effect the same or higher
bits in the result.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help