πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25007

Re: [PATCH net-next v10 03/12] r8152: add rtl8157_change_mtu() for RTL8157 and RTL8159

#25007
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 06:46
52 lines
10026 bytes
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
Technical Details
Message-ID: <179610756295.3146.364025230887269469@kernel.org>
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374749-linux-kernel-netdev=dewy.ru
References: <20261130063123.2408-4-nic_swsd@realtek.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374749-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <179610756295.3146.364025230887269469@kernel.org>
References: <20261130063123.2408-4-nic_swsd@realtek.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1639029"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qNdCR9/LDXHl7zWHzfWaehH9Zhw= sha256:/3bt9QrA2vCVIjgHefG49ItbyrPT3J3VGMXA7KLVRaY=
	sha1:InDGUaeK8Ww3lP3pvPuAQOgHr7U= sha256:pGx3SeP2v6uQMqsI8aIZlDkAryhAtSy6o/NgUvDoxhM=
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 E2A14117271; Tue,  1 Dec 2026 09:46:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.5
X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
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 GJ71XGOgVkFI;
	Tue,  1 Dec 2026 09:46:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-374749-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 3D35211726C; Tue,  1 Dec 2026 09:46:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 53DD12669F; Tue,  1 Dec 2026 06:46:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796107565;
	b=lXrQ77yWDz4m08HvkTZeD8xgZvFUEElzm0MQ8wIvanrpkBJunkK1lAdJFd4L9QW773H3
	 /uxgoLjhA+A2ni1/9IjcEjUdlQF5Iup182XeWnCxjlpJVL+aS0NUkNbPqYKI2107HdXzQ
	 38Xtad1lSo6r7n/5wecfnBxcJ386n2ciaMvnEnrJCEqHyJV8PM3ET47DLEZx1zTj4XLCH
	 iOd/vGBh4V3nNY8K69uRmxjCSnLFZDQcUy41CyTunwjjgz6igoLy9mr//FpKGA/EZXumh
	 huKeNJD5DyqovKQ5qX8CzSaXzGbMqafDBOsKRS4bFVHuKYa09UayNzbt/+OOvtFEFpA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796107565;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=TVloMuxzHCsQzjHCuW5NgGy4VaRKTUICmZCCnzhf0O8=;
	b=QhgsZfyhtvFUQTCO1AJC0vZQ69rZBx+PpA3o+m58bLIO0UU+dlsPwwk1ZMrr2l6AMlWS
	 i3+v+X/N+T0WJZJUbpwWpafhnM58I1ggB1DbD1mpcGmxPxlDCUs6KdFmQVxyhOdJiEF6P
	 htGq5+hmz+rOR9EcT6BCI/79Y5lrznlOFQcS45qemLD9is1YHBmsvt7hQtOzM1fde/kwJ
	 VKEX9wPMeou7XY5pvg2m4h02jTdYm1d31Bgd+NHDv9SyhW7aDX3HJjipsm1bXHs+J93vT
	 4jYPB5peRDm9yo78SAaKUPFChma0zJl0LdHnEDRMZaSbv9/xNPgsxIOR1w/9WCtf2yg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BS8jzlbl;
	arc=pass header.oldest-pass=0 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 6EF03606A330;
	Tue,  1 Dec 2026 06:46:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BS8jzlbl
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796107564;
	b=hd5Xyiz08tiMzimI9ZeM/Z+hA/hdZcw4/jNSvEvAR7d4kmcsu+BfGyQ+1L7XQecH+zTw
	 yVqhby1TNn737b91zg7aCSVJ3U9sAD2DUEr17hKNmoHMPqFBw8SKfq6PE0zxuS3Oq4ewj
	 3nVjtJts48/GJUoTvyfJiFIN1GvCtl/Zfmqz+jFe0ExbfobkmKbxQN7zKAoHFtgsxc0vP
	 uzq6dU+J64OcCnkV8jVnk8LeCz1n6hLMa6L2ELjWhJtqcGvlb/ZnCooMd4Tg3LdUrhYwp
	 4BRAmAFrgrKSFgfuCrJsUApPeVDUe7N6AHnNsCxp9KAU+VTSb3SfIXO6QmpSU/s7wvQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796107564;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=TVloMuxzHCsQzjHCuW5NgGy4VaRKTUICmZCCnzhf0O8=;
	b=xA/uuLGonWNBoVppf0WcCAnb4EN8odsLlZ3yBX7B24M+tWcgwYTfGf3au3SKxbbkbvfv
	 lRAnLLNrNkm3t/DPnmxrGUO7RKY2pzJlP5sizOUlX95GzrJQ259IAE4oBJU06qNmjA8oU
	 dFSR12Ud7hPgSsYoGPOEXbZ78v+boowD7YIZ2kQyCgbSSCVo2Yo1QKrmzkJHCZ8Zi8p0p
	 Zq89+S3vMI5NBr1QBiuZ0za6Xu/547aoeVDcA7DY96a1riyJov8xONuWB83eJOOcfoB5Z
	 6Bh6QXbBkCB83q1lpVRJSqDUlf4QUsq4lL1pJu0lvywhwM+8dgTqBZMB3KYkIYGhAeA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BS8jzlbl;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90CB6606A32F;
	Tue,  1 Dec 2026 06:46:04 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 652F01F0092C;
	Tue,  1 Dec 2026 06:46:03 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796107564;
	bh=TVloMuxzHCsQzjHCuW5NgGy4VaRKTUICmZCCnzhf0O8=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=BS8jzlblZE63zlsbmjWEfomKzw01a7hNJElc/vdaonLEwOqwh1oF1Av/ldM1Q3uqN
	 5F2BE78LlSJOZcwWClnOZWZXzpi/9DCMii/jVJIKM55CmTGNTJTicWSYkNwHwdlv3x
	 xVMYJ320ho2jyz1s3mQXqClJc6Gv0vJYEiljDzuvHdQLd0zA8Wo5S7+kBCuRYbTD9d
	 JkFIiHxUXEXjkQlYhiBCygDKvVGbpiCp0jcwSSkl7+sNvWUohQdAes3h+GW4ssfk9T
	 v8Bgjy3Sj80/vYyL/ziEl1fyev0+fhWTs5GI02APs/e1QOehVs8ZGu6FPqbPtzwxad
	 HiTmDoeA4zlsQ==
X-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
X-In-Reply-To: <20261130063123.2408-4-nic_swsd@realtek.com>
X-sashiko-severity: Low
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