* [net 1/1] tipc: initialize broadcast link stale counter correctly
@ 2018-10-11 20:02 Jon Maloy
2018-10-12 0:41 ` Ying Xue
2018-10-16 5:04 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jon Maloy @ 2018-10-11 20:02 UTC (permalink / raw)
To: davem, netdev
Cc: gordan.mihaljevic, tung.q.nguyen, hoang.h.le, jon.maloy,
canh.d.luu, ying.xue, tipc-discussion
In the commit referred to below we added link tolerance as an additional
criteria for declaring broadcast transmission "stale" and resetting the
unicast links to the affected node.
Unfortunately, this 'improvement' introduced two bugs, which each and
one alone cause only limited problems, but combined lead to seemingly
stochastic unicast link resets, depending on the amount of broadcast
traffic transmitted.
The first issue, a missing initialization of the 'tolerance' field of
the receiver broadcast link, was recently fixed by commit 047491ea334a
("tipc: set link tolerance correctly in broadcast link").
Ths second issue, where we omit to reset the 'stale_cnt' field of
the same link after a 'stale' period is over, leads to this counter
accumulating over time, and in the absence of the 'tolerance' criteria
leads to the above described symptoms. This commit adds the missing
initialization.
Fixes: a4dc70d46cf1 ("tipc: extend link reset criteria for stale packet
retransmission")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/link.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index f6552e4..201c3b5 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1041,6 +1041,7 @@ static int tipc_link_retrans(struct tipc_link *l, struct tipc_link *r,
if (r->last_retransm != buf_seqno(skb)) {
r->last_retransm = buf_seqno(skb);
r->stale_limit = jiffies + msecs_to_jiffies(r->tolerance);
+ r->stale_cnt = 0;
} else if (++r->stale_cnt > 99 && time_after(jiffies, r->stale_limit)) {
link_retransmit_failure(l, skb);
if (link_is_bc_sndlink(l))
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [net 1/1] tipc: initialize broadcast link stale counter correctly
2018-10-11 20:02 [net 1/1] tipc: initialize broadcast link stale counter correctly Jon Maloy
@ 2018-10-12 0:41 ` Ying Xue
2018-10-16 5:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Ying Xue @ 2018-10-12 0:41 UTC (permalink / raw)
To: Jon Maloy, davem, netdev; +Cc: tipc-discussion
On 10/12/2018 04:02 AM, Jon Maloy wrote:
> In the commit referred to below we added link tolerance as an additional
> criteria for declaring broadcast transmission "stale" and resetting the
> unicast links to the affected node.
>
> Unfortunately, this 'improvement' introduced two bugs, which each and
> one alone cause only limited problems, but combined lead to seemingly
> stochastic unicast link resets, depending on the amount of broadcast
> traffic transmitted.
>
> The first issue, a missing initialization of the 'tolerance' field of
> the receiver broadcast link, was recently fixed by commit 047491ea334a
> ("tipc: set link tolerance correctly in broadcast link").
>
> Ths second issue, where we omit to reset the 'stale_cnt' field of
> the same link after a 'stale' period is over, leads to this counter
> accumulating over time, and in the absence of the 'tolerance' criteria
> leads to the above described symptoms. This commit adds the missing
> initialization.
>
> Fixes: a4dc70d46cf1 ("tipc: extend link reset criteria for stale packet
> retransmission")
>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
> ---
> net/tipc/link.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/tipc/link.c b/net/tipc/link.c
> index f6552e4..201c3b5 100644
> --- a/net/tipc/link.c
> +++ b/net/tipc/link.c
> @@ -1041,6 +1041,7 @@ static int tipc_link_retrans(struct tipc_link *l, struct tipc_link *r,
> if (r->last_retransm != buf_seqno(skb)) {
> r->last_retransm = buf_seqno(skb);
> r->stale_limit = jiffies + msecs_to_jiffies(r->tolerance);
> + r->stale_cnt = 0;
> } else if (++r->stale_cnt > 99 && time_after(jiffies, r->stale_limit)) {
> link_retransmit_failure(l, skb);
> if (link_is_bc_sndlink(l))
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [net 1/1] tipc: initialize broadcast link stale counter correctly
2018-10-11 20:02 [net 1/1] tipc: initialize broadcast link stale counter correctly Jon Maloy
2018-10-12 0:41 ` Ying Xue
@ 2018-10-16 5:04 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-10-16 5:04 UTC (permalink / raw)
To: jon.maloy
Cc: netdev, gordan.mihaljevic, tung.q.nguyen, hoang.h.le, canh.d.luu,
ying.xue, tipc-discussion
From: Jon Maloy <jon.maloy@ericsson.com>
Date: Thu, 11 Oct 2018 22:02:29 +0200
> In the commit referred to below we added link tolerance as an additional
> criteria for declaring broadcast transmission "stale" and resetting the
> unicast links to the affected node.
>
> Unfortunately, this 'improvement' introduced two bugs, which each and
> one alone cause only limited problems, but combined lead to seemingly
> stochastic unicast link resets, depending on the amount of broadcast
> traffic transmitted.
>
> The first issue, a missing initialization of the 'tolerance' field of
> the receiver broadcast link, was recently fixed by commit 047491ea334a
> ("tipc: set link tolerance correctly in broadcast link").
>
> Ths second issue, where we omit to reset the 'stale_cnt' field of
> the same link after a 'stale' period is over, leads to this counter
> accumulating over time, and in the absence of the 'tolerance' criteria
> leads to the above described symptoms. This commit adds the missing
> initialization.
>
> Fixes: a4dc70d46cf1 ("tipc: extend link reset criteria for stale packet
> retransmission")
>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Applied, thanks Jon.
In the future, please always make your Fixes: tag one single line no
matter how long it is. And also do not separate it from other tags
like the signoff with empty lines. All of the tags should be
collected together without any empty lines in between.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-16 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11 20:02 [net 1/1] tipc: initialize broadcast link stale counter correctly Jon Maloy
2018-10-12 0:41 ` Ying Xue
2018-10-16 5:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox