mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stijn Cleynhens <stijncleynhens@gmail.com>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: netdev@vger.kernel.org, "Linus Walleij" <linusw@kernel.org>,
	"Alvin Šipraga" <alvin.sipraga@analog.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Mieczyslaw Nalewaj" <namiltd@yahoo.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] net: dsa: realtek: rtl8365mb: keep the neutral PVID in VLAN-unaware bridges
Date: Wed, 25 Nov 2026 14:14:07 +0100	[thread overview]
Message-ID: <20261125131407.908739-1-stijncleynhens@gmail.com> (raw)
In-Reply-To: <CAJq09z7Jg1Y+R5xmLeE7CSUvp7dtFKi6vLifDxdL+nh8VL3FdQ@mail.gmail.com>

On Fri, 20 Nov 2026 16:29:35 -0300 Luiz Angelo Daros de Luca wrote:
> >  - The port-based FID alone changes nothing while the VLAN4k entry of
> >    the VLAN a frame is classified to has IVL set. The learned key
> >    stays {MAC, VID}.
>
> Wouldn't it be {EFID, MAC, VID}? Or, for standalone ports, {0, MAC, VID}?

Yes, for unicast it is {EFID, MAC, VID}, I left the EFID out. Multicast
entries have no EFID, so there it is {MAC, VID}.

> >  - give each VLAN-unaware bridge its own FID and enable it on the
> >    ports of the bridge while they do not filter,
>
> And how does EFID fit into this?

The FID of a port is kept equal to its EFID: 0 for a standalone port,
the bridge number for a bridge port. A unicast entry in SVL then has
the key {EFID, MAC, FID} with the same value twice, so for unicast the
FID adds nothing and the EFID keeps the bridges apart as today. For
multicast, which has no EFID, the FID does that. This also keeps the
number of bridges at what the EFID allows (7); the FID is 4 bits on
family C, so it does not lower it.

> Here I wonder how the EFID would interact with that FID. I believe
> each standalone port requires its own FID, as they share the same
> EFID=0.

They share FID 0 in v3, as they share EFID 0 today. I do not think
they need one each: a standalone port only forwards to the CPU port and
has learning disabled, so the entries in FID 0 are the host addresses
of the standalone ports, which all point at the CPU port. Two
standalone ports with the same host address get the same entry, which
is also the case with EFID 0 and VID 0 now.

> >  - A static unicast entry written as SVL with the port's FID replaces
> >    the learned one in place. The roaming case from the commit message
> >    passes, 10 of 10 pings, on both chips.
>
> Great. That's what I was expecting. And does that replacement happen
> even if different VLANs are involved?

Yes. In SVL the VID is not part of the key. In the tagged test the
station was learned from frames in VLAN 20, and the entry that
replaced it was the VID 0 one that DSA installs on the CPU port.

> >  - as a separate patch, write a VLAN4k entry as IVL only while one of
> >    its member ports filters, and as SVL otherwise, so that tagged
> >    frames in a VLAN-unaware bridge are looked up by MAC as well.
>
> I'm not sure about that. We might need to avoid enabling the VLAN
> filter if there is another VLAN-unaware bridge also using that same
> VLAN (as well as avoiding adding a VLAN-unaware port to an IVL VLAN4k
> entry).

I would rather not refuse it, as that configuration works today and
would start to fail. In v3 such a VLAN stays in IVL, so for that one
VLAN the VLAN-unaware bridge behaves as it does now: unicast is still
kept apart by the EFID, and only the roaming of a tagged station in
that VLAN is not fixed. The commit message says so. If you prefer it
visible, I can add an extack warning when a VLAN cannot go to SVL.

There is one more case I wrote down in v3: an FDB or MDB entry with a
VID, in a VLAN that is in SVL. It stays in IVL and matches no lookup.
That is what the bridge does as well, as it looks its FDB up with VID 0
only while it does not filter. Writing it in SVL would give it the key
of the VID 0 entry with the same MAC address, such as the one for the
address of the bridge, and deleting one would delete the other.

> The Fixes tag is appropriate since the code is broken in this specific
> situation. Let's fix it in net-next and backport it to net.

OK, v3 targets net-next and keeps the Fixes tag.

Family D has no EFID, which is where Mieczyslaw's series puts a
VLAN-unaware bridge in its own FID, with the same port-based FID
registers. As his series is further along, I will base v3 on it once it
is in net-next.

Stijn

  reply	other threads:[~2026-11-25 13:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 15:02 [PATCH net v2 0/2] net: dsa: realtek: rtl8365mb: fix FDB lookups " Stijn Cleynhens
2026-11-06 15:02 ` [PATCH net v2 1/2] net: dsa: realtek: rtl8365mb: use IVL in VLAN 0 Stijn Cleynhens
2026-11-10 15:21   ` netdev-bot+sashiko
2026-11-06 15:02 ` [PATCH net v2 2/2] net: dsa: realtek: rtl8365mb: keep the neutral PVID in VLAN-unaware bridges Stijn Cleynhens
2026-11-10 15:21   ` netdev-bot+sashiko
2026-11-15 16:17     ` Stijn Cleynhens
2026-11-20 19:29       ` Luiz Angelo Daros de Luca
2026-11-25 13:14         ` Stijn Cleynhens [this message]
2026-11-13 13:28   ` Luiz Angelo Daros de Luca
2026-11-22 14:04 ` [PATCH net v2 0/2] net: dsa: realtek: rtl8365mb: fix FDB lookups " Mieczyslaw Nalewaj
2026-11-25 13:13   ` Stijn Cleynhens

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=20261125131407.908739-1-stijncleynhens@gmail.com \
    --to=stijncleynhens@gmail.com \
    --cc=alvin.sipraga@analog.com \
    --cc=andrew@lunn.ch \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=namiltd@yahoo.com \
    --cc=netdev@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®