From: Vladimir Oltean <olteanv@gmail.com>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>, Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Arkadi Sharshevsky <arkadis@mellanox.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Andreas Schirm <andreas.schirm@siemens.com>,
Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Lukas Stockmann <lukas.stockmann@siemens.com>,
John Crispin <john@phrozen.org>
Subject: Re: [PATCH/RFC net] net: dsa: lantiq_gswip: honor dsa_db passed to port_fdb_{add,del}
Date: Sun, 10 Aug 2025 16:06:37 +0300 [thread overview]
Message-ID: <20250810130637.aa5bjkmpeg4uylnu@skbuf> (raw)
In-Reply-To: <aJfNMLNoi1VOsPrN@pidgin.makrotopia.org> <aJfNMLNoi1VOsPrN@pidgin.makrotopia.org>
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@makrotopia.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.
next prev parent reply other threads:[~2025-08-10 13:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-09 22:35 [PATCH/RFC net] net: dsa: lantiq_gswip: honor dsa_db passed to port_fdb_{add,del} Daniel Golle
2025-08-10 13:06 ` Vladimir Oltean [this message]
2025-08-10 14:48 ` Daniel Golle
2025-08-10 16:32 ` Vladimir Oltean
2025-08-10 16:54 ` Daniel Golle
2025-08-10 21:02 ` Vladimir Oltean
2025-08-11 15:32 ` Vladimir Oltean
2025-08-12 1:23 ` Daniel Golle
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=20250810130637.aa5bjkmpeg4uylnu@skbuf \
--to=olteanv@gmail.com \
--cc=alexander.sverdlin@siemens.com \
--cc=andreas.schirm@siemens.com \
--cc=andrew@lunn.ch \
--cc=arkadis@mellanox.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.stockmann@siemens.com \
--cc=netdev@vger.kernel.org \
--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