Skip to content

Commit edadedf

Browse files
Tuong Liendavem330
authored andcommitted
tipc: fix incorrect increasing of link window
In commit 16ad3f4 ("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: 16ad3f4 ("tipc: introduce variable window congestion control") Acked-by: Jon Maloy <[email protected]> Signed-off-by: Tuong Lien <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5309960 commit edadedf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/link.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ static void tipc_link_update_cwin(struct tipc_link *l, int released,
10651065
/* Enter fast recovery */
10661066
if (unlikely(retransmitted)) {
10671067
l->ssthresh = max_t(u16, l->window / 2, 300);
1068-
l->window = l->ssthresh;
1068+
l->window = min_t(u16, l->ssthresh, l->window);
10691069
return;
10701070
}
10711071
/* Enter slow start */

0 commit comments

Comments
 (0)