Skip to contentSkip to conversation

net: bridge: optimize backup_port fdb convergence

PATCH Applied Nikolay Aleksandrov 2 participants 2 messages Apr 3, 2019 – Apr 5, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: bridge: optimize backup_port fdb convergence

We can optimize the fdb convergence when a backup_port is present by not immediately flushing the entries of the stopped port since traffic for those entries will flow towards the backup_port.

There are 2 cases specifically that benefit most:
- when the stopped port comes up before the entries expire by themselves
- when there's an external entry refresh and they're kept while the backup_port is operating (e.g. mlag)

---
We have been running with this change for over an year, it has been extensively tested.

 net/bridge/br_stp_if.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/bridge/br_stp_if.c +2 -1
index 808e2b914015..8d65ae5210e0 100644
@@ -117,7 +117,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
 	del_timer(&p->forward_delay_timer);
 	del_timer(&p->hold_timer);
 
-	br_fdb_delete_by_port(br, p, 0, 0);
+	if (!rcu_access_pointer(p->backup_port))
+		br_fdb_delete_by_port(br, p, 0, 0);
 	br_multicast_disable_port(p);
 
 	br_configuration_update(br);
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw

From: Nikolay Aleksandrov <[email protected]>
Date: Wed, 3 Apr 2019 13:49:24 +0300

Quoted 10 lines

We can optimize the fdb convergence when a backup_port is present by not immediately flushing the entries of the stopped port since traffic for those entries will flow towards the backup_port.

There are 2 cases specifically that benefit most:
- when the stopped port comes up before the entries expire by themselves
- when there's an external entry refresh and they're kept while the backup_port is operating (e.g. mlag)

Applied.