Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2028334imu; Fri, 14 Dec 2018 04:45:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/UgDlzsPFVNH098yNOHGlEllN9SVk7s3gPZs+3SyAM0E/VZLYLdRMrdKDZRL/XfJOHYSf+J X-Received: by 2002:a17:902:64c1:: with SMTP id y1mr2757806pli.64.1544791518838; Fri, 14 Dec 2018 04:45:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791518; cv=none; d=google.com; s=arc-20160816; b=JGa5dR519jjwYTtpY+cXEE8EUC2D8Lia4MbGXx3yuwbmLI+d/XIks08Vt0nYKGeu0+ KHjqf82sT0XYnCUaRMndibCdCRv5WIVz+sHbX1iXCxCc21/iTBDxRnWWyvdExX4KJGwK IJZ4/yvFhS4SbRK5+1sjFUx2B3zUWlSaeT/uN6Ru8NrJ0nJCSZLXmOzP8wpU49sEtBUE Xgf1Zgwl+XvujUvXOyjjl83j4bzI9kgv43ZvTm9nXEGU/udooTiSmdTb4CPsDCIW4gj7 H38/JOht2LiLT1CJGH84nXQZByLO0grFay6zqk/XZIdA589/5IGbGaDTNq4OYdr/0gta DerQ== 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=9FdK9PSjIPz+PXa+kjeDUE/HVbFiLLxYZ8zHjOlg71A=; b=aReGtOZ0JX2zD63fUA1AV8nm9t2BJUex/QgI8Cth9twApihjGHcdxZdVk4kD/GPRSz Bbyyz6s+w+8cVfDIiNPvPuX988Wd8ZfI7rpk8+fx4DNtQKHS6brvWgpe7MNjaDUaG99R BNRFtaLu0bjZT7Jglb9HfDw5e2KucjoxVd6vlsFfqJzE6muq28iYv3OTiYCtLwrPv9Hu noYbFO9peW+kMwP4xuBy7qHgIYwrhuamgBdl9RaNyaRQbjllse8X2/lnbK9x+lOd6XFR iQ2mn4UHhL/Dgraz9x8oo7TYzjxG1qOdxpdcVpyckotKlcK6S35KI+P5MirBszfzTlwP EQfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hq12z/t7"; 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 a34si3876327pgb.458.2018.12.14.04.45.04; Fri, 14 Dec 2018 04:45:18 -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="hq12z/t7"; 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 S1730111AbeLNMoS (ORCPT + 99 others); Fri, 14 Dec 2018 07:44:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:44088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729774AbeLNMBe (ORCPT ); Fri, 14 Dec 2018 07:01:34 -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 8EFD82145D; Fri, 14 Dec 2018 12:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544788894; bh=Jwvp6HFBhEOyQbrgmdHS0AstgMrD860x0Q6UoEvnZLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hq12z/t7XWYa1+PQvaCPUY2r4nq7viD6o3f3xgUrR2SgaU6xRLNHeSsm5orNhC0aq Qen45YSSkAmDCAP2eoPJ2r8nPa64cVMTZ3sPDAWvlhKeIWDsRnfBm1a9j2ROxXxtO7 e45stzXb5kWAXNPVbi9S8nYuzdtnROC+sT2K5FLc= 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.19 014/142] tcp: Do not underestimate rwnd_limited Date: Fri, 14 Dec 2018 12:58:19 +0100 Message-Id: <20181214115747.617053615@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@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.19-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 @@ -2338,8 +2338,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;