diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2019-04-03 06:49:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-04 20:39:47 -0400 |
commit | 8dc350202d32dbd9482b97dbf8ca22fbcb2a7918 (patch) | |
tree | 9f063e0598b437bd6c83f9c54f223719020b073e | |
parent | a0640e610f7bc02935092ca7be1b45b1381425b0 (diff) |
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)
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/bridge/br_stp_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 808e2b914015..8d65ae5210e0 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -117,7 +117,8 @@ void br_stp_disable_port(struct net_bridge_port *p) | |||
117 | del_timer(&p->forward_delay_timer); | 117 | del_timer(&p->forward_delay_timer); |
118 | del_timer(&p->hold_timer); | 118 | del_timer(&p->hold_timer); |
119 | 119 | ||
120 | br_fdb_delete_by_port(br, p, 0, 0); | 120 | if (!rcu_access_pointer(p->backup_port)) |
121 | br_fdb_delete_by_port(br, p, 0, 0); | ||
121 | br_multicast_disable_port(p); | 122 | br_multicast_disable_port(p); |
122 | 123 | ||
123 | br_configuration_update(br); | 124 | br_configuration_update(br); |