lvs-devel
|
To: | horms@xxxxxxxxxxxx, ja@xxxxxx, pablo@xxxxxxxxxxxxx, kadlec@xxxxxxxxxxxxx, fw@xxxxxxxxx, davem@xxxxxxxxxxxxx, edumazet@xxxxxxxxxx, kuba@xxxxxxxxxx, pabeni@xxxxxxxxxx |
---|---|
Subject: | [PATCH net] ipvs: Simplify the allocation of ip_vs_conn slab caches |
Cc: | netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Kunwu Chan <chentao@xxxxxxxxxx> |
From: | Kunwu Chan <chentao@xxxxxxxxxx> |
Date: | Wed, 17 Jan 2024 15:20:45 +0800 |
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@xxxxxxxxxx> --- 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; -- 2.39.2 |
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [PATCH net] net: ipvs: avoid stat macros calls from preemptible context, Simon Horman |
---|---|
Next by Date: | Re: [PATCH net] ipvs: Simplify the allocation of ip_vs_conn slab caches, Denis Kirjanov |
Previous by Thread: | [PATCH net] net: ipvs: avoid stat macros calls from preemptible context, Fedor Pchelkin |
Next by Thread: | Re: [PATCH net] ipvs: Simplify the allocation of ip_vs_conn slab caches, Denis Kirjanov |
Indexes: | [Date] [Thread] [Top] [All Lists] |