From: Jon M. <jm...@re...> - 2020-04-14 19:49:09
|
Hmm, I was sure I already did. But anyway: Acked-by: Jon Maloy <jm...@re...> On 4/14/20 3:54 AM, Tuong Tong Lien wrote: > Hi Jon, all, > > I understand that you have agreed on the solution to the issue in previous discussions, but please make a formal "ack-by" so I will send it to net. > Thanks a lot! > > BR/Tuong > > -----Original Message----- > From: Tuong Lien <tuo...@de...> > Sent: Friday, March 27, 2020 7:31 PM > To: jm...@re...; ma...@do...; yin...@wi...; tip...@li... > Cc: tip...@de... > Subject: [net] tipc: fix incorrect increasing of link window > > In commit 16ad3f4022bb ("tipc: introduce variable window congestion > control"), we allow link window to change with the congestion avoidance > algorithm. However, there is a bug that during the slow-start if packet > retransmission occurs, the link will enter the fast-recovery phase, set > its window to the 'ssthresh' which is never less than 300, so the link > window suddenly increases to that limit instead of decreasing. > > Consequently, two issues have been observed: > > - For broadcast-link: it can leave a gap between the link queues that a > new packet will be inserted and sent before the previous ones, i.e. not > in-order. > > - For unicast: the algorithm does not work as expected, the link window > jumps to the slow-start threshold whereas packet retransmission occurs. > > This commit fixes the issues by avoiding such the link window increase, > but still decreasing if the 'ssthresh' is lowered. > > Signed-off-by: Tuong Lien <tuo...@de...> > --- > net/tipc/link.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/tipc/link.c b/net/tipc/link.c > index 467c53a1fb5c..d4675e922a8f 100644 > --- a/net/tipc/link.c > +++ b/net/tipc/link.c > @@ -1065,7 +1065,7 @@ static void tipc_link_update_cwin(struct tipc_link *l, int released, > /* Enter fast recovery */ > if (unlikely(retransmitted)) { > l->ssthresh = max_t(u16, l->window / 2, 300); > - l->window = l->ssthresh; > + l->window = min_t(u16, l->ssthresh, l->window); > return; > } > /* Enter slow start */ |