Skip to content

Commit

Permalink
net: bridge: optimize backup_port fdb convergence
Browse files Browse the repository at this point in the history
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)

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nikolay Aleksandrov authored and David S. Miller committed Apr 5, 2019
1 parent a0640e6 commit 8dc3502
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bridge/br_stp_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8dc3502

Please sign in to comment.