diff options
author | Tobias Waldekranz <tobias@waldekranz.com> | 2022-03-16 16:08:49 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-17 16:49:58 -0700 |
commit | cceac97afa090284b3ceecd93ea6b7b527116767 (patch) | |
tree | 4e9f098f59d678bff0828c7db417d67e84cc7d7a /include/linux/if_bridge.h | |
parent | 7ae9147f4312903b97eae231c48571bbd95dc63f (diff) | |
download | lwn-cceac97afa090284b3ceecd93ea6b7b527116767.tar.gz lwn-cceac97afa090284b3ceecd93ea6b7b527116767.zip |
net: bridge: mst: Add helper to map an MSTI to a VID set
br_mst_get_info answers the question: "On this bridge, which VIDs are
mapped to the given MSTI?"
This is useful in switchdev drivers, which might have to fan-out
operations, relating to an MSTI, per VLAN.
An example: When a port's MST state changes from forwarding to
blocking, a driver may choose to flush the dynamic FDB entries on that
port to get faster reconvergence of the network, but this should only
be done in the VLANs that are managed by the MSTI in question.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/if_bridge.h')
-rw-r--r-- | include/linux/if_bridge.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 3aae023a9353..1cf0cc46d90d 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -119,6 +119,7 @@ int br_vlan_get_info(const struct net_device *dev, u16 vid, struct bridge_vlan_info *p_vinfo); int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid, struct bridge_vlan_info *p_vinfo); +int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids); #else static inline bool br_vlan_enabled(const struct net_device *dev) { @@ -151,6 +152,12 @@ static inline int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid, { return -EINVAL; } + +static inline int br_mst_get_info(const struct net_device *dev, u16 msti, + unsigned long *vids) +{ + return -EINVAL; +} #endif #if IS_ENABLED(CONFIG_BRIDGE) |