🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by David Yang Sun, 25 Oct 2026 02:41
[PATCH net] net: dsa: motorcomm: Report error when FDB fails to add
#7130
Author: David Yang
Date: Sun, 25 Oct 2026 02:41
31 lines
11384 bytes
fdb_add() ignored any errors returned by the hardware (for example,
table is full). Return error for that case.

Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 drivers/net/dsa/motorcomm/chip.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
index d4fc20c52a58..422b45085e7b 100644
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@ -725,7 +725,13 @@ yt921x_fdb_add(struct yt921x_priv *priv, const unsigned char *addr, u16 vid,
 	if (res)
 		return res;
 
-	return yt921x_fdb_wait(priv, &val);
+	res = yt921x_fdb_wait(priv, &val);
+	if (res)
+		return res;
+	if (val & YT921X_FDB_RESULT_NOTFOUND)
+		return -ENOSPC;
+
+	return 0;
 }
 
 static int
-- 
2.53.0
Re: [PATCH net] net: dsa: motorcomm: Report error when FDB fails to add
#7132
Author: netdev-bot+sinfo
Date: Sun, 25 Oct 2026 02:46
22 lines
8682 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by code inspection). If it was triggered please include
   the symptoms, like the stack trace or error messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH net] net: dsa: motorcomm: Report error when FDB fails to add
#7288
Author: Andrew Lunn
Date: Mon, 26 Oct 2026 00:44
16 lines
8764 bytes
On Sun, Oct 25, 2026 at 10:41:11AM +0800, David Yang wrote:
> fdb_add() ignored any errors returned by the hardware (for example,
> table is full). Return error for that case.
> 
> Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
> Signed-off-by: David Yang <mmyangfl@gmail.com>

I'm not sure this deserves a Fixes tag. How many entries does the
table take before it is full? Typical home networks have what, 10, 20
devices maximum. A small business network may have a couple of
hundred?

What happens if it is full, and you don't return ENOSPC?

      Andrew
Re: [PATCH net] net: dsa: motorcomm: Report error when FDB fails to add
#7379
Author: David Yang
Date: Mon, 26 Oct 2026 08:35
25 lines
12773 bytes
On Mon, Oct 26, 2026 at 8:44 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sun, Oct 25, 2026 at 10:41:11AM +0800, David Yang wrote:
> > fdb_add() ignored any errors returned by the hardware (for example,
> > table is full). Return error for that case.
> >
> > Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
> > Signed-off-by: David Yang <mmyangfl@gmail.com>
>
> I'm not sure this deserves a Fixes tag. How many entries does the
> table take before it is full? Typical home networks have what, 10, 20
> devices maximum. A small business network may have a couple of
> hundred?
>
> What happens if it is full, and you don't return ENOSPC?
>
>       Andrew

When full, the error was silently ignored -- the bridge kept the entry
marked offloaded while the hardware never stored it.

May indeed be too minor for a Fixes tag -- could drop it in v2 if you prefer.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads