aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2017-08-21 11:59:30 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-21 16:37:45 -0400
commit40501f90ed5d992176ba504910d512d9dd1b2668 (patch)
tree2a5a284828650f3d7da6b84d81b12d394d76c085 /net/tipc/node.c
parente65a4955b0bb70ab66e2fbfd5509747fe51d8bf9 (diff)
tipc: don't reset stale broadcast send link
When the broadcast send link after 100 attempts has failed to transfer a packet to all peers, we consider it stale, and reset it. Thereafter it needs to re-synchronize with the peers, something currently done by just resetting and re-establishing all links to all peers. This has turned out to be overkill, with potentially unwanted consequences for the remaining cluster. A closer analysis reveals that this can be done much simpler. When this kind of failure happens, for reasons that may lie outside the TIPC protocol, it is typically only one peer which is failing to receive and acknowledge packets. It is hence sufficient to identify and reset the links only to that peer to resolve the situation, without having to reset the broadcast link at all. This solution entails a much lower risk of negative consequences for the own node as well as for the overall cluster. We implement this change in this commit. Reviewed-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> 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/node.c')
-rw-r--r--net/tipc/node.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 9b4dcb6a16b5..eb728397c810 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1284,7 +1284,7 @@ static void tipc_node_bc_sync_rcv(struct tipc_node *n, struct tipc_msg *hdr,
1284 rc = tipc_bcast_sync_rcv(n->net, n->bc_entry.link, hdr); 1284 rc = tipc_bcast_sync_rcv(n->net, n->bc_entry.link, hdr);
1285 1285
1286 if (rc & TIPC_LINK_DOWN_EVT) { 1286 if (rc & TIPC_LINK_DOWN_EVT) {
1287 tipc_bearer_reset_all(n->net); 1287 tipc_node_reset_links(n);
1288 return; 1288 return;
1289 } 1289 }
1290 1290
@@ -1351,15 +1351,9 @@ static void tipc_node_bc_rcv(struct net *net, struct sk_buff *skb, int bearer_id
1351 if (!skb_queue_empty(&be->inputq1)) 1351 if (!skb_queue_empty(&be->inputq1))
1352 tipc_node_mcast_rcv(n); 1352 tipc_node_mcast_rcv(n);
1353 1353
1354 if (rc & TIPC_LINK_DOWN_EVT) { 1354 /* If reassembly or retransmission failure => reset all links to peer */
1355 /* Reception reassembly failure => reset all links to peer */ 1355 if (rc & TIPC_LINK_DOWN_EVT)
1356 if (!tipc_link_is_up(be->link)) 1356 tipc_node_reset_links(n);
1357 tipc_node_reset_links(n);
1358
1359 /* Retransmission failure => reset all links to all peers */
1360 if (!tipc_link_is_up(tipc_bc_sndlink(net)))
1361 tipc_bearer_reset_all(net);
1362 }
1363 1357
1364 tipc_node_put(n); 1358 tipc_node_put(n);
1365} 1359}