[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1455892869.648.22.camel@edumazet-ThinkPad-T530>
Date: Fri, 19 Feb 2016 15:41:09 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Neil Horman <nhorman@...driver.com>
Cc: linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>,
Vladislav Yasevich <vyasevich@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCHv2] sctp: Fix port hash table size computation
On ven., 2016-02-19 at 09:07 -0500, Neil Horman wrote:
> I had actually thought about that, but to be frank I felt like the logic to
> compute the hashsize was complex the way it was presented currently, and that my
> rewite made it more clear, breaking it down into a few easy steps:
>
> 1) compute a goal size order
> 2) compute the target order for the largest table we want to support
> 3) select the minimum of (1) and (2)
> 4) allocated the largest table we can up to the size in (3)
> 5) compute how many buckets the table we allocated in (4) supports
>
>
> I'm happy to use your suggestion above if the consensus is that its more clear,
> but it took me a bit to figure out what exactly the existing code was trying to
> do (especially given the dual use of the order variable), so I thought some
> additional clarity was called for.
No strong feelings. I only took a look in other places like
net/dccp/proto.c for similar problem.
Powered by blists - more mailing lists