Skip to content

net: expand napi_skb_cache use

Eric Dumazet netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 15 repliesApplied 3/3
  2. v23 patches 5 repliesSuperseded

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: add a new @alloc parameter to napi_skb_cache_get()net/core/skbuff.c+8 -72 repliesApplied
2/3net: __alloc_skb() cleanupnet/core/skbuff.c+18 -102 repliesApplied
3/3net: use napi_skb_cache even in process contextnet/core/skbuff.c+5 -011 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJason XingKuniyuki Iwashima
1/3R-b R-b
2/3R-b R-b
3/3R-b T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/3] net: expand napi_skb_cache use

This is a followup of commit e20dfbad8aab ("net: fix napi_consume_skb() with alien skbs").

Now the per-cpu napi_skb_cache is populated from TX completion path, we can make use of this cache, especially for cpus not used from a driver NAPI poll (primary user of napi_cache).

With this series, I consistently reach 130 Mpps on my UDP tx stress test and reduce SLUB spinlock contention to smaller values.

v3: Addressed Jason feedback on patch 2/3
v2: https://lore.kernel.org/netdev/[email protected]/

Eric Dumazet (3):
net: add a new @alloc parameter to napi_skb_cache_get()
net: __alloc_skb() cleanup
net: use napi_skb_cache even in process context

 net/core/skbuff.c | 48 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 17 deletions(-)
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog