Thread (23 messages) flat view 23 messages, 4 authors, 2015-03-24

Re: [v3 PATCH 3/9] rhashtable: Allow hashfn to be unset

From: Thomas Graf <tgraf@suug.ch>
Date: 2015-03-23 15:36:38

On 03/24/15 at 12:50am, Herbert Xu wrote:
Since every current rhashtable user uses jhash as their hash
function, the fact that jhash is an inline function causes each
user to generate a copy of its code.

This function provides a solution to this problem by allowing
hashfn to be unset.  In which case rhashtable will automatically
set it to jhash.  Furthermore, if the key length is a multiple
of 4, we will switch over to jhash2.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Thomas Graf <tgraf@suug.ch>

I'll add some documentation when the API stabilizes and multiple
rehashing is complete.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help