Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: hsu.chih.kai@realtek.com
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	nic_swsd@realtek.com, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, edumazet@google.com, bjorn@mork.no,
	pabeni@redhat.com, andrew+netdev@lunn.ch, mail@birger-koblitz.de
Subject: Re: [PATCH net-next v10 03/12] r8152: add rtl8157_change_mtu() for RTL8157 and RTL8159
Date: Tue, 01 Dec 2026 06:46:02 +0000	[thread overview]
Message-ID: <179610756295.3146.364025230887269469@kernel.org> (raw)
In-Reply-To: <20261130063123.2408-4-nic_swsd@realtek.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit is tagged with two Fixes: tags (fd3c7d080df5 for
  RTL8157 and ad2a55b63b41 for RTL8159), so it will be picked up for…

--

r8152: add rtl8157_change_mtu() for RTL8157 and RTL8159

This commit adds rtl8157_change_mtu() for RTL8157 and RTL8159. The new
helper programs PLA_MTPS from the configured MTU: max_pkt_size / 64,
with a 10K minimum and a cap of 0xff. Before this, these chips used the
fixed MTPS_JUMBO from rtl8156_change_mtu(). rtl8156_up() now calls
tp->rtl_ops.change_mtu(), so each chip uses its own helper.

> RTL8157 and RTL8159 used rtl8156_change_mtu(), which programs a fixed
> MTPS_JUMBO. Per the datasheet they need an MTPS scaled from the
> configured MTU instead: max_pkt_size / 64, at least 10K and capped
> at 0xff.

[Severity: Low]
This patch has two Fixes: tags, so it will likely be picked up for
stable. Could the commit message say what actually goes wrong on RTL8157
and RTL8159 with the old fixed MTPS_JUMBO (12 * 1024 / 64 = 0xc0)?

The only reason given is the datasheet. The message names no symptom
and no affected MTU range. It also doesn't say whether the problem was
seen on hardware or found by reading the datasheet.

It may also be worth stating that this changes the value for normal
MTUs, not only for jumbo frames. In rtl8157_change_mtu(), the default
MTU of 1500 gives:

    max_pkt_size = mtu_to_size(1500) = 1500 + 18 + 4 = 1522
    ocp_data = max_t(u32, 1522, 10 * 1024) / 64 = 0xa0

So at the default MTU, PLA_MTPS drops from 12K to 10K. The new value
stays below the old 0xc0 until the MTU reaches roughly 12266. Above
that it is larger than before, and it hits the 0xff cap for MTUs near
max_mtu.

Without the user-visible impact, a stable backporter can't easily tell
two cases apart. Does the bug only affect frames above 12K? Or is
lowering MTPS for standard MTUs also intended and safe to backport?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130063123.2408-1-nic_swsd%40realtek.com

  reply	other threads:[~2026-12-01  6:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  6:31 [PATCH net-next v10 00/12] r8152: refactor and extend RTL8157/8159 support Chih Kai Hsu
2026-11-30  6:31 ` [PATCH net-next v10 01/12] r8152: fix RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings Chih Kai Hsu
2026-12-01  6:45   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159 Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 03/12] r8152: add rtl8157_change_mtu() " Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko [this message]
2026-11-30  6:31 ` [PATCH net-next v10 04/12] r8152: fix flow control for RTL8156/RTL8156B/RTL8157/RTL8159 Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 05/12] r8152: split r8156_init by generation and factor out wait_autoload_done Chih Kai Hsu
2026-11-30  6:31 ` [PATCH net-next v10 06/12] r8152: add new init writes for RTL8156/8156B/8157/8159 Chih Kai Hsu
2026-11-30  6:31 ` [PATCH net-next v10 07/12] r8152: accept PLA and USB firmware blocks for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-30  6:31 ` [PATCH net-next v10 08/12] r8152: split RTL_VER_17 into QFN68 and QFN100 package variants Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 09/12] r8152: split rtl8156_enable/up/down into per-generation functions Chih Kai Hsu
2026-11-30  6:31 ` [PATCH net-next v10 10/12] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 11/12] r8152: add TGPHY register access for RTL8157 and RTL8159 Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:31 ` [PATCH net-next v10 12/12] r8152: enable UPS for RTL8157 and RTL8159 QFN68 Chih Kai Hsu
2026-12-01  6:46   ` netdev-bot+sashiko
2026-11-30  6:35 ` [PATCH net-next v10 00/12] r8152: refactor and extend RTL8157/8159 support netdev-bot+sinfo

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=179610756295.3146.364025230887269469@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hsu.chih.kai@realtek.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    /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