From: Sandeep Haemoon <sandeeph@loljews.com>
To: netdev@vger.kernel.org
Cc: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 2/2] net: ethernet: mtk_eth_soc: skip page_pool for
Date: Mon, 2 Nov 2026 00:48:46 +0200 [thread overview]
Message-ID: <patch-fdfc120d5c46c3e5d484cbff30f63316@loljews.com> (raw)
In-Reply-To: <patch-f1b04513b0fe3fb0a35ac744799fb0f3@loljews.com>
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@loljews.com>
---
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
prev parent reply other threads:[~2026-11-01 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 22:58 [PATCH net-next 0/2] net: ethernet: mtk_eth_soc: 9K jumbo frame support Sandeep Haemoon
2026-11-01 22:48 ` [PATCH net-next 1/2] net: ethernet: mtk_eth_soc: add 9K jumbo frame Sandeep Haemoon
2026-11-01 22:48 ` Sandeep Haemoon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-fdfc120d5c46c3e5d484cbff30f63316@loljews.com \
--to=sandeeph@loljews.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®