diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2016-07-11 23:08:37 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-12 08:42:12 +0300 |
commit | 1fc07f3e1541cc49cc159beb3fdefc5013570eda (patch) | |
tree | 00e709e7385452d902efb63cc36768cffb954de7 /net/tipc/bearer.c | |
parent | a71eb720355c28eaeb2de0c4d960247c69bb2c6f (diff) | |
download | linux-1fc07f3e1541cc49cc159beb3fdefc5013570eda.tar.xz |
tipc: reset all unicast links when broadcast send link fails
In test situations with many nodes and a heavily stressed system we have
observed that the transmission broadcast link may fail due to an
excessive number of retransmissions of the same packet. In such
situations we need to reset all unicast links to all peers, in order to
reset and re-synchronize the broadcast link.
In this commit, we add a new function tipc_bearer_reset_all() to be used
in such situations. The function scans across all bearers and resets all
their pertaining links.
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bearer.c')
-rw-r--r-- | net/tipc/bearer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index bf8f05c3eb82..a597708ae381 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -330,6 +330,21 @@ static int tipc_reset_bearer(struct net *net, struct tipc_bearer *b) return 0; } +/* tipc_bearer_reset_all - reset all links on all bearers + */ +void tipc_bearer_reset_all(struct net *net) +{ + struct tipc_net *tn = tipc_net(net); + struct tipc_bearer *b; + int i; + + for (i = 0; i < MAX_BEARERS; i++) { + b = rcu_dereference_rtnl(tn->bearer_list[i]); + if (b) + tipc_reset_bearer(net, b); + } +} + /** * bearer_disable * |