mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-17 22:23:45 -04:00
net: bridge: mst: Add helper to query a port's MST state
This is useful for switchdev drivers who are offloading MST states into hardware. As an example, a driver may wish to flush the FDB for a port when it transitions from forwarding to blocking - which means that the previous state must be discoverable. 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>
This commit is contained in:
committed by
Jakub Kicinski
parent
48d57b2e5f
commit
f54fd0e163
@@ -121,6 +121,7 @@ int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid,
|
||||
struct bridge_vlan_info *p_vinfo);
|
||||
bool br_mst_enabled(const struct net_device *dev);
|
||||
int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids);
|
||||
int br_mst_get_state(const struct net_device *dev, u16 msti, u8 *state);
|
||||
#else
|
||||
static inline bool br_vlan_enabled(const struct net_device *dev)
|
||||
{
|
||||
@@ -164,6 +165,11 @@ static inline int br_mst_get_info(const struct net_device *dev, u16 msti,
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static inline int br_mst_get_state(const struct net_device *dev, u16 msti,
|
||||
u8 *state)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_BRIDGE)
|
||||
|
||||
Reference in New Issue
Block a user