]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dsa: mv88e6xxx: Verify after ATU Load ops
authorJoseph Huang <Joseph.Huang@garmin.com>
Thu, 6 Mar 2025 17:23:05 +0000 (12:23 -0500)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Mar 2025 03:36:33 +0000 (19:36 -0800)
commitdc5340c3133a3ebe54853fd299116149e528cfaa
tree9540ba4b7b52071a54510f0aeedae14a9a2e8477
parentd749d901b2168389f060b654fdaa08acf6b367d2
net: dsa: mv88e6xxx: Verify after ATU Load ops

ATU Load operations could fail silently if there's not enough space
on the device to hold the new entry. When this happens, the symptom
depends on the unknown flood settings. If unknown multicast flood is
disabled, the multicast packets are dropped when the ATU table is
full. If unknown multicast flood is enabled, the multicast packets
will be flooded to all ports. Either way, IGMP snooping is broken
when the ATU Load operation fails silently.

Do a Read-After-Write verification after each fdb/mdb add operation
to make sure that the operation was really successful, and return
-ENOSPC otherwise.

Fixes: defb05b9b9b4 ("net: dsa: mv88e6xxx: Add support for fdb_add, fdb_del, and fdb_getnext")
Signed-off-by: Joseph Huang <Joseph.Huang@garmin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250306172306.3859214-1-Joseph.Huang@garmin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c