[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5505A142.6020606@cogentembedded.com>
Date: Sun, 15 Mar 2015 18:12:02 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Herbert Xu <herbert@...dor.apana.org.au>,
David Miller <davem@...emloft.net>, tgraf@...g.ch,
netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [v1 PATCH 2/14] rhashtable: Introduce max_size/min_size
Hello.
On 3/15/2015 1:44 PM, Herbert Xu wrote:
> This patch adds the parameters max_size and min_size which are
> meant to replace max_shift and min_shift.
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
[...]
> diff --git a/lib/rhashtable.c b/lib/rhashtable.c
> index 4a99c0c..5101e18 100644
> --- a/lib/rhashtable.c
> +++ b/lib/rhashtable.c
[...]
> @@ -872,7 +874,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_stop);
> static size_t rounded_hashtable_size(struct rhashtable_params *params)
> {
> return max(roundup_pow_of_two(params->nelem_hint * 4 / 3),
> - 1UL << params->min_shift);
> + max(1UL << params->min_shift,
max_t(), perhaps?
> + (unsigned long)params->min_size));
> }
>
> /**
[...]
WBR, Sergei
--
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