提交 03b271cb 编写于 作者: E Eric Dumazet 提交者: Greg Kroah-Hartman

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: 5615f886 ("tcp: instrument how long TCP is limited by receive window")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Acked-by: NSoheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: NYuchung Cheng <ycheng@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5148726f
...@@ -2338,9 +2338,12 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, ...@@ -2338,9 +2338,12 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
} else { } else {
if (!push_one && if (!push_one &&
tcp_tso_should_defer(sk, skb, &is_cwnd_limited, tcp_tso_should_defer(sk, skb, &is_cwnd_limited,
max_segs)) max_segs)) {
if (!is_cwnd_limited)
is_rwnd_limited = true;
break; break;
} }
}
limit = mss_now; limit = mss_now;
if (tso_segs > 1 && !tcp_urg_mode(tp)) if (tso_segs > 1 && !tcp_urg_mode(tp))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册