From: sashiko-bot@kernel.org
To: "Arun Iyengar" <aiyengar1990@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH net-next v2 2/2] net: stmmac: dwmac-sun8i: Enable jumbo frames up to MTU 2018
Date: Fri, 13 Nov 2026 08:44:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-212453@kernel.org> (raw)
In-Reply-To: <20261112-sun8i-emac-jumbo-v2-2-aca0cf23cf17@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: stmmac: dwmac-sun8i: DT max-frame-size ignored in
sun8i_dwmac_probe()
--
commit 51742ecb57f35bd210c0c45ef051593dd802ce68
Author: Arun Iyengar <aiyengar1990@gmail.com>
net: stmmac: dwmac-sun8i: Enable jumbo frames up to MTU 2018
This commit sets EMAC_RX_JUMBO_FRM_EN in sun8i_dwmac_core_init() and bounds
plat_dat->maxmtu to 2018 bytes so frames fit within a single 2044-byte DMA
descriptor buffer.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> index 0c82662fbe6ea..a18d3daf6a3ff 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
[ ... ]
> @@ -1209,6 +1232,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
> plat_dat->mac_setup = sun8i_dwmac_setup;
> plat_dat->tx_fifo_size = 4096;
> plat_dat->rx_fifo_size = 16384;
> + plat_dat->maxmtu = min(plat_dat->maxmtu, EMAC_MAX_MTU);
[Severity: Medium]
Does min(plat_dat->maxmtu, EMAC_MAX_MTU) honor a device tree max-frame-size
property as intended?
devm_stmmac_probe_config_dt() initializes plat_dat->maxmtu to JUMBO_LEN
(9000), and stmmac_probe_config_dt() only reads max-frame-size for specific
compatibles:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:stmmac_probe_config_dt() {
...
if (of_device_is_compatible(np, "st,spear600-gmac") ||
of_device_is_compatible(np, "snps,dwmac-3.50a") ||
of_device_is_compatible(np, "snps,dwmac-3.70a") ||
of_device_is_compatible(np, "snps,dwmac-3.72a") ||
of_device_is_compatible(np, "snps,dwmac")) {
...
of_property_read_u32(np, "max-frame-size", &plat->maxmtu);
...
}
Because dwmac-sun8i device tree nodes only use allwinner,sun8i-* and
allwinner,sun50i-* compatibles, plat_dat->maxmtu is always JUMBO_LEN here and
a max-frame-size property in the device tree will never lower it below
EMAC_MAX_MTU.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-sun8i-emac-jumbo-v2-0-aca0cf23cf17@gmail.com?part=2
prev parent reply other threads:[~2026-11-13 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:41 [PATCH net-next v2 0/2] net: stmmac: dwmac-sun8i: Jumbo frames and an RX_TH fix Arun Iyengar via B4 Relay
2026-11-12 8:41 ` Arun Iyengar
2026-11-12 8:41 ` [PATCH net-next v2 1/2] net: stmmac: dwmac-sun8i: Fix the RX_TH threshold encoding Arun Iyengar via B4 Relay
2026-11-12 8:41 ` Arun Iyengar
2026-11-12 9:43 ` Nicolai Buchwitz
2026-11-12 13:32 ` Chen-Yu Tsai
2026-11-12 8:41 ` [PATCH net-next v2 2/2] net: stmmac: dwmac-sun8i: Enable jumbo frames up to MTU 2018 Arun Iyengar via B4 Relay
2026-11-12 8:41 ` Arun Iyengar
2026-11-12 9:46 ` Nicolai Buchwitz
2026-11-12 14:30 ` Chen-Yu Tsai
2026-11-13 8:44 ` sashiko-bot [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=sashiko-outbox-212453@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.