Article View: linux.kernel.netdev
Article #27531Re: [PATCH net-next v20 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 22:19
Date: Sat, 05 Dec 2026 22:19
90 lines
11721 bytes
11721 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 comment above rtl8365mb_d_want_ivl() in
drivers/net/dsa/realtek/rtl8365mb_vlan.c (lines 371-379) is out ofโฆ
--
net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D
This commit gets the L2 lookup table code working on family D
(RTL8367S-VB) switches. It adds the family D unicast/multicast entry
(de)serializers and teaches the table access code the family D register
layout. It also isolates an offloaded VLAN-unaware bridge in FID 1 through
port-based FID, and limits family D to one offloaded bridge.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 7b82cb13c06a0..87ecb0c52fffa 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -3719,9 +3960,21 @@ static int rtl8365mb_setup(struct dsa_switch *ds)
> goto out_teardown_irq;
>
> ds->assisted_learning_on_cpu_port = true;
> - ds->fdb_isolation = true;
> - /* The EFID is 3 bits, but EFID 0 is reserved for standalone ports */
> - ds->max_num_bridges = FIELD_MAX(RTL8365MB_EFID_MASK);
> + if (!rtl8365mb_is_d(priv)) {
> + ds->fdb_isolation = true;
> + /* The EFID is 3 bits, but EFID 0 is reserved for standalone */
> + ds->max_num_bridges = FIELD_MAX(RTL8365MB_EFID_MASK);
> + } else {
> + /* No EFID; FID 0 is used by standalone ports and FID 1 by the
> + * offloaded VLAN-unaware bridge via port-based FID, so allow
> + * at most one offloaded bridge. The bridge number it gets is
> + * what rtl8365mb_port_set_efid() takes as "offloaded" to
> + * enable port-based FID, so max_num_bridges must not be 0.
> + * A bridge with another number is rejected in
> + * rtl8365mb_port_set_efid() and stays software-forwarded.
> + */
> + ds->max_num_bridges = 1;
> + }
[Severity: Low]
This isn't a bug, but should the comment above rtl8365mb_d_want_ivl() in
rtl8365mb_vlan.c be updated with this change? It still reads:
drivers/net/dsa/realtek/rtl8365mb_vlan.c:
/* Family D has no EFID. Use IVL while at least one user port is VLAN
* filtering and SVL otherwise. The family D L2 helpers added later in the
* series use the matching key for static FDB/MDB entries. ...
* switch-wide: a VLAN-unaware bridge that shares the switch with a
* VLAN-aware one also gets IVL (known limitation).
*/
This patch adds those helpers (rtl8365mb_d_l2_uc_to_data(),
rtl8365mb_d_l2_data_to_uc(), rtl8365mb_d_l2_mc_to_data() and
rtl8365mb_d_l2_data_to_mc()). Once they are in the tree, "added later in
the series" is out of date.
The "known limitation" also looks like it can no longer happen. With
max_num_bridges = 1, and rtl8365mb_port_set_efid() rejecting efid > 1, only
one bridge per switch is offloaded.
Ports of a bridge that is only forwarded in software never get
vlan_filtering. dsa_user_port_attr_set() rejects the attribute for them:
net/dsa/user.c:dsa_user_port_attr_set() {
...
case SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING:
if (!dsa_port_offloads_bridge_dev(dp, attr->orig_dev))
return -EOPNOTSUPP;
...
}
As a result, dsa_port_is_vlan_filtering() in rtl8365mb_d_want_ivl() only
reflects the one offloaded bridge.
Could the comment drop the reference to the series and the limitation
note?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/9efcb80a-517c-4413-8261-4f9380e0eb83%40yahoo.com
Technical Details
Message-ID:
<179650918478.3148.14615284115957857798@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378161-linux-kernel-netdev=dewy.ruReferences:
<12bb2f1f-bce7-4d3e-876a-8d9aa6d1aace@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-378161-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v20 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Date: Sat, 05 Dec 2026 22:19:44 +0000 Organization: Usenet Network Message-ID: <179650918478.3148.14615284115957857798@kernel.org> References: <12bb2f1f-bce7-4d3e-876a-8d9aa6d1aace@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3132248"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:xTbAj00MnT2IR1ORp37q+CUMPEE= sha256:2QeBPps5v0/422jYSi+uDJR2NNMViYUFT/TTTEjIKJU= sha1:VQNi4QvUYp/nXr/c5kdp0RJbBDg= sha256:SQZCC87JoKc7EeSrwZs7lhpawEbTKLJ16ATUBFuJ5C4= 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 BE030117ED8; Sun, 6 Dec 2026 01:20:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.539 X-Spam-Status: No, score=-3.539 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.14, 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 fiS01bkc0JVa; Sun, 6 Dec 2026 01:20:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-378161-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 57773117EA0; Sun, 6 Dec 2026 01:19:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id A21B231C13; Sat, 5 Dec 2026 22:19:47 +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=1796509187; b=Uomfp2V6mc9IY+lfJKf7/QQ5gzC7VIJ7HTRp/3RTI/3gLBGzTpxHe92xxG4lWicxYHHM aX0FAKmAN4Mk4NHdxPy2iJT++m/gyavxlSaTjJflY+QM7BQ3fR09kwYr/pUJLU+Zs4X2S d2v0dDcY8S5ODu60tws4dILB7Z/5nIusuMM18K5K0PxtpMGrf0fW1pOmdIwdXNeEruGcj 17n4tkbeREJr4NVYgN6ShWZfIqZOd5GtQWVD5TVziwYD/8sr0zQpyKg4W1Q0rrHUVOQPw nrAlOoPJESEIHL/bEfyVMdmKGt56pS6/djZJGnTMfc3IUGGWiqX2+6+1+SHy9DouerQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796509187; 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=wPFChG/WjUQ1WRlikkJnla6UGGNFV6+3cAZbd8NDTe8=; b=xk4kkvzVvJ3dfi7Yr0/nzMwjGonHEJpSnHAHOOuyRAoGeTdO8cp4zvT/Jhcum/LT9tWt YP+RNZB487MrEcQgYeVFU92BNS76w9jOUNSVi1UkU7FOGmhECUw9GceTl02z1X4BfdgdB DtoBrfmKXhO1yUbekvKPolboDOYBB43uLfPp02Mou95LgGSrf+FLvCQgZAFqijz1bUJEu Fu5b6Yc93FRbgzQ413ehtNuI7Gr1YePAciaXvsD4Cms7BGIrbI1xo2zZNkrQQK3UEP+Vo wCXOHN14lLuzYGGe4UnBE933SHkuLSifCz9zLyJZOHaka4+YKHwINAw8bgc43yH6zlg== 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=U7iWMuii; 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 70185606A681; Sat, 5 Dec 2026 22:19:47 +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=U7iWMuii 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=1796509186; b=qMZxakonudgtoAXVOL0TfarQ968U7ZbH0/sI06aSPW0Kufr16dOMg/jAMiDHjzHGAIHV 70lRRdXMfzY8LSjwGgb70A1k/6dLkCcJrHr0BfJJsD5GbbWeiKQjSFHedSIqoWRGp1LMx 89uNEe7iysUnbn1oHKjMWLbiAa3VqQRz93eY45pG5i1YqH3b0MNnlqde+ALREJRh+QoUS cmOADQySSvhXq8NHonVBpDpbQOlvvFOghpCz5hPj30W0UJiK3S2ZWYwYQmEV0zxfRGw6j GEXdqPVN8tYxUW9TW0NcTDwDwgBgQM638tDt2tZJDLfxJHaMb3OmWMwT12mtKdYe0Jw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796509186; 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=wPFChG/WjUQ1WRlikkJnla6UGGNFV6+3cAZbd8NDTe8=; b=NQ24cI0L1s7fHZlGvwQcq65CXV9jGpHHScIMCfvk/cckHkbwIH16yODyuIXlVOMVHT4r YPh/zwmqtTFevB1s4Cl4yQINegW1DHh5/jNWdJL2ksQopqBOajrrdozZyPUQm8s+EczB9 LH+v1NBcUshEMeRYUV/N9XyQyl/4JPkjxTGxGcRPbm+ekt/p3G5dsRBo+pmDltsJDV3Wd 2cDPW/n2uLZe/tORkDozw2kO7mCkiS0mRZrlPp5Xd/t85Vj9SJUtST9e0b/qtcFNaDEwK YBMGNnBQEAPeb+2HbKx0acrwesQMdpnXXKkocqMSQ3AQxXvCcY2J6oznELXRmZ/t5qg== 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=U7iWMuii; 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 8CA65606A339; Sat, 5 Dec 2026 22:19:46 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 321E81F0092B; Sat, 5 Dec 2026 22:19:45 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796509186; bh=wPFChG/WjUQ1WRlikkJnla6UGGNFV6+3cAZbd8NDTe8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=U7iWMuiieb34WXj+LEpmMaTFKNZuhroBy0jfpZwZCVp4t4Fo9Jjf/4tN89b94jfol DIZZnGyX7evG8ibtSZj0CDJI2L8s97Vp2M+Zizhm7He9W7CdvNDT1E5F94rg4MIlls sizMqe6mFmbFz5qUOY+WBM+D2b49S+sdnhkhTf0D8u4d1wxVaJk72nvfm7Q5fxrqGd Y0NIHruxwCkAlKE9dbnhMBDL5mUr6CKEpgkY9VNk5X2l15SsOSnbz++CF1VEnQMNXw k6TxyoNWRiPrTeA3vd6F1DmHJiLMeIFlnrUbxuJ6wACluLcxxj37um+wZO1AnMScZn 8cu1BAyE98lZA== 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: <12bb2f1f-bce7-4d3e-876a-8d9aa6d1aace@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