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

2016-02-21 Thread David Miller
From: Neil Horman Date: Thu, 18 Feb 2016 16:10:57 -0500 > Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in > its size computation, observing that the current method never guaranteed > that the hashsize (measured in number of entries) would be a power of two, > which the i

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

2016-02-19 Thread Neil Horman
On Fri, Feb 19, 2016 at 03:41:09PM +0100, Eric Dumazet wrote: > 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 > > rew

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

2016-02-19 Thread Eric Dumazet
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) co

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

2016-02-19 Thread Neil Horman
On Fri, Feb 19, 2016 at 11:28:50AM +0100, Eric Dumazet wrote: > On jeu., 2016-02-18 at 16:10 -0500, Neil Horman wrote: > > Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in > > its size computation, observing that the current method never guaranteed > > that the hashsize (me

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

2016-02-19 Thread Eric Dumazet
On jeu., 2016-02-18 at 16:10 -0500, Neil Horman wrote: > Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in > its size computation, observing that the current method never guaranteed > that the hashsize (measured in number of entries) would be a power of two, > which the inpu

[PATCHv2] sctp: Fix port hash table size computation

2016-02-18 Thread Neil Horman
Dmitry Vyukov noted recently that the sctp_port_hashtable had an error in its size computation, observing that the current method never guaranteed that the hashsize (measured in number of entries) would be a power of two, which the input hash function for that table requires. The root cause of the