[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba5b4e70-365f-476a-9969-6f9a891221a7@kylinos.cn>
Date: Thu, 18 Jan 2024 10:22:05 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: Simon Horman <horms@...nel.org>
Cc: ja@....bg, pablo@...filter.org, kadlec@...filter.org, fw@...len.de,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org, lvs-devel@...r.kernel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] ipvs: Simplify the allocation of ip_vs_conn slab
caches
Hi Simon,
Thanks for your reply.
On 2024/1/17 17:29, Simon Horman wrote:
> On Wed, Jan 17, 2024 at 03:20:45PM +0800, Kunwu Chan wrote:
>> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>> to simplify the creation of SLAB caches.
>>
>> Signed-off-by: Kunwu Chan <chentao@...inos.cn>
>
> Hi Kunwu Chan,
>
> I think this is more of a cleanup than a fix,
> so it should probably be targeted at 'nf-next' rather than 'net'.
Thanks, I'm confused about when to use "nf-next" or "net" or "net-next".
"nf-next" means fixing errors for linux-next.git and linux-stable.git,
while "nf" or "next" just means linux-next.git?
>
> If it is a fix, then I would suggest targeting it at 'nf'
> and providing a Fixes tag.
I'll keep it in mind in the future.
>
> The above notwithstanding, this looks good to me.
>
> Acked-by: Simon Horman <horms@...nel.org>
>
>> ---
>> net/netfilter/ipvs/ip_vs_conn.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
>> index a743db073887..98d7dbe3d787 100644
>> --- a/net/netfilter/ipvs/ip_vs_conn.c
>> +++ b/net/netfilter/ipvs/ip_vs_conn.c
>> @@ -1511,9 +1511,7 @@ int __init ip_vs_conn_init(void)
>> return -ENOMEM;
>>
>> /* Allocate ip_vs_conn slab cache */
>> - ip_vs_conn_cachep = kmem_cache_create("ip_vs_conn",
>> - sizeof(struct ip_vs_conn), 0,
>> - SLAB_HWCACHE_ALIGN, NULL);
>> + ip_vs_conn_cachep = KMEM_CACHE(ip_vs_conn, SLAB_HWCACHE_ALIGN);
>> if (!ip_vs_conn_cachep) {
>> kvfree(ip_vs_conn_tab);
>> return -ENOMEM;
--
Thanks,
Kunwu
Powered by blists - more mailing lists