mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-09-19 20:19:23 +00:00
removed upstreamed patches: generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch [1] generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch [2] all other patches autorefreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.105&id=698abcf08818cb7bafb978f4c9f6674d6a825d10 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.105&id=61b80fbdc0726317f72f9074e10126e0eb0e49c5 Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20013 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Mon, 20 May 2024 14:29:58 +0200
|
|
Subject: [PATCH] net: ethernet: mtk_eth_soc: use napi_build_skb()
|
|
|
|
The napi_build_skb() can reuse the skb in skb cache per CPU or
|
|
can allocate skbs in bulk, which helps improve the performance.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -2188,7 +2188,7 @@ static int mtk_poll_rx(struct napi_struc
|
|
if (ret != XDP_PASS)
|
|
goto skip_rx;
|
|
|
|
- skb = build_skb(data, PAGE_SIZE);
|
|
+ skb = napi_build_skb(data, PAGE_SIZE);
|
|
if (unlikely(!skb)) {
|
|
page_pool_put_full_page(ring->page_pool,
|
|
page, true);
|
|
@@ -2226,7 +2226,7 @@ static int mtk_poll_rx(struct napi_struc
|
|
dma_unmap_single(eth->dma_dev, ((u64)trxd.rxd1 | addr64),
|
|
ring->buf_size, DMA_FROM_DEVICE);
|
|
|
|
- skb = build_skb(data, ring->frag_size);
|
|
+ skb = napi_build_skb(data, ring->frag_size);
|
|
if (unlikely(!skb)) {
|
|
netdev->stats.rx_dropped++;
|
|
skb_free_frag(data);
|