Patch "tipc: fix incorrect increasing of link window" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tipc: fix incorrect increasing of link window

to the 5.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tipc-fix-incorrect-increasing-of-link-window.patch
and it can be found in the queue-5.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3d088b18cce20272bc4ebb1bbc52aa7379547d07
Author: Tuong Lien <tuong.t.lien@xxxxxxxxxxxxxx>
Date:   Wed Apr 15 18:34:49 2020 +0700

    tipc: fix incorrect increasing of link window
    
    commit edadedf1c5b4e4404192a0a4c3c0c05e3b7672ab upstream.
    
    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.
    
    Fixes: 16ad3f4022bb ("tipc: introduce variable window congestion control")
    Acked-by: Jon Maloy <jmaloy@xxxxxxxxxx>
    Signed-off-by: Tuong Lien <tuong.t.lien@xxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/net/tipc/link.c b/net/tipc/link.c
index 467c53a1fb5cf..d4675e922a8f7 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 */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux