public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philo Lu <lulie@linux.alibaba.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, dsahern@kernel.org, antony.antony@secunet.com,
	steffen.klassert@secunet.com, linux-kernel@vger.kernel.org,
	dust.li@linux.alibaba.com, jakub@cloudflare.com,
	fred.cc@alibaba-inc.com, yubing.qiuyubing@alibaba-inc.com
Subject: Re: [PATCH v3 net-next 2/3] net/udp: Add 4-tuple hash list basis
Date: Fri, 11 Oct 2024 09:23:15 +0800	[thread overview]
Message-ID: <ff81f918-527f-4114-abaf-0d3f9e207363@linux.alibaba.com> (raw)
In-Reply-To: <6707db425cc49_202921294a9@willemb.c.googlers.com.notmuch>



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@linux.alibaba.com>
>> Signed-off-by: Cambda Zhu <cambda@linux.alibaba.com>
>> Signed-off-by: Fred Chen <fred.cc@alibaba-inc.com>
>> Signed-off-by: Yubing Qiu <yubing.qiuyubing@alibaba-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


  reply	other threads:[~2024-10-11  1:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-10  9:03 [PATCH v3 net-next 0/3] udp: Add 4-tuple hash for connected sockets Philo Lu
2024-10-10  9:03 ` [PATCH v3 net-next 1/3] net/udp: Add a new struct for hash2 slot Philo Lu
2024-10-10  9:03 ` [PATCH v3 net-next 2/3] net/udp: Add 4-tuple hash list basis Philo Lu
2024-10-10 13:48   ` Willem de Bruijn
2024-10-11  1:23     ` Philo Lu [this message]
2024-10-10  9:03 ` [PATCH v3 net-next 3/3] ipv4/udp: Add 4-tuple hash for connected socket Philo Lu
2024-10-10 13:49   ` Willem de Bruijn
2024-10-11  1:37     ` Philo Lu
2024-10-11 14:50       ` Willem de Bruijn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff81f918-527f-4114-abaf-0d3f9e207363@linux.alibaba.com \
    --to=lulie@linux.alibaba.com \
    --cc=antony.antony@secunet.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=dust.li@linux.alibaba.com \
    --cc=edumazet@google.com \
    --cc=fred.cc@alibaba-inc.com \
    --cc=jakub@cloudflare.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=steffen.klassert@secunet.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=yubing.qiuyubing@alibaba-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox