net: dsa: Validate hardware support for MST
authorTobias Waldekranz <tobias@waldekranz.com>
Wed, 16 Mar 2022 15:08:52 +0000 (16:08 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Mar 2022 23:49:58 +0000 (16:49 -0700)
commit332afc4c8c0da3a451745c5d809f908006745c0d
tree32bae9abb5c33461fcf83b6a025533c1ef8f4ec7
parentf54fd0e163068ced4d0d27db64cd3cbda95b74e4
net: dsa: Validate hardware support for MST

When joining a bridge where MST is enabled, we validate that the
proper offloading support is in place, otherwise we fallback to
software bridging.

When then mode is changed on a bridge in which we are members, we
refuse the change if offloading is not supported.

At the moment we only check for configurable learning, but this will
be further restricted as we support more MST related switchdev events.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa_priv.h
net/dsa/port.c
net/dsa/slave.c