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

From: Eric Dumazet

Date: Fri Apr 10 2026 - 03:33:46 EST


On Thu, Apr 9, 2026 at 8:47 PM Jiayuan Chen <jiayuan.chen@xxxxxxxxx> 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@xxxxxxxxx>
> ---

Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>

Thanks!