lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Sep 2015 04:03:22 +0800
From:	lucien xin <lucien.xin@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	network dev <netdev@...r.kernel.org>,
	Marcelo Ricardo Leitner <mleitner@...hat.com>,
	Vlad Yasevich <vyasevic@...hat.com>, daniel@...earbox.net
Subject: Re: [PATCH net] sctp: support global vtag assochash and per endpoint
 s(d)port assochash table

On Tue, Sep 1, 2015 at 6:16 AM, David Miller <davem@...emloft.net> wrote:
> From: Xin Long <lucien.xin@...il.com>
> Date: Tue,  1 Sep 2015 01:44:28 +0800
>
>> @@ -524,18 +524,16 @@ static inline int sctp_assoc_hashfn(struct net *net, __u16 lport, __u16 rport)
>>  {
>>       int h = (lport << 16) + rport + net_hash_mix(net);
>>       h ^= h>>8;
>> -     return h & (sctp_assoc_hashsize - 1);
>> +     return h & (256 - 1);
>
> It is not acceptable to use a magic constant for the hash table size.
> You need to define this using a macro and use it consistently.
>
> Furthermore, you should be looking into dynamically sized
> hash tables because not everyone will need this many entries.

okay, I will correct it, thanks
--
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