From: Joris Vaisvila <joey@tinyisr.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, horms@kernel.org, pabeni@redhat.com,
edumazet@google.com, davem@davemloft.net, olteanv@gmail.com,
andrew@lunn.ch, devicetree@vger.kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, arinc.unal@arinc9.com,
Landen.Chao@mediatek.com, dqfext@gmail.com,
sean.wang@mediatek.com, daniel@makrotopia.org
Subject: Re: [PATCH net-next v6 4/4] net: dsa: initial support for MT7628 embedded switch
Date: Mon, 3 Aug 2026 23:55:00 +0300 [thread overview]
Message-ID: <anDxMZRFgM-Kgmaf@archlinux> (raw)
In-Reply-To: <20260720235201.466172-1-kuba@kernel.org>
On Mon, Jul 20, 2026 at 04:52:01PM -0700, Jakub Kicinski wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> ---
> net: dsa: initial support for MT7628 embedded switch
>
> This patch adds a DSA driver for the MT7628 embedded switch, which has
> five 100Mbps user ports and a 1Gbps CPU port. tag_8021q is used to
> isolate ports via the switch's 16-entry VLAN table, with the double tag
> feature enabled to simulate VLAN-unaware behaviour.
>
> > diff --git a/drivers/net/dsa/mt7628.c b/drivers/net/dsa/mt7628.c
> > new file mode 100644
> > index 000000000000..eccdb05fce9b
> > --- /dev/null
> > +++ b/drivers/net/dsa/mt7628.c
>
> [ ... ]
>
> > +static const struct dsa_switch_ops mt7628_switch_ops = {
> > + .get_tag_protocol = mt7628_get_tag_proto,
> > + .setup = mt7628_setup,
> > + .teardown = mt7628_teardown,
> > + .port_enable = mt7628_port_enable,
> > + .port_disable = mt7628_port_disable,
> > + .phylink_get_caps = mt7628_phylink_get_caps,
> > + .tag_8021q_vlan_add = mt7628_dsa_8021q_vlan_add,
> > + .tag_8021q_vlan_del = mt7628_dsa_8021q_vlan_del,
> > +};
>
> [Medium]
> How is a user expected to place two of the user ports into a Linux bridge?
>
> The ops table does not implement port_bridge_join or port_bridge_leave,
> so dsa_switch_bridge_join() in net/dsa/switch.c returns -EOPNOTSUPP:
>
> if (!ds->ops->port_bridge_join)
> return -EOPNOTSUPP;
>
> That makes ip link set swpN master brX fail for every user port, which
> seems to contradict the commit message:
>
> The switch hardware has a very limited 16 entry VLAN table.
> Configuring VLANs is the only way to control switch forwarding.
> Currently 6 entries are used by tag_8021q to isolate the ports.
>
It does not contradict the commit message. The driver intentionally does
not implement bridge offloading.
The ports can still be bridged in software without propagating it to
the hardware. This is a deliberate simplification to keep the initial
driver easier to review. It is also a practical initial solution for
this switch, as all of the user ports are 100mbps, while the CPU to
switch link is 1gbps, making it possible to bridge multiple ports at
line rate in software.
> Without a port_bridge_join hook, dsa_tag_8021q_bridge_join() is never
> invoked, so there is no path to migrate a port's tag_8021q VID from its
> standalone VID to a bridge VID.
>
> Would wiring the tag_8021q helpers directly, similar to what
> vitesse-vsc73xx-core.c does, be sufficient here:
>
> .port_bridge_join = dsa_tag_8021q_bridge_join,
> .port_bridge_leave = dsa_tag_8021q_bridge_leave,
>
> Related bridge-lifecycle callbacks such as port_stp_state_set,
> port_pre_bridge_flags, port_bridge_flags and port_fast_age also appear
> to be absent, is that intentional for this initial submission?
For the initial submission tag_8021q is only used for the standalone VID
feature and software bridging is used. I intend to work on hardware
bridging after initial support is complete.
next prev parent reply other threads:[~2026-08-03 20:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 10:56 [PATCH net-next v6 0/4] net: dsa: mt7628 embedded switch initial support Joris Vaisvila
2026-07-04 10:56 ` [PATCH net-next v6 1/4] dt-bindings: net: dsa: add MT7628 ESW Joris Vaisvila
2026-07-04 10:56 ` [PATCH net-next v6 2/4] net: phy: mediatek: add phy driver for MT7628 built-in Fast Ethernet PHYs Joris Vaisvila
2026-07-04 10:56 ` [PATCH net-next v6 3/4] net: dsa: initial MT7628 tagging driver Joris Vaisvila
2026-07-04 10:56 ` [PATCH net-next v6 4/4] net: dsa: initial support for MT7628 embedded switch Joris Vaisvila
2026-07-05 10:58 ` sashiko-bot
2026-07-20 23:52 ` Jakub Kicinski
2026-08-03 20:55 ` Joris Vaisvila [this message]
2026-07-20 23:52 ` Jakub Kicinski
2026-08-03 19:50 ` Joris Vaisvila
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=anDxMZRFgM-Kgmaf@archlinux \
--to=joey@tinyisr.com \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.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