diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-10 09:27:55 +1100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-11 16:28:25 -0400 |
commit | 988dfbd795cf08b00576c1ced4210281b2bccffc (patch) | |
tree | 535e1fbd7224c49386a5de1a8afc16948078489e /include/linux/rhashtable.h | |
parent | 0ddcf43d5d4a03ded1ee3f6b3b72a0cbed4e90b1 (diff) | |
download | talos-op-linux-988dfbd795cf08b00576c1ced4210281b2bccffc.tar.gz talos-op-linux-988dfbd795cf08b00576c1ced4210281b2bccffc.zip |
rhashtable: Move hash_rnd into bucket_table
Currently hash_rnd is a parameter that users can set. However,
no existing users set this parameter. It is also something that
people are unlikely to want to set directly since it's just a
random number.
In preparation for allowing the reseeding/rehashing of rhashtable,
this patch moves hash_rnd into bucket_table so that it's now an
internal state rather than a parameter.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r-- | include/linux/rhashtable.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index d438eeb08bff..5ef8ea551556 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -49,12 +49,14 @@ struct rhash_head { /** * struct bucket_table - Table of hash buckets * @size: Number of hash buckets + * @hash_rnd: Random seed to fold into hash * @locks_mask: Mask to apply before accessing locks[] * @locks: Array of spinlocks protecting individual buckets * @buckets: size * hash buckets */ struct bucket_table { size_t size; + u32 hash_rnd; unsigned int locks_mask; spinlock_t *locks; @@ -72,7 +74,6 @@ struct rhashtable; * @key_len: Length of key * @key_offset: Offset of key in struct to be hashed * @head_offset: Offset of rhash_head in struct to be hashed - * @hash_rnd: Seed to use while hashing * @max_shift: Maximum number of shifts while expanding * @min_shift: Minimum number of shifts while shrinking * @nulls_base: Base value to generate nulls marker @@ -85,7 +86,6 @@ struct rhashtable_params { size_t key_len; size_t key_offset; size_t head_offset; - u32 hash_rnd; size_t max_shift; size_t min_shift; u32 nulls_base; |