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  linux-hardening  linux-cve-announce  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]
Message-ID: <ff81f918-527f-4114-abaf-0d3f9e207363@linux.alibaba.com>
Date: Fri, 11 Oct 2024 09:23:15 +0800
From: Philo Lu <lulie@...ux.alibaba.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, dsahern@...nel.org, antony.antony@...unet.com,
 steffen.klassert@...unet.com, linux-kernel@...r.kernel.org,
 dust.li@...ux.alibaba.com, jakub@...udflare.com, fred.cc@...baba-inc.com,
 yubing.qiuyubing@...baba-inc.com
Subject: Re: [PATCH v3 net-next 2/3] net/udp: Add 4-tuple hash list basis



On 2024/10/10 21:48, Willem de Bruijn wrote:
> Philo Lu wrote:
>> Add a new hash list, hash4, in udp table. It will be used to implement
>> 4-tuple hash for connected udp sockets. This patch adds the hlist to
>> table, and implements helpers and the initialization. 4-tuple hash is
>> implemented in the following patch.
>>
>> Signed-off-by: Philo Lu <lulie@...ux.alibaba.com>
>> Signed-off-by: Cambda Zhu <cambda@...ux.alibaba.com>
>> Signed-off-by: Fred Chen <fred.cc@...baba-inc.com>
>> Signed-off-by: Yubing Qiu <yubing.qiuyubing@...baba-inc.com>
> 
>> @@ -3480,16 +3486,15 @@ static struct udp_table __net_init *udp_pernet_table_alloc(unsigned int hash_ent
>>   	if (!udptable)
>>   		goto out;
>>   
>> -	slot_size = sizeof(struct udp_hslot) + sizeof(struct udp_hslot_main);
>> +	slot_size = 2 * sizeof(struct udp_hslot) + sizeof(struct udp_hslot_main);
>>   	udptable->hash = vmalloc_huge(hash_entries * slot_size,
>>   				      GFP_KERNEL_ACCOUNT);
>>   	if (!udptable->hash)
>>   		goto free_table;
>>   
>>   	udptable->hash2 = UDP_HSLOT_MAIN(udptable->hash + hash_entries);
>> -	udptable->mask = hash_entries - 1;
>> +	udptable->hash4 = (struct udp_hslot *)(udptable->hash2 + hash_entries);
> 
> Unintentional removal of the mask assignment?
> 

Will fix. Sorry for the mistake.

>>   	udptable->log = ilog2(hash_entries);
>> -
> 
> Unnecessary whitespace line removal
> 

Ditto.

Thank you for review, Willem.
-- 
Philo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