๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25469

Re: [PATCH net-next v17 07/15] net: dsa: realtek: rtl8365mb: set and get VLAN 4k for family D

#25469
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 21:22
64 lines
10429 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 message does not match the code it adds.

--

net: dsa: realtek: rtl8365mb: set and get VLAN 4k for family D

This patch adds two-word CVLAN pack/unpack helpers for rtl8365mb family D.
It also adds a switch-wide SVL/IVL policy that follows VLAN filtering. A
vlan_4k_used bitmap in struct realtek_priv tracks the 4K entries in use,
so that a policy flip rewrites only those entries and then flushes
dynamic L2 entries on every user port.

> drops out of the bitmap. The rewrite itself is a separate function,
> rtl8365mb_d_vlan_4k_set_ivl(), so that an error path can do a best-effort
> restore of the previous IVL_EN values (without flushing L2 entries).

[Severity: Low]
Is the "(without flushing L2 entries)" part accurate?

In this patch, no error path outside rtl8365mb_d_vlan_4k_set_ivl() calls
it. The only restore is the function's own rollback loop. Whenever
rtl8365mb_d_vlan_4k_set_ivl() succeeds, it always flushes:

drivers/net/dsa/realtek/rtl8365mb_vlan.c:rtl8365mb_d_vlan_4k_set_ivl() {
    ...
	dsa_switch_for_each_user_port(dp, ds)
		rtl83xx_port_fast_age(ds, dp->index);

	return 0;
    ...
}

The error-path caller is added later in the series, in "net: dsa:
realtek: rtl8365mb: make L2/LUT access work on family D". There, the
undo_refresh_ivl label in rtl8365mb_port_vlan_filtering() does:

	(void)rtl8365mb_d_vlan_4k_set_ivl(ds, old_ivl);

When that restore succeeds, dynamic L2 entries are flushed on every user
port. This is still the case at the end of the series.

Could the commit message be reworded to match the code? For example, it
could say that only the internal rollback loop skips the flush.

Separately, this isn't a bug, but the subject only mentions the set/get
pack and unpack helpers. The patch also adds:

- the switch-wide SVL/IVL policy
- the vlan_4k_used bitmap (VLAN_N_VID bits) in the shared struct
  realtek_priv
- the fast-age of all user ports when the policy flips
- the new undo_egress_mode error path in rtl8365mb_port_vlan_filtering()

Would a subject that also covers the IVL policy change be clearer?

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/236d002f-5ca5-4f12-bf5b-0ed6442e5c9a%40yahoo.com
Technical Details
Message-ID: <179616013416.3146.14488688243211558866@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375358-linux-kernel-netdev=dewy.ru
References: <68d036aa-7c5c-4fe2-9fd8-048cb96d471d@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375358-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v17 07/15] net: dsa: realtek: rtl8365mb: set and
 get VLAN 4k for family D
