]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix rate_app_limited to default to 1
authorDavid Morley <morleyd@google.com>
Thu, 19 Jan 2023 19:00:28 +0000 (19:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:40 +0000 (07:52 +0100)
commite7f7b7a4adde365d370231f2241ce1b43ccdf401
treee8823d220d3287224b0048d1c4e4bdb0c1f8bd35
parent71facd64838e5ee327668264c563b63a2de992ce
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: fb6af1550f24 ("tcp: export data delivery rate")
Suggested-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David Morley <morleyd@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Tested-by: David Morley <morleyd@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp.c