mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net: mvneta: rely on napi_build_skb() in mvneta_swbm_build_skb()
mvneta_swbm_build_skb() is only invoked from mvneta_poll(), the NAPI poll routine, so it always runs in NAPI context. Use napi_build_skb() instead of build_skb() to source the skb head from the per-CPU NAPI cache, avoiding a per-packet kmem_cache_alloc() of the skb head. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260917-mvneta-napi-poll-v1-1-fb57604932d3@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
51cb6a6424
commit
1643b81c38
|
|
@ -2403,7 +2403,7 @@ mvneta_swbm_build_skb(struct mvneta_port *pp, struct page_pool *pool,
|
|||
if (unlikely(xdp_buff_has_frags(xdp)))
|
||||
num_frags = sinfo->nr_frags;
|
||||
|
||||
skb = build_skb(xdp->data_hard_start, PAGE_SIZE);
|
||||
skb = napi_build_skb(xdp->data_hard_start, PAGE_SIZE);
|
||||
if (!skb)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user