Date: Tue, 01 Dec 2026 21:22:14 +0000
Organization: Usenet Network
Message-ID: <179616013416.3146.14488688243211558866@kernel.org>
References: <68d036aa-7c5c-4fe2-9fd8-048cb96d471d@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1822164"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3kBWiCnNNZ3kEIkroHKR/9WMPo0= sha256:gzaS1+GKBa0Sq+0aU3Exh9P0sjM6LoE6EiNuzUrkCQk=
	sha1:fdHjjXhSoEBudt9+YGddyERoA1c= sha256:3DXOZxyKvQFQexajfek+G0i64RwrH9xsfeXVm8oha6Q=
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 02F401174A5; Wed,  2 Dec 2026 00:22:46 +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 n_fuuSKYBloy;
	Wed,  2 Dec 2026 00:22:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-375358-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 58CEB1174A4; Wed,  2 Dec 2026 00:22:33 +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 92596602E36; Tue,  1 Dec 2026 21:22:32 +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=1796160142;
	b=5bSaI52rNOcok9zf0QPurZuZMfA1BFTKaQN7anBOeUO7eDF35YNApAlpBKxYlJK+tkLT
	 fFIc4AXMExdXFhz4GZsNSVk8381Ct/cNZ7iq1A/nn1SDMzdTwIAawFsJyEmOY0R36uTUB
	 3nWqSjXPpMObzoNofl2Nlqvd2dKS3QrqfrqahfPPb3Kku8iU1TusZ8DoNStXYfpu4246p
	 BeggnmS6Y4Vb6R116896v+EmnF2OuCPFnO8XwX37FOTUhJEOzgbE8LA4lUssX6brBo36N
	 CR9H2/p+22Tq/RAZQ+bo0fC6cGqFPS6JEMzrHaSJiSq/fPJ6xDGYoJREEidmyWqKCNA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796160142;
	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=jd9R26ZJBTd7FiFV51nXoblh20kLbW/iZD0wWOObXwA=;
	b=J7RC5T20k37CrM1sqZiuwLfA45cR68RNK/IQJTv25Z2JAn+c79y8cW7pOKvb9TFSMKxd
	 e0w+GNtOOBHKHWnX9LrivPcf8VqUvqU48H4CZFrtw82qRmyUokd4jWmXId5vLLzAJZZ04
	 4emRqbnvHhuxRjYHEa6ip9Arx9n4y7P3+Hfxll1Thi/PmmonDZWwYuL9SfhpeAPNqed54
	 L+wxHpWA7cR/3TtsXGjCwOgkyNYw0S1HYxpZMxsASip0qp5lPvxuxX0RcUCHO0/i2oMeN
	 M8SFD03zLsfrMtqG8F2USYbDPXBbeTGHvBDqpakTnrD2OpASQGLKbTXjCGmSh1n1Feg==
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=b2udp+Dj;
	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 E1ABE606A6B9;
	Tue,  1 Dec 2026 21:22:21 +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=b2udp+Dj
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=1796160136;
	b=29/vx579Ml3mmATG8S/+XpERKnQ+awZl+l40Z5i1xe5x4goh5/nH+smP0Kr95sZRnR2m
	 s5GrABPSbI1gSjgCuaDV0Yud1uaZ/F5hz5SwO1sV9DGXESR2Vh7TnuAzATvo2H4WUQ34d
	 2DxLnEPrrKMtzzVGV5i3jOoEZmb+2P0se39v0ZROX0fZJ0C7JYRz9jV0xR8ZglY1HVr5g
	 +vVKY+7prh3mZG9eUtrE6UORfEQPXtApqW6GyuRACehvmsQnRETgzX7BdTGKK/Vl0Y9kh
	 zUVgn/mN/ZvQPlNgkY07F0f6qlzXhy3F3HgYzqK3E/8LFRR5Mr084q5NierU7Ems2/g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796160136;
	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=jd9R26ZJBTd7FiFV51nXoblh20kLbW/iZD0wWOObXwA=;
	b=ByUdmEdII7k6kAiYw+nZpVqzTPwDWVzykHlRQCZj6Tql0s+DbNff0jNgGpdUnwLyv8mR
	 7ZOlvWJ/qiSKSns9jLpflIrdrX+5/GVWhbiF7TGG+J1FqvixyoKP7J+tqnWjKs2VVMvvQ
	 HStjlps7hzYcxhqFOJFx0G1F6PA3S81fP0ixHZuZNg2vPOkPVhNJGYpRbovbCdOw/ue3w
	 rrH4vbCFKiDeOMYh6w497ZyUckW1lJOBUpE2lP7APrhHDuvOYM7eqNKtGdNfL9ThAf4b7
	 z41LpiRONDeHtSkFFgXmxorPZFx2FPpba2lQTgioeq7BG4srJwvqbQrxV9pd2k8sZxw==
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=b2udp+Dj;
	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 0C7D8606A31A;
	Tue,  1 Dec 2026 21:22:15 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A6471F00893;
	Tue,  1 Dec 2026 21:22:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796160135;
	bh=jd9R26ZJBTd7FiFV51nXoblh20kLbW/iZD0wWOObXwA=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=b2udp+Dju6/VtkU0Llyp3P4fs1gAWhe8nlBM5UGMu3wvoWsPmsI5dq7Lnmf2MaKqi
	 xoRW1BHOrNjV0IX0yJv+fR/pVGCg14yF8LdgN4UGCMiKTYXhvScuw6Lca3VZDHTchq
	 rPU0H5DBBEBQz7HxM3+SmvLiOnSeQW1wJDflA2gIUDz5hfjLzOjVCf56nYNYA6nmuB
	 zB9hQAvU0tMsNC/NvuWcJxAtMjmFWj4/o/sFyKYY3rpe7GmqO/Sqpx3CcpRcy64bpi
	 Fo4AVdmGqGmsDaZ0yaBreQIuPQik0Jq3rfU6sl3Ct8A2dKJqdJwpEV3N/8MW86VL5D
	 ELpjnxTpZVuCw==
X-Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org,
 davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
 linux@armlinux.org.uk, luizluca@gmail.com, maxime.chevallier@bootlin.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
 alvin.sipraga@analog.com, gusfmora@gmail.com, kuncy7@gmail.com,
 fabianotassotti@gmail.com, gabonpivovich@gmail.com, contact@c127.dev,
 o.rempel@pengutronix.de
X-In-Reply-To: <68d036aa-7c5c-4fe2-9fd8-048cb96d471d@yahoo.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