Subject: Re: [PATCH nf-next] netfilter: flowtable: dedicated slab for flow entry

From: Florian Westphal <[email-masked]>
Date: Thu, 29 Jan 2026 11:26:41 +0100

Qingfang Deng <[email-masked]> wrote:
> The size of `struct flow_offload` has grown beyond 256 bytes on 64-bit
> kernels (currently 280 bytes) because of the `flow_offload_tunnel`
> member added recently. So kmalloc() allocates from the kmalloc-512 slab,
> causing significant memory waste per entry.
> 
> Introduce a dedicated slab cache for flow entries to reduce memory
> footprint. Results in a reduction from 512 bytes to 320 bytes per entry
> on x86_64 kernels.

Ok, but please use KMEM_CACHE(), we've had a bunch of patches
that removed kmem_cache_create() in several places, I would like
to avoid a followup patch.