diff mbox series

[RFC,net-next,5/7] net: dsa: Include bridge addresses in assisted CPU port learning

Message ID 20210116012515.3152-6-tobias@waldekranz.com
State New
Headers show
Series net: dsa: Sync local bridge FDB addresses to hardware | expand

Commit Message

Tobias Waldekranz Jan. 16, 2021, 1:25 a.m. UTC
Now that notifications are sent out for addresses added to the bridge
itself, extend DSA to include those addresses in the hardware FDB when
assisted CPU port learning is enabled.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
---
 net/dsa/slave.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index dca393e45547..1ac46ad4a846 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2188,7 +2188,11 @@  static int dsa_slave_switchdev_event(struct notifier_block *unused,
 			struct net_device *br_dev;
 			struct dsa_slave_priv *p;
 
-			br_dev = netdev_master_upper_dev_get_rcu(dev);
+			if (netif_is_bridge_master(dev))
+				br_dev = dev;
+			else
+				br_dev = netdev_master_upper_dev_get_rcu(dev);
+
 			if (!br_dev)
 				return NOTIFY_DONE;