Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1991212imu; Fri, 14 Dec 2018 04:10:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/VkWEFXQk4Zvnn04pNb0JRfPgUIuwia04Rm3jgqK3dgyYEGC/Q0qljG0vUd24xazk8BiRxY X-Received: by 2002:a63:1412:: with SMTP id u18mr2432315pgl.247.1544789433440; Fri, 14 Dec 2018 04:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544789433; cv=none; d=google.com; s=arc-20160816; b=EzzYIzc+ooLlVrVO6sD3+vjMehLI7JGAJD5grgv07q8mCcdekpdwOTJef8QHKMatQm NvbFtV6wtr925n6DLMoAUK1DncGX4Jno2hg7MwhS7IeYsPjeyXChUGVrUEHXjMW3OJOU Qvel5kflEbWXmws29MP2m0+Wt0E1wuqo8HkxG+r7p0+f6AHSuo9r66jggqLKnnE6cc47 3y9iysd+62upESPTVLD8HS+JnDUMafb4tFXPBhRlT/s7HEaBkVeQ2Ktj3lNyTgW+Vyi1 gf8fliGqRHJV1p5m8E01F7lIbzgehAAnWS5WHkyEBsgMu2G+ORGeglW89aYhSWfNT816 JqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zZjWvl3Zby//4p/s9oamNBoaUDycGz4vnfSmDAdEefM=; b=YteB7Zj2UiXV56vD4GoKQ582OAHVOWF/1jz0R1nafv6Wo+6aVT6x6kXPkJQWTNZyl3 TXgEQ/wMvFxAtCUn2aDoXDTpELpU19/kSxykrpTnXrWM484WLP7PBhriavnMig7CDJ2T aUBg+5oOxMOoeRohVTN56BizgYP4Byq1uPSqv/iy3HWGQxyhtSVdEn5vG8FHHzNs84Ax BUBulozQGDdPI/mE+ZWVFZjjnsdw8gLoqT5ZhlRijPd4bWF6benivcbYuanp8+/FgSCS uDD7w4kDjWp9PdjFz76Y6vlWyuX8YlHnJ8PzlBvuGScpCMLuaAfbzWuAO+8ha8LIBg+t I4vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uFbRcfWi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si3788238plt.394.2018.12.14.04.10.17; Fri, 14 Dec 2018 04:10:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uFbRcfWi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731143AbeLNMHh (ORCPT + 99 others); Fri, 14 Dec 2018 07:07:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:52928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729836AbeLNMHf (ORCPT ); Fri, 14 Dec 2018 07:07:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DAAA621486; Fri, 14 Dec 2018 12:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789255; bh=QDEIqdHqznz4aw8yFwFjfEs+1cYl/Yy5h9JccUPzxGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uFbRcfWiQzUVUgoy5M4zeBHpSrtWGqobVEG88rsz74N87HrQxHKecAqgmGwdkoxC3 OpeA4fJN6d8Zil69aIaaRTrR8wLvZCD26uVK40J6l8Kca1ap6+52QgAUDjNSLH1+rK qvhFmjSj0ttnrWHkRHeinyKqxLMnWXnAMpv6GwM0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Soheil Hassas Yeganeh , Yuchung Cheng , "David S. Miller" Subject: [PATCH 4.14 12/89] tcp: Do not underestimate rwnd_limited Date: Fri, 14 Dec 2018 12:59:25 +0100 Message-Id: <20181214115730.277730409@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115729.658859279@linuxfoundation.org> References: <20181214115729.658859279@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ 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 Acked-by: Soheil Hassas Yeganeh Reviewed-by: Yuchung Cheng Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/tcp_output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2328,8 +2328,11 @@ static bool tcp_write_xmit(struct sock * } 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;