aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2019-06-25 11:36:43 -0400
committerDavid S. Miller <davem@davemloft.net>2019-06-25 16:28:57 -0400
commit77cf8edbc0e7db6d68d1a49cf954849fb92cfa7c (patch)
tree809e7902f006dbecbd37a6f666325870930118a1 /net/tipc
parent489ce2f42514b4324e5c63e93ae7570cab995254 (diff)
tipc: simplify stale link failure criteria
In commit a4dc70d46cf1 ("tipc: extend link reset criteria for stale packet retransmission") we made link retransmission failure events dependent on the link tolerance, and not only of the number of failed retransmission attempts, as we did earlier. This works well. However, keeping the original, additional criteria of 99 failed retransmissions is now redundant, and may in some cases lead to failure detection times in the order of minutes instead of the expected 1.5 sec link tolerance value. We now remove this criteria altogether. 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')
-rw-r--r--net/tipc/link.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index bcfb0a4ab485..af50b53e75d9 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -107,7 +107,6 @@ struct tipc_stats {
107 * @backlogq: queue for messages waiting to be sent 107 * @backlogq: queue for messages waiting to be sent
108 * @snt_nxt: next sequence number to use for outbound messages 108 * @snt_nxt: next sequence number to use for outbound messages
109 * @prev_from: sequence number of most previous retransmission request 109 * @prev_from: sequence number of most previous retransmission request
110 * @stale_cnt: counter for number of identical retransmit attempts
111 * @stale_limit: time when repeated identical retransmits must force link reset 110 * @stale_limit: time when repeated identical retransmits must force link reset
112 * @ackers: # of peers that needs to ack each packet before it can be released 111 * @ackers: # of peers that needs to ack each packet before it can be released
113 * @acked: # last packet acked by a certain peer. Used for broadcast. 112 * @acked: # last packet acked by a certain peer. Used for broadcast.
@@ -167,7 +166,6 @@ struct tipc_link {
167 u16 snd_nxt; 166 u16 snd_nxt;
168 u16 prev_from; 167 u16 prev_from;
169 u16 window; 168 u16 window;
170 u16 stale_cnt;
171 unsigned long stale_limit; 169 unsigned long stale_limit;
172 170
173 /* Reception */ 171 /* Reception */
@@ -910,7 +908,6 @@ void tipc_link_reset(struct tipc_link *l)
910 l->acked = 0; 908 l->acked = 0;
911 l->silent_intv_cnt = 0; 909 l->silent_intv_cnt = 0;
912 l->rst_cnt = 0; 910 l->rst_cnt = 0;
913 l->stale_cnt = 0;
914 l->bc_peer_is_up = false; 911 l->bc_peer_is_up = false;
915 memset(&l->mon_state, 0, sizeof(l->mon_state)); 912 memset(&l->mon_state, 0, sizeof(l->mon_state));
916 tipc_link_reset_stats(l); 913 tipc_link_reset_stats(l);
@@ -1068,8 +1065,7 @@ static bool link_retransmit_failure(struct tipc_link *l, struct tipc_link *r,
1068 if (r->prev_from != from) { 1065 if (r->prev_from != from) {
1069 r->prev_from = from; 1066 r->prev_from = from;
1070 r->stale_limit = jiffies + msecs_to_jiffies(r->tolerance); 1067 r->stale_limit = jiffies + msecs_to_jiffies(r->tolerance);
1071 r->stale_cnt = 0; 1068 } else if (time_after(jiffies, r->stale_limit)) {
1072 } else if (++r->stale_cnt > 99 && time_after(jiffies, r->stale_limit)) {
1073 pr_warn("Retransmission failure on link <%s>\n", l->name); 1069 pr_warn("Retransmission failure on link <%s>\n", l->name);
1074 link_print(l, "State of link "); 1070 link_print(l, "State of link ");
1075 pr_info("Failed msg: usr %u, typ %u, len %u, err %u\n", 1071 pr_info("Failed msg: usr %u, typ %u, len %u, err %u\n",
@@ -1515,7 +1511,6 @@ int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb,
1515 1511
1516 /* Forward queues and wake up waiting users */ 1512 /* Forward queues and wake up waiting users */
1517 if (likely(tipc_link_release_pkts(l, msg_ack(hdr)))) { 1513 if (likely(tipc_link_release_pkts(l, msg_ack(hdr)))) {
1518 l->stale_cnt = 0;
1519 tipc_link_advance_backlog(l, xmitq); 1514 tipc_link_advance_backlog(l, xmitq);
1520 if (unlikely(!skb_queue_empty(&l->wakeupq))) 1515 if (unlikely(!skb_queue_empty(&l->wakeupq)))
1521 link_prepare_wakeup(l); 1516 link_prepare_wakeup(l);
@@ -2584,7 +2579,7 @@ int tipc_link_dump(struct tipc_link *l, u16 dqueues, char *buf)
2584 i += scnprintf(buf + i, sz - i, " %u", l->silent_intv_cnt); 2579 i += scnprintf(buf + i, sz - i, " %u", l->silent_intv_cnt);
2585 i += scnprintf(buf + i, sz - i, " %u", l->rst_cnt); 2580 i += scnprintf(buf + i, sz - i, " %u", l->rst_cnt);
2586 i += scnprintf(buf + i, sz - i, " %u", l->prev_from); 2581 i += scnprintf(buf + i, sz - i, " %u", l->prev_from);
2587 i += scnprintf(buf + i, sz - i, " %u", l->stale_cnt); 2582 i += scnprintf(buf + i, sz - i, " %u", 0);
2588 i += scnprintf(buf + i, sz - i, " %u", l->acked); 2583 i += scnprintf(buf + i, sz - i, " %u", l->acked);
2589 2584
2590 list = &l->transmq; 2585 list = &l->transmq;