diff options
Diffstat (limited to 'target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch')
-rw-r--r-- | target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch b/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch index 345c6bed01..58b49f28a2 100644 --- a/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch +++ b/target/linux/generic/backport-5.15/706-03-v6.0-net-ethernet-mtk_eth_soc-add-xmit-XDP-support.patch @@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -987,15 +987,26 @@ static void mtk_tx_unmap(struct mtk_eth +@@ -988,15 +988,26 @@ static void mtk_tx_unmap(struct mtk_eth } } @@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } static void setup_tx_buf(struct mtk_eth *eth, struct mtk_tx_buf *tx_buf, -@@ -1012,7 +1023,7 @@ static void setup_tx_buf(struct mtk_eth +@@ -1013,7 +1024,7 @@ static void setup_tx_buf(struct mtk_eth dma_unmap_addr_set(tx_buf, dma_addr1, mapped_addr); dma_unmap_len_set(tx_buf, dma_len1, size); } else { @@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> txd->txd1 = mapped_addr; txd->txd2 = TX_DMA_PLEN0(size); dma_unmap_addr_set(tx_buf, dma_addr0, mapped_addr); -@@ -1188,7 +1199,7 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1189,7 +1200,7 @@ static int mtk_tx_map(struct sk_buff *sk soc->txrx.txd_size); if (new_desc) memset(tx_buf, 0, sizeof(*tx_buf)); @@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> tx_buf->flags |= MTK_TX_FLAGS_PAGE0; tx_buf->flags |= (!mac->id) ? MTK_TX_FLAGS_FPORT0 : MTK_TX_FLAGS_FPORT1; -@@ -1202,7 +1213,8 @@ static int mtk_tx_map(struct sk_buff *sk +@@ -1203,7 +1214,8 @@ static int mtk_tx_map(struct sk_buff *sk } /* store skb to cleanup */ @@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) { if (k & 0x1) -@@ -1414,13 +1426,14 @@ static struct page_pool *mtk_create_page +@@ -1415,13 +1427,14 @@ static struct page_pool *mtk_create_page .pool_size = size, .nid = NUMA_NO_NODE, .dev = eth->dma_dev, @@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> pp = page_pool_create(&pp_params); if (IS_ERR(pp)) return pp; -@@ -1466,6 +1479,122 @@ static void mtk_rx_put_buff(struct mtk_r +@@ -1467,6 +1480,122 @@ static void mtk_rx_put_buff(struct mtk_r skb_free_frag(data); } @@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring, struct xdp_buff *xdp, struct net_device *dev) { -@@ -1494,6 +1623,18 @@ static u32 mtk_xdp_run(struct mtk_eth *e +@@ -1495,6 +1624,18 @@ static u32 mtk_xdp_run(struct mtk_eth *e count = &hw_stats->xdp_stats.rx_xdp_redirect; goto update_stats; @@ -235,7 +235,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> default: bpf_warn_invalid_xdp_action(act); fallthrough; -@@ -1727,9 +1868,8 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -1728,9 +1869,8 @@ static int mtk_poll_tx_qdma(struct mtk_e { const struct mtk_reg_map *reg_map = eth->soc->reg_map; struct mtk_tx_ring *ring = ð->tx_ring; @@ -246,7 +246,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> u32 cpu, dma; cpu = ring->last_free_ptr; -@@ -1750,15 +1890,21 @@ static int mtk_poll_tx_qdma(struct mtk_e +@@ -1751,15 +1891,21 @@ static int mtk_poll_tx_qdma(struct mtk_e if (tx_buf->flags & MTK_TX_FLAGS_FPORT1) mac = 1; @@ -271,7 +271,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> mtk_tx_unmap(eth, tx_buf, true); ring->last_free = desc; -@@ -1777,9 +1923,8 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -1778,9 +1924,8 @@ static int mtk_poll_tx_pdma(struct mtk_e unsigned int *done, unsigned int *bytes) { struct mtk_tx_ring *ring = ð->tx_ring; @@ -282,7 +282,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> u32 cpu, dma; cpu = ring->cpu_idx; -@@ -1787,14 +1932,18 @@ static int mtk_poll_tx_pdma(struct mtk_e +@@ -1788,14 +1933,18 @@ static int mtk_poll_tx_pdma(struct mtk_e while ((cpu != dma) && budget) { tx_buf = &ring->buf[cpu]; @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> } mtk_tx_unmap(eth, tx_buf, true); -@@ -3477,6 +3626,7 @@ static const struct net_device_ops mtk_n +@@ -3478,6 +3627,7 @@ static const struct net_device_ops mtk_n #endif .ndo_setup_tc = mtk_eth_setup_tc, .ndo_bpf = mtk_xdp, @@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h -@@ -693,6 +693,12 @@ enum mtk_dev_state { +@@ -694,6 +694,12 @@ enum mtk_dev_state { MTK_RESETTING }; @@ -327,7 +327,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net> /* struct mtk_tx_buf - This struct holds the pointers to the memory pointed at * by the TX descriptor s * @skb: The SKB pointer of the packet being sent -@@ -702,7 +708,9 @@ enum mtk_dev_state { +@@ -703,7 +709,9 @@ enum mtk_dev_state { * @dma_len1: The length of the second segment */ struct mtk_tx_buf { |