Netdev List
 help / color / mirror / Atom feed
* [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two
@ 2015-03-20  8:13 rongqing.li
  2015-03-20  8:49 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2015-03-20  8:13 UTC (permalink / raw)
  To: netdev, tgraf, herbert

From: Li RongQing <roy.qing.li@gmail.com>

ht->p.min_size will be reset to params->min_size, which has been set
to the params->min_size round up of the power of two, should be kept

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
 lib/rhashtable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index e75c48d..fda169b 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -946,7 +946,7 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params)
 	if (params->max_size)
 		ht->p.max_size = rounddown_pow_of_two(params->max_size);
 
-	ht->p.min_size = max(params->min_size, HASH_MIN_SIZE);
+	ht->p.min_size = max(ht->p.min_size, HASH_MIN_SIZE);
 
 	if (params->locks_mul)
 		ht->p.locks_mul = roundup_pow_of_two(params->locks_mul);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two
  2015-03-20  8:13 [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two rongqing.li
@ 2015-03-20  8:49 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2015-03-20  8:49 UTC (permalink / raw)
  To: rongqing.li; +Cc: netdev, tgraf

On Fri, Mar 20, 2015 at 04:13:57PM +0800, rongqing.li@windriver.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
> 
> ht->p.min_size will be reset to params->min_size, which has been set
> to the params->min_size round up of the power of two, should be kept
> 
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
> Cc: Thomas Graf <tgraf@suug.ch>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>

Thanks for the patch but I've already fixed this in my tree which
I will post soon and I'd like to avoid having to rebase it yet
again for something as trivial as this.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-20  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20  8:13 [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two rongqing.li
2015-03-20  8:49 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox