diff options
author | Eric Dumazet <edumazet@google.com> | 2018-12-05 17:24:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-05 19:31:59 -0500 |
commit | 41727549de3e7281feb174d568c6e46823db8684 (patch) | |
tree | 3f09b74ec1221e468e4036cb13c0cdc038ce970b /net | |
parent | e37d05a538a6656e108f7704ad66e1ccc13d6f68 (diff) |
tcp: Do not underestimate rwnd_limited
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_output.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 68b5326f7321..318690234758 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2356,8 +2356,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
2356 | } else { | 2356 | } else { |
2357 | if (!push_one && | 2357 | if (!push_one && |
2358 | tcp_tso_should_defer(sk, skb, &is_cwnd_limited, | 2358 | tcp_tso_should_defer(sk, skb, &is_cwnd_limited, |
2359 | max_segs)) | 2359 | max_segs)) { |
2360 | if (!is_cwnd_limited) | ||
2361 | is_rwnd_limited = true; | ||
2360 | break; | 2362 | break; |
2363 | } | ||
2361 | } | 2364 | } |
2362 | 2365 | ||
2363 | limit = mss_now; | 2366 | limit = mss_now; |