History

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.

Tobias Waldekranz committed 4 years ago

Commit f54fd0e1 parent 48d57b22 files · +31 −0Browse files

Showing the changes to include (1 of 2 files). Show all

Unified · Split

include/linux/if_bridge.h+6−0
@@ -121,6 +121,7 @@ int br_vlan_get_info_rcu(const struct net_device *dev, u16 vid, · 120 unmodified lines
121121 struct bridge_vlan_info *p_vinfo);
122122 bool br_mst_enabled(const struct net_device *dev);
123123 int br_mst_get_info(const struct net_device *dev, u16 msti, unsigned long *vids);
124+int br_mst_get_state(const struct net_device *dev, u16 msti, u8 *state);
124125 #else
125126 static inline bool br_vlan_enabled(const struct net_device *dev)
126127 {
@@ -164,6 +165,11 @@ static inline int br_mst_get_info(const struct net_device *dev, u16 msti, · 37 unmodified lines
164165 {
165166 return -EINVAL;
166167 }
168+static inline int br_mst_get_state(const struct net_device *dev, u16 msti,
169+ u8 *state)
170+{
171+ return -EINVAL;
172+}
167173 #endif
168174
169175 #if IS_ENABLED(CONFIG_BRIDGE)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t