]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dsa: b53: stop reading ARL entries if search is done
authorJonas Gorski <jonas.gorski@gmail.com>
Sun, 2 Nov 2025 10:07:57 +0000 (11:07 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 00:42:42 +0000 (16:42 -0800)
commit0be04b5fa62a82a9929ca261f6c9f64a3d0a28da
tree009b913e63527acd99ca859a89fe38129c5784a5
parentc264294624e956a967a9e2e5fa41e3273340b089
net: dsa: b53: stop reading ARL entries if search is done

The switch clears the ARL_SRCH_STDN bit when the search is done, i.e. it
finished traversing the ARL table.

This means that there will be no valid result, so we should not attempt
to read and process any further entries.

We only ever check the validity of the entries for 4 ARL bin chips, and
only after having passed the first entry to the b53_fdb_copy().

This means that we always pass an invalid entry at the end to the
b53_fdb_copy(). b53_fdb_copy() does check the validity though before
passing on the entry, so it never gets passed on.

On < 4 ARL bin chips, we will even continue reading invalid entries
until we reach the result limit.

Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251102100758.28352-3-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/b53/b53_common.c