[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110710.120732.419322076297775729.davem@davemloft.net>
Date: Sun, 10 Jul 2011 12:07:32 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: roland@...estorage.com
Cc: johnwheffner@...il.com, mj@....cz, netdev@...r.kernel.org
Subject: Re: ipv4: Simplify ARP hash function.
From: Roland Dreier <roland@...estorage.com>
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists