[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150318.124742.962014167222813920.davem@davemloft.net>
Date: Wed, 18 Mar 2015 12:47:42 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: tgraf@...g.ch
Cc: herbert@...dor.apana.org.au, netdev@...r.kernel.org,
eric.dumazet@...il.com
Subject: Re: [v2 PATCH 2/6] rhashtable: Introduce max_size/min_size
From: Thomas Graf <tgraf@...g.ch>
Date: Wed, 18 Mar 2015 10:55:28 +0000
> On 03/18/15 at 08:01pm, Herbert Xu wrote:
>> @@ -935,6 +938,7 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params)
>>
>> params->min_shift = max_t(size_t, params->min_shift,
>> ilog2(HASH_MIN_SIZE));
>> + params->min_size = max(params->min_size, HASH_MIN_SIZE);
>>
>> if (params->nelem_hint)
>> size = rounded_hashtable_size(params);
>
> The only change I would add on top is to ensure that min_size
> and max_size are a power of two as otherwise the table size
> used will end up being greater or smaller than specified.
> I can do that as a follow-up though.
Feel free.
--
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