summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet2018-12-05 23:24:31 +0100
committerGreg Kroah-Hartman2018-12-17 09:24:28 +0100
commit03b271cb9175b8fc9d6dfcfb3e87f23a7d6815dc (patch)
tree0e2db0032aaf7c8cc3f75cc833875e64049cf455 /net
parentsctp: kfree_rcu asoc (diff)
downloadkernel-qcow2-linux-03b271cb9175b8fc9d6dfcfb3e87f23a7d6815dc.tar.gz
kernel-qcow2-linux-03b271cb9175b8fc9d6dfcfb3e87f23a7d6815dc.tar.xz
kernel-qcow2-linux-03b271cb9175b8fc9d6dfcfb3e87f23a7d6815dc.zip
tcp: Do not underestimate rwnd_limited
[ Upstream commit 41727549de3e7281feb174d568c6e46823db8684 ] If available rwnd is too small, tcp_tso_should_defer() can decide it is worth waiting before splitting a TSO packet. This really means we are rwnd limited. Fixes: 5615f88614a4 ("tcp: instrument how long TCP is limited by receive window") Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 68f65ddf9e3c..97e8aea4ac71 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2338,8 +2338,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
} else {
if (!push_one &&
tcp_tso_should_defer(sk, skb, &is_cwnd_limited,
- max_segs))
+ max_segs)) {
+ if (!is_cwnd_limited)
+ is_rwnd_limited = true;
break;
+ }
}
limit = mss_now;