mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
net: bridge: mst: Notify switchdev drivers of MST state changes
Generate a switchdev notification whenever an MST state changes. This notification is keyed by the VLANs MSTI rather than the VID, since multiple VLANs may share the same MST instance. Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6284c723d9
commit
7ae9147f43
2 changed files with 25 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
enum switchdev_attr_id {
|
||||
SWITCHDEV_ATTR_ID_UNDEFINED,
|
||||
SWITCHDEV_ATTR_ID_PORT_STP_STATE,
|
||||
SWITCHDEV_ATTR_ID_PORT_MST_STATE,
|
||||
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
|
||||
SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS,
|
||||
SWITCHDEV_ATTR_ID_PORT_MROUTER,
|
||||
|
@ -32,6 +33,11 @@ enum switchdev_attr_id {
|
|||
SWITCHDEV_ATTR_ID_VLAN_MSTI,
|
||||
};
|
||||
|
||||
struct switchdev_mst_state {
|
||||
u16 msti;
|
||||
u8 state;
|
||||
};
|
||||
|
||||
struct switchdev_brport_flags {
|
||||
unsigned long val;
|
||||
unsigned long mask;
|
||||
|
@ -50,6 +56,7 @@ struct switchdev_attr {
|
|||
void (*complete)(struct net_device *dev, int err, void *priv);
|
||||
union {
|
||||
u8 stp_state; /* PORT_STP_STATE */
|
||||
struct switchdev_mst_state mst_state; /* PORT_MST_STATE */
|
||||
struct switchdev_brport_flags brport_flags; /* PORT_BRIDGE_FLAGS */
|
||||
bool mrouter; /* PORT_MROUTER */
|
||||
clock_t ageing_time; /* BRIDGE_AGEING_TIME */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue