mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
tipc: fix incorrect increasing of link window
In commit16ad3f4022
("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. Fixes:16ad3f4022
("tipc: introduce variable window congestion control") Acked-by: Jon Maloy <jmaloy@redhat.com> Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5309960e49
commit
edadedf1c5
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user