[PATCH net-next 2/2] net: ethernet: mtk_eth_soc: skip page_pool for
From: Sandeep Haemoon
Date: Sun Nov 01 2026 - 18:14:32 EST
page_pool allocates order-0 pages and the pool is created with
MTK_PP_MAX_BUF_SIZE. Rings that need larger buffers (9K jumbo or the
HW-LRO rings) cannot use it. Only create/use a page_pool when
ring->frag_size fits in a page; the large-buffer path already uses
mtk_max_buf_alloc().
This is required by the 9K support in the previous patch; the
large-buffer path it relies on comes from the MediaTek downstream
series.
Link: https://github.com/mediatek/mtk-openwrt-feeds
Signed-off-by: Sandeep Haemoon <sandeeph@xxxxxxxxxxx>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index b5f7b2a78..0f0e6bc74 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2825,7 +2825,10 @@ static int mtk_rx_alloc(struct mtk_eth *eth, int ring_no, int rx_flag)
if (!ring->data)
return -ENOMEM;
- if (mtk_page_pool_enabled(eth)) {
+ /* page_pool uses order-0 pages; rings that need larger buffers
+ * (jumbo or HW-LRO) use the mtk_max_buf_alloc() path instead.
+ */
+ if (mtk_page_pool_enabled(eth) && ring->frag_size <= PAGE_SIZE) {
struct page_pool *pp;
pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no,
--
2.53.0