diff mbox series

[net-next,01/12] netfilter: expect: Simplify the allocation of slab caches in nf_conntrack_expect_init

Message ID 20240221112637.5396-2-fw@strlen.de (mailing list archive)
State Accepted
Commit aa23cfe6ab500dbbfa630602b403f433522daf9f
Delegated to: Netdev Maintainers
Headers show
Series [net-next,01/12] netfilter: expect: Simplify the allocation of slab caches in nf_conntrack_expect_init | expand

Checks

Context Check Description
netdev/series_format success Pull request is its own cover letter
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 940 this patch: 940
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 3 maintainers not CCed: pablo@netfilter.org coreteam@netfilter.org kadlec@netfilter.org
netdev/build_clang success Errors and warnings before: 957 this patch: 957
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 957 this patch: 957
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-23--03-00 (tests: 1457)

Commit Message

Florian Westphal Feb. 21, 2024, 11:26 a.m. UTC
From: Kunwu Chan <chentao@kylinos.cn>

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@kylinos.cn>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/netfilter/nf_conntrack_expect.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 23, 2024, 3:20 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Florian Westphal <fw@strlen.de>:

On Wed, 21 Feb 2024 12:26:03 +0100 you wrote:
> From: Kunwu Chan <chentao@kylinos.cn>
> 
> 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@kylinos.cn>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> 
> [...]

Here is the summary with links:
  - [net-next,01/12] netfilter: expect: Simplify the allocation of slab caches in nf_conntrack_expect_init
    https://git.kernel.org/netdev/net-next/c/aa23cfe6ab50
  - [net-next,02/12] netfilter: nf_log: consolidate check for NULL logger in lookup function
    https://git.kernel.org/netdev/net-next/c/79578be4d35c
  - [net-next,03/12] netfilter: nf_log: validate nf_logger_find_get()
    https://git.kernel.org/netdev/net-next/c/c47ec2b120b4
  - [net-next,04/12] netfilter: nft_osf: simplify init path
    https://git.kernel.org/netdev/net-next/c/29a280025580
  - [net-next,05/12] netfilter: xtables: fix up kconfig dependencies
    https://git.kernel.org/netdev/net-next/c/749d4ef0868c
  - [net-next,06/12] netfilter: nft_set_pipapo: constify lookup fn args where possible
    https://git.kernel.org/netdev/net-next/c/f04df573faf9
  - [net-next,07/12] netfilter: nft_set_pipapo: do not rely on ZERO_SIZE_PTR
    https://git.kernel.org/netdev/net-next/c/07ace0bbe03b
  - [net-next,08/12] netfilter: nft_set_pipapo: shrink data structures
    https://git.kernel.org/netdev/net-next/c/aac14d516c2b
  - [net-next,09/12] netfilter: nft_set_pipapo: speed up bulk element insertions
    https://git.kernel.org/netdev/net-next/c/9f439bd6ef4f
  - [net-next,10/12] netfilter: nft_set_pipapo: use GFP_KERNEL for insertions
    https://git.kernel.org/netdev/net-next/c/5b651783d80b
  - [net-next,11/12] netfilter: move nf_reinject into nfnetlink_queue modules
    https://git.kernel.org/netdev/net-next/c/3f8019688894
  - [net-next,12/12] netfilter: x_tables: Use unsafe_memcpy() for 0-sized destination
    https://git.kernel.org/netdev/net-next/c/26f4dac11775

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 81ca348915c9..21fa550966f0 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -722,9 +722,7 @@  int nf_conntrack_expect_init(void)
 			nf_ct_expect_hsize = 1;
 	}
 	nf_ct_expect_max = nf_ct_expect_hsize * 4;
-	nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect",
-				sizeof(struct nf_conntrack_expect),
-				0, 0, NULL);
+	nf_ct_expect_cachep = KMEM_CACHE(nf_conntrack_expect, 0);
 	if (!nf_ct_expect_cachep)
 		return -ENOMEM;