Patch "tcp: fix rate_app_limited to default to 1" has been added to the 5.10-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

    tcp: fix rate_app_limited to default to 1

to the 5.10-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:
     tcp-fix-rate_app_limited-to-default-to-1.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 3ecfe23819c32c3550df19f94bf935d1980dcf07
Author: David Morley <morleyd@xxxxxxxxxx>
Date:   Thu Jan 19 19:00:28 2023 +0000

    tcp: fix rate_app_limited to default to 1
    
    [ Upstream commit 300b655db1b5152d6101bcb6801d50899b20c2d6 ]
    
    The initial default value of 0 for tp->rate_app_limited was incorrect,
    since a flow is indeed application-limited until it first sends
    data. Fixing the default to be 1 is generally correct but also
    specifically will help user-space applications avoid using the initial
    tcpi_delivery_rate value of 0 that persists until the connection has
    some non-zero bandwidth sample.
    
    Fixes: eb8329e0a04d ("tcp: export data delivery rate")
    Suggested-by: Yuchung Cheng <ycheng@xxxxxxxxxx>
    Signed-off-by: David Morley <morleyd@xxxxxxxxxx>
    Signed-off-by: Neal Cardwell <ncardwell@xxxxxxxxxx>
    Tested-by: David Morley <morleyd@xxxxxxxxxx>
    Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index cc588bc2b11d..6a0560a735ce 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -432,6 +432,7 @@ void tcp_init_sock(struct sock *sk)
 
 	/* There's a bubble in the pipe until at least the first ACK. */
 	tp->app_limited = ~0U;
+	tp->rate_app_limited = 1;
 
 	/* See draft-stevens-tcpca-spec-01 for discussion of the
 	 * initialization of these values.
@@ -2837,6 +2838,7 @@ int tcp_disconnect(struct sock *sk, int flags)
 	tp->last_oow_ack_time = 0;
 	/* There's a bubble in the pipe until at least the first ACK. */
 	tp->app_limited = ~0U;
+	tp->rate_app_limited = 1;
 	tp->rack.mstamp = 0;
 	tp->rack.advanced = 0;
 	tp->rack.reo_wnd_steps = 1;



[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