[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250810130637.aa5bjkmpeg4uylnu@skbuf>
Date: Sun, 10 Aug 2025 16:06:37 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Hauke Mehrtens <hauke@...ke-m.de>, Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Arkadi Sharshevsky <arkadis@...lanox.com>,
Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Andreas Schirm <andreas.schirm@...mens.com>,
Alexander Sverdlin <alexander.sverdlin@...mens.com>,
Lukas Stockmann <lukas.stockmann@...mens.com>,
John Crispin <john@...ozen.org>
Subject: Re: [PATCH/RFC net] net: dsa: lantiq_gswip: honor dsa_db passed to
port_fdb_{add,del}
On Sat, Aug 09, 2025 at 11:35:28PM +0100, Daniel Golle wrote:
> Commit c9eb3e0f8701 ("net: dsa: Add support for learning FDB through
> notification") added a dev_close() call "to indicate inconsistent
> situation" when we could not delete an FDB entry from the port. In case
> of the lantiq_gswip driver this is problematic on standalone ports for
> which all calls to either .port_fdb_add() or .port_fdb_del() would just
> always return -EINVAL as adding or removing FDB entries is currently
> only supported for ports which are a member of a bridge.
>
> As since commit c26933639b54 ("net: dsa: request drivers to perform FDB
> isolation") the dsa_db is passed to the .port_fdb_add() or
> .port_fdb_del() calls we can use that to set the FID accordingly,
> similar to how it was for bridge ports, and to FID 0 for standalone
> ports. In order for FID 0 to work at all we also need to set bit 1 in
> val[1], so always set it.
>
> This solution was found in a downstream driver provided by MaxLinear
> (which is the current owner of the former Lantiq switch IP) under
> GPL-2.0. Import the implementation and the copyright headers from that
> driver.
>
> Fixes: c9eb3e0f8701 ("net: dsa: Add support for learning FDB through notification")
> Signed-off-by: Daniel Golle <daniel@...rotopia.org>
> ---
1. The dev_close() call was removed in commit 2fd186501b1c ("net: dsa:
be louder when a non-legacy FDB operation fails"); what kernel are you
seeing failures on?
2. The call paths which set DSA_DB_PORT should be all guarded by
dsa_switch_supports_uc_filtering(), which the gswip driver doesn't
fulfill (it's missing ds->fdb_isolation). Can you put a dump_stack()
in the DSA_DB_PORT handler and let me know where it's called from?
3. You haven't actually explained the context that leads to
gswip_port_fdb() returning -EINVAL. It would be great to have that as
a starting point, perhaps a dump_stack() in the unmodified code could
reveal more.
Powered by blists - more mailing lists