[PATCH 17/44] net: mana: Use napi_build_skb in RX path
authorHaiyang Zhang <haiyangz@microsoft.com>
Wed, 12 Apr 2023 21:16:00 +0000 (14:16 -0700)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 25 Apr 2025 19:51:43 +0000 (21:51 +0200)
Use napi_build_skb() instead of build_skb() to take advantage of the
NAPI percpu caches to obtain skbuff_head.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ce518bc3e9ca342309995c9270c3ec4892963695)
Signed-off-by: Bastian Blank <waldi@debian.org>
Gbp-Pq: Topic features/all/ethernet-microsoft
Gbp-Pq: Name 0017-net-mana-Use-napi_build_skb-in-RX-path.patch

drivers/net/ethernet/microsoft/mana/mana_en.c

index d5fcbf7e857be1528c216adc148190374417e840..4c91990fc5162c09273f7f4ec176910ce5a789b7 100644 (file)
@@ -1193,7 +1193,7 @@ static void mana_post_pkt_rxq(struct mana_rxq *rxq)
 static struct sk_buff *mana_build_skb(void *buf_va, uint pkt_len,
                                      struct xdp_buff *xdp)
 {
-       struct sk_buff *skb = build_skb(buf_va, PAGE_SIZE);
+       struct sk_buff *skb = napi_build_skb(buf_va, PAGE_SIZE);
 
        if (!skb)
                return NULL;