]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix incorrect increasing of link window
authorTuong Lien <tuong.t.lien@dektech.com.au>
Wed, 15 Apr 2020 11:34:49 +0000 (18:34 +0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Apr 2020 23:23:33 +0000 (16:23 -0700)
commitb2422162db3dcaa8ec92486874c33ab8759e361c
treeea5f92b24be5dd68293dd3252ac9969d7b378764
parent2ff70eb0ea240bc9b5bab11ee0c6fbe1ece9393f
tipc: fix incorrect increasing of link window

In commit e04b9759e7ae ("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: e04b9759e7ae ("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>
net/tipc/link.c