From: Eric Dumazet Subject: [PATCH net] tcp: Do not underestimate rwnd_limited Date: Wed, 5 Dec 2018 14:24:31 -0800 Message-ID: <20181205222431.120521-1-edumazet@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev , Eric Dumazet , Neal Cardwell , Soheil Hassas Yeganeh , Yuchung Cheng , Eric Dumazet To: "David S . Miller" Return-path: Received: from mail-pf1-f196.google.com ([209.85.210.196]:40546 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727592AbeLEWYg (ORCPT ); Wed, 5 Dec 2018 17:24:36 -0500 Received: by mail-pf1-f196.google.com with SMTP id i12so10697125pfo.7 for ; Wed, 05 Dec 2018 14:24:36 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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 --- net/ipv4/tcp_output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 68b5326f73212ffe7111dd0f91e0a1246fb0ae25..3186902347584090256467d8679320666aa0257e 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, } 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; -- 2.20.0.rc2.403.gdbc3b29805-goog