Thread (8 messages) flat view 8 messages, 3 authors, 2016-02-22

Re: [PATCHv2] sctp: Fix port hash table size computation

From: Eric Dumazet <hidden>
Date: 2016-02-19 14:41:13
Also in: linux-sctp

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help