Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: namiltd@yahoo.com
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
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	[thread overview]
Message-ID: <179650918478.3148.14615284115957857798@kernel.org> (raw)
In-Reply-To: <12bb2f1f-bce7-4d3e-876a-8d9aa6d1aace@yahoo.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 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

  reply	other threads:[~2026-12-05 22:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9efcb80a-517c-4413-8261-4f9380e0eb83.ref@yahoo.com>
2026-12-04 22:01 ` [PATCH net-next v20 00/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-12-04 22:03   ` [PATCH net-next v20 01/15] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-12-04 22:03   ` [PATCH net-next v20 02/15] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-12-04 22:04   ` [PATCH net-next v20 03/15] net: dsa: realtek: rtl8365mb: refactor forcemode handling Mieczyslaw Nalewaj
2026-12-04 22:04   ` [PATCH net-next v20 04/15] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-12-04 22:04   ` [PATCH net-next v20 05/15] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-12-04 22:04   ` [PATCH net-next v20 06/15] net: dsa: realtek: rtl8365mb: refactor VLAN 4k handling Mieczyslaw Nalewaj
2026-12-04 22:04   ` [PATCH net-next v20 07/15] net: dsa: realtek: rtl8365mb: add VLAN 4k/IVL for family D Mieczyslaw Nalewaj
2026-12-05 22:19     ` netdev-bot+sashiko
2026-12-04 22:06   ` [PATCH net-next v20 08/15] net: dsa: realtek: rtl8365mb: refactor PVID handling Mieczyslaw Nalewaj
2026-12-04 22:07   ` [PATCH net-next v20 09/15] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D Mieczyslaw Nalewaj
2026-12-05 22:19     ` netdev-bot+sashiko
2026-12-04 22:07   ` [PATCH net-next v20 10/15] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-12-04 22:07   ` [PATCH net-next v20 11/15] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling Mieczyslaw Nalewaj
2026-12-04 22:07   ` [PATCH net-next v20 13/15] net: dsa: realtek: rtl8365mb: refactor QoS priority handling Mieczyslaw Nalewaj
2026-12-04 22:07   ` [PATCH net-next v20 12/15] net: dsa: realtek: rtl8365mb: make L2/LUT access work on family D Mieczyslaw Nalewaj
2026-12-05 22:19     ` netdev-bot+sashiko [this message]
2026-12-04 22:07   ` [PATCH net-next v20 15/15] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-12-04 22:08   ` [PATCH net-next v20 14/15] net: dsa: realtek: rtl8365mb: use PCP numbering on family D Mieczyslaw Nalewaj

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=179650918478.3148.14615284115957857798@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=alvin.sipraga@analog.com \
    --cc=andrew@lunn.ch \
    --cc=contact@c127.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fabianotassotti@gmail.com \
    --cc=gabonpivovich@gmail.com \
    --cc=gusfmora@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kuncy7@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luizluca@gmail.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=namiltd@yahoo.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.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