Re: [PATCH net-next 2/2] net: kfree_skb_list use kmem_cache_free_bulk

Jakub Kicinski
2023-01-06T22:33:51Z

Hi!

Would it not be better to try to actually defer them (queue to
the deferred free list and try to ship back to the NAPI cache of
the allocating core)? Is the spin lock on the defer list problematic
for fowarding cases (which I'm assuming your target)?

Also the lack of perf numbers is a bit of a red flag.

On Thu, 05 Jan 2023 16:42:47 +0100 Jesper Dangaard Brouer wrote:
> +static void kfree_skb_defer_local(struct sk_buff *skb,
> + struct skb_free_array *sa,
> + enum skb_drop_reason reason)

If we wanna keep the implementation as is - I think we should rename
the thing to say "bulk" rather than "defer" to avoid confusion with
the TCP's "defer to allocating core" scheme..

kfree_skb_list_bulk() ?