Thread (3 messages) flat view 3 messages, 3 authors, 3d ago
WARM3d

[PATCH net-next] net: mvneta: rely on napi_build_skb() in mvneta_swbm_build_skb()

From: Lorenzo Bianconi <hidden>
Date: 2026-09-17 13:22:48
Also in: bpf
Subsystem: marvell mvneta ethernet driver, networking drivers, the rest · Maintainers: Marcin Wojtas, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
---
 drivers/net/ethernet/marvell/mvneta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 543e566425c1..c2b1098d8d1d 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -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);
 
---
base-commit: 859e40055c19ceb8b8215f3269e57075023b72b4
change-id: 20260917-mvneta-napi-poll-987b8e9aef0e

Best regards,
-- 
Lorenzo Bianconi [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help