Re: [PATCH net-next] net: skb: clean up dead code after skb_kfree_head() simplification

Eric Dumazet
2026-04-10T07:30:15Z

On Thu, Apr 9, 2026 at 8:47 PM Jiayuan Chen <jiayuan.chen@linux.dev> wrote:
>
> Since commit 0f42e3f4fe2a ("net: skb: fix cross-cache free of
> KFENCE-allocated skb head"), skb_kfree_head() always calls kfree()
> and no longer uses end_offset to distinguish between skb_small_head_cache
> and generic kmalloc caches.
>
> Clean up the leftovers:
>
> - Remove the unused end_offset parameter from skb_kfree_head() and
> update all callers.
> - Remove the SKB_SMALL_HEAD_HEADROOM guard in __skb_unclone_keeptruesize()
> which was protecting the old skb_kfree_head() logic.
> - Update the SKB_SMALL_HEAD_CACHE_SIZE comment to reflect that the
> non-power-of-2 sizing is no longer used for free-path disambiguation.
>
> No functional change.
>
> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
> ---

Reviewed-by: Eric Dumazet <edumazet@google.com>

Thanks!