Re: [PATCH net-next 1/2] net: ethernet: mtk_eth_soc: add 9K jumbo frame

From: Simon Horman

Date: Thu Nov 05 2026 - 09:30:33 EST


On Mon, Nov 02, 2026 at 12:48:45AM +0200, Sandeep Haemoon wrote:
> The driver caps max_mtu at 2030 bytes and programs the MAC max-rx field
> for at most 2048-byte frames, so MTU > 2K is rejected and 9K jumbo
> frames are not usable on the 10G XGMII MACs.
>
> Add a MTK_NETSYS_RX_9K capability for MT7988 and:
> - advertise 9K max_mtu on XGMII MACs, derived from the DT phy_mode at
> probe time so DSA can raise the conduit MTU before the netdev is
> opened;
> - program XMAC_RX_CFG2 on the XGMII MACs;
> - derive the shared RX buffer length from the largest MTU and size the
> RX rings from it;
> - program the PDMA RX SDL max frame so the DMA engine accepts jumbo
> frames;
> - reject a runtime MTU change that would need a different ring buffer
> size while DMA is running; the rings are sized at the next open.
>
> This 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 92bfdbdd4de1/b4c6cb1d5532/ca4c976dce22),
> plus Frank Wunderlich's "try to fix crash the right way"
> (a3207a383794).
>
> Link: https://github.com/frank-w/BPI-Router-Linux/commit/b4c6cb1d5532
> Link: https://github.com/mediatek/mtk-openwrt-feeds
> Signed-off-by: Sandeep Haemoon <sandeeph@xxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>