Article View: linux.kernel.netdev
Article #12323[PATCH net-next v2 0/2] net: ethernet: mtk_eth_soc: 9K jumbo frame support
From: Sandeep Haemoon
Date: Thu, 05 Nov 2026 23:53
Date: Thu, 05 Nov 2026 23:53
62 lines
11068 bytes
11068 bytes
This series makes the MediaTek SoC ethernet driver support 9K jumbo frames on the 10G XGMII MACs (MT7988). The driver advertises a 2030-byte max_mtu and programs the MAC max-rx field for at most 2048 bytes, so MTU > 2K is rejected and 9K frames are not usable. Patch 1 gates page_pool on the ring buffer size. The pool hands out order-0 pages and is created with MTK_PP_MAX_BUF_SIZE, so rings that need larger buffers - the HW-LRO ring already, and the rings used for jumbo after patch 2 - cannot be backed by it. Patch 2 adds the MTK_NETSYS_RX_9K capability, advertises 9K max_mtu on the XGMII MACs (from the DT phy_mode at probe, so DSA can raise the conduit MTU before the netdev is opened), programs XMAC_RX_CFG2, derives the shared RX buffer length from the largest MTU, sizes the RX rings and programs the PDMA RX SDL max frame from it. A runtime MTU change that would need a different ring buffer size is rejected with -EBUSY while DMA is running; the rings are sized at the next open. This work is a forward-port of the MediaTek downstream jumbo series: Mason Chang's "change default rx buffer length", "add 9k jumbo frame support" and "add dynamic rx buffer adjustment support" (MediaTek OpenWrt feed 999-eth-30/31/33, carried in frank-w/BPI-Router-Linux), plus Frank Wunderlich's "try to fix crash the right way". The per-ring page_pool rule is added here to make the 9K path safe without disabling page_pool for every ring. The equivalent change was tested on a BPI-R4 Pro 8X (MT7988, 10G lan6 / MxL86252) on the 6.18.60 backport: with both ends at MTU 9000, 8K ICMP passes and iperf3 with MSS 8900 reaches ~9.87 Gbit/s (vs ~2.57 Gbit/s at MSS 1460); the DSA conduit is raised to 9004 at boot. This v7.3 series is compile-tested with CONFIG_NET_MEDIATEK_SOC=y and COMPILE_TEST=y; no hardware run of this exact tree yet. Changes in v2: - put the page_pool change first, so the series builds up to jumbo instead of adding it and then fixing it, as suggested by Simon Horman; - drop the forward declarations by moving mtk_set_mcr_max_rx() above mtk_mac_config() and mtk_max_gmac_mtu() above mtk_dma_init(), as requested by Jakub Kicinski; - wrap three lines that exceeded 80 columns; - send patch 2 as a reply to the cover letter instead of chaining it off patch 1; - Cc the maintainers listed by get_maintainer.pl. v1: https://lore.kernel.org/all/patch-4f863a941889f0bceca1c082f2d79624@loljews.com/ The runtime-reallocation patch is not included: it reallocates the shared RX rings when the MTU changes while an interface is up, removing the -EBUSY restriction. It is a larger change and will be sent separately. Sandeep Haemoon (2): net: ethernet: mtk_eth_soc: skip page_pool for large RX buffers net: ethernet: mtk_eth_soc: add 9K jumbo frame support drivers/net/ethernet/mediatek/mtk_eth_soc.c | 185 ++++++++++++++------ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 9 +- 2 files changed, 144 insertions(+), 50 deletions(-) base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222 -- 2.53.0
Technical Details
Message-ID:
<patch-2793186c653124c4c0b3d463bde2ea3a@loljews.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358180-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358180-linux-kernel-netdev=dewy.ru From: sandeeph@loljews.com (Sandeep Haemoon) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v2 0/2] net: ethernet: mtk_eth_soc: 9K jumbo frame support Date: Fri, 6 Nov 2026 01:53:57 +0200 Organization: Usenet Network Message-ID: <patch-2793186c653124c4c0b3d463bde2ea3a@loljews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3978580"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:s64Oen2qUhItLxnKGpVP+sxHI9k= sha256:PnPz5t06CB9Boo/cuLL5fJtTXJ5A217RY164EM0FXbw= sha1:hMWJSSUHb8QR0iSdBfumDVGoPg0= sha256:bJSa4SfbGNPrOLFUhCa4M8eH2313mZJywJrRVIyP7Mc= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id BF49F113334; Sat, 7 Nov 2026 00:22:34 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.347 X-Spam-Status: No, score=-2.347 tagged_above=-9999 required=6.31 tests=[DATE_IN_PAST_12_24=0.804, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=loljews.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H3EQexg3k1uE; Sat, 7 Nov 2026 00:22:31 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-358180-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=loljews.com X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 356F6113329; Sat, 7 Nov 2026 00:22:16 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 628FA6023E4; Fri, 6 Nov 2026 21:22:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1794000129; b=ss4AnvZxCnY59L7D831WLJz9yF0AP+S6IaV1HHboWgpB20dyw+NoDXIIAT0vVLA1ponm EgZH92GB4IUOttNjopS5vOLWSX6SwYn7ejBcHXzOA/Wra0cn30TteWvt6qU64nMQwbhCy sFk3NGYCZBzLvVe9hWZPoUwk6IXEBhjoVmmh0V7rrjzMmFzB6u6DnREvV6NbKc4PzkGnf j25iTafcvWjCQjj8/b7+BXoxtgo4a4kvX7MuqelKwEmB6flOsNMhh+RcAsMMUU6Jec5bB pLht7pZzih2Gi6zI0bHd4PmZ9OznVdAX1CTlr+r3Cdo+Gg7qheVbcOfd/qsBcjDgq/A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794000129; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=PZTZ+baBEak191qDzxsfkiAJwS6lGJxUKvHfh+ZeHM4=; b=zLeV7xtYnZqGPMWPVcrYgaVMGGxXqJ02AJqKrG4E4lqpdoDZdIOR2SHyNYhE27AjWYk/ u0nz65lawInDhsG0D5tsbaczrbNV3j2y7kztm1etETE4lI/iUdvvHFCyTQYKwg+bT+p8/ 5iIp1uwUGrfnGFKEF6zKLfLKpYr7HaWOA6tP2silhSrHhCRnrUyTYP2ZXElkOu5FEp2em 7fu95sG4ESA3H4T4NSCmB6CYx/cA29m2dcTFDymB5f/N+24/AHgOAYPBz+lV9r6AYSeKA 7/oe4e74MxNdFsDlNsO04TfWunYddj4MHt6TbmdIbqRbfOR04QkKZJ4XMBZUlZsbhNg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=loljews.com; spf=pass smtp.mailfrom=loljews.com; arc=fail smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 66922606D803; Fri, 6 Nov 2026 21:22:09 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=54.38.221.178 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794000118; b=TA2KK4j7XsE/49vRdPztOWDgmmBXGo0BDDxEKR7CnqBPmkIn7FeJ96dTLZC9Ee81+fsq Z7mkpcPhd0uAQu1Lenru1PipRAoMUo3WRprDE1KJfB0VVcJ+B+rA/+dIHHoN/ziugS0fL Wof1SI+yS6KNXkHGqmiHLzJ/1V7NHJVg4iTJ1KoDFtQWsSUyDtfCZ960sJ8v968/rv+mp 74Muy1n6l1EvIyB9ZFryqV9KOfdc3i5rRSU22QodobEjN2Bzo8jjxYhyWjSgLlPjZamjs BOudZPG/Y2MgTrRO2JoWAqGY4maKuxy8L0X7ppzq71Ug1CBQ2LumgQvGiZ5JowWqrnQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794000118; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=PZTZ+baBEak191qDzxsfkiAJwS6lGJxUKvHfh+ZeHM4=; b=3LnxyUhflyUpqzdsrjbYr9uOZpu2NRtLoPdxnaHRyP73hS7NKR0PBu6MFXQ4+VrY5wPc INsf7zcMAoiXFnQ4aDcKl640rq0Ouz4N1McELEjWl4rjmZVkf5qmyQ9iidJtSOlb5PZmj PI4CY18kgJiPNorZ9n49qvnuT1GNikanfp0lhmshy1ohrzGZMQPS4Lcl8r4EIFWXR2u8o 0OKDl86CVFhY23G+WWgwet1nxlMj2DCUg7J6ieeCeQAByAQ7+7E8XL02CziXU8EjzCuGb EXIu+ey7KGQDbdP4gd2EQ2UOf2NMFpwBXEam/g+sA0gL6QaGLQ4e4Ef2HhdahkjF8/Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=loljews.com; spf=pass smtp.mailfrom=loljews.com; dkim=pass header.d=loljews.com header.i=@loljews.com header.a=rsa-sha256 header.s=mail header.b=fktGX8YP; arc=none smtp.remote-ip=54.38.221.178 X-Received: from mnc015mcc432.ss7-reroute.local (unknown [54.38.221.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BDB8606A32E; Fri, 6 Nov 2026 21:21:49 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9BDB8606A32E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=loljews.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=loljews.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=loljews.com; s=mail; t=1794000101; bh=PZTZ+baBEak191qDzxsfkiAJwS6lGJxUKvHfh+ZeHM4=; h=From:To:Cc:Subject:Date; b=fktGX8YPzQM6s9ktsujASuB9knvEpTMp84hJ2FKZX2he5oKrve9NrKHsXMdOpwZ1R m2i2DS2hNssYRAAcOgdkYgYhZUPzUZdNKx9U1x1pQaXhq1j8oHM450AW7ZTioUHSll EBgW965uPKFJjvuuZQRl6r+Dx0ujftwSMn/PENrIpygX5nPeQruzW9UmNOGshFusOH ezFNTfDhJLrUvPAUTRFW69D+qqOeLdqoCYdQCO3w2fMYfMGL9m4jW65fv33d5HI2H0 /0bBTDYdaH1SfHKkoj+G+TadKBUL5rF3OULA+wgLE4nVYiShd5Y8ZjFqCik2JDCpjz wCfWiHhmJGdiQ== X-Received: from loljews.com (localhost [127.0.0.1]) by postfix (Postfix) with ESMTP id AA67B27A366A; Fri, 06 Nov 2026 23:21:41 +0200 (EET) X-Cc: Felix Fietkau <nbd@nbd.name>, Lorenzo Bianconi <lorenzo@kernel.org>, Andrew Lunn <andrew+netdev@lunn.ch>, David S. Miller <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Russell King <linux@armlinux.org.uk>, Mason Chang <mason-cw.chang@mediatek.com>, Frank Wunderlich <frank-w@public-files.de>, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list