]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: still fast-age ports joining a bridge if they can't configure learning
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 8 Aug 2021 22:56:48 +0000 (01:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Aug 2021 08:57:53 +0000 (09:57 +0100)
commita97422f137b83cec707a7e04ab0c9b6929754417
tree24efe2548c90654c8327de023fec6fb6b413e9fb
parent66782bd5bee7e17ad67e22f4126b0ec74a5c847f
net: dsa: still fast-age ports joining a bridge if they can't configure learning

Commit 6bce1ff4ac29 ("net: dsa: don't fast age standalone ports")
assumed that all standalone ports disable address learning, but if the
switch driver implements .port_fast_age but not .port_bridge_flags (like
ksz9477, ksz8795, lantiq_gswip, lan9303), then that might not actually
be true.

So whereas before, the bridge temporarily walking us through the
BLOCKING STP state meant that the standalone ports had a checkpoint to
flush their baggage and start fresh when they join a bridge, after that
commit they no longer do.

Restore the old behavior for these drivers by checking if the switch can
toggle address learning. If it can't, disregard the "do_fast_age"
argument and unconditionally perform fast ageing on STP state changes.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/port.c