LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH nf-next 2/5] ipvs: add resizable hash tables

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH nf-next 2/5] ipvs: add resizable hash tables
Cc: Simon Horman <horms@xxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, Dust Li <dust.li@xxxxxxxxxxxxxxxxx>, Jiejian Wu <jiejian@xxxxxxxxxxxxxxxxx>, rcu@xxxxxxxxxxxxxxx
From: Florian Westphal <fw@xxxxxxxxx>
Date: Tue, 3 Mar 2026 21:27:42 +0100
Julian Anastasov <ja@xxxxxx> wrote:
> > There is some checkpatch noise in patch 1:
> > 
> > CHECK: Alignment should match open parenthesis
> > #42: FILE: include/linux/rculist_bl.h:24:
> > +       rcu_assign_pointer(hlist_bl_first_rcu(h),
> >                 (struct hlist_bl_node *)((unsigned long)n | 
> > LIST_BL_LOCKMASK));
> 
>       I don't change here any alignment and I didn't fixed it
> because I'm not sure how to make it better :)

Thats fine, then just ignore it.
As I said, the checkpatch stuff isn't too imporant.

> > Why are you not re-using rhashtables and instead roll your own?
> > 
> > No requirement, but might make sense to mention the rationale
> > in the commit message.
> 
>       I found the rhashtable_remove_fast operation slow by using 
> hashing+lookup. Also, IPVS needs to rehash (move) single entry when
> its key changes (cport in ip_vs_conn_fill_cport) and I don't see
> public method in rht for this. Things get complicated when we add double 
> conn hashing, it needs careful move operation from one/two chains. Also, 
> in part 4 of the changes we allow customizations for the load factor,
> in case the defaults are not suitable for the setup.
> 
>       May be I can add more info in the commit message about this.

Yes, I think your explanation makes sense, a small note/copypaste of
the above into the commit message is enough.

Thanks!


<Prev in Thread] Current Thread [Next in Thread>