From nobody Thu Sep 22 11:30:05 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MYCkP6xGWz4d7Rc; Thu, 22 Sep 2022 11:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MYCkP6XHMz3x9p; Thu, 22 Sep 2022 11:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663846205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5bP7DhhFTiEbgc64/IWV8TZoYqV/Cz7dQGLA1KTcHQU=; b=F5UvmRLBCWKnG+QI7koq1kma77gamD9BGYHhTW/H0GEwHs62rYfpGcl+gEyImzEwoVT4lH O0MuHQeSgQ7oH6F/81O8aaxcMNnoU2AXfwemqlND/uV3tcaX2PGe7Rpm/CGbbhGBiZm/tP 8iFVj8G01E3VFffLW7H31lK2RWtXi3FNTkWm6B1eq9HAzmQ+Gc2xgh7Zqyrv+Iy0Ey79mZ h/UioYnjf9CmWGD0YfgUdsGa5Ubn+OimkucBMoo/mkn7KBCEWR62XQnDCik/6HEjHHZ1CE eXXNPY+4Kgx8BFL/fXXFhu5nUaCDfN5g2HihJUuvPmlffOZ4jzZAv/PnNG0HHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MYCkP5bTyzNvS; Thu, 22 Sep 2022 11:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28MBU5Dk092626; Thu, 22 Sep 2022 11:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28MBU50F092623; Thu, 22 Sep 2022 11:30:05 GMT (envelope-from git) Date: Thu, 22 Sep 2022 11:30:05 GMT Message-Id: <202209221130.28MBU50F092623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: a743fc8826fa - main - tcp: fix cwnd restricted SACK retransmission loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a743fc8826fa348b09d219632594c537f8e5690e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663846205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5bP7DhhFTiEbgc64/IWV8TZoYqV/Cz7dQGLA1KTcHQU=; b=QWY3uu5v1tw6FydMyIAGyPjDmnYtaA0eZ3y+oRgmdNw4j3s/t+JSgpZyfNXONhjuEpA83F xx8OHergn04jw8z0fvLYjJoeD6cB6w9WwGDX/qulCG53L2B6CEWL+ZJQlvCd/IIjuZDFoE Bgw+4EHBf3xjLNtI2W9DBZHXxTZj/9DWYXq0jjR3gx6kNa3LAIRBP9jPlAdIrVTSGO/W0s 9JzKp2IskOwk3A+gnDkNQtTSmY+xF3R5lZtbxsWoHBQRmv3OT1VU8oVA73ScXyxZe9skhc SnEe41y4eZfFAnpd4xk5pJBDXptP5bTabD/OprmwLYGmiH+/JMOrRg/5bOg+lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663846205; a=rsa-sha256; cv=none; b=LGMLIjMKRJAJU9UQ8DfMD+6OgpBVGNXKyrKRehTTile3n80kj1RpzHri/KlZ0XMMtgigmd GvgNGl084isXCCzdIi+hIF9UnpfKC2d3SJZU/7A/KlrHPoz8glmV2a4ln+KytEh6ORiIfA tNH84UEMH+4WBbPYzQK+5w4i7yRkfVQidZ+VGBVqLFbLxlpfH+QRF8U37htkNwKdhzOmax D61hBzadYzllv81O+4h5xk3sdcqjCK0qljhtpAfWvWnwVKPy7yAu1qs9mze5AVC+T9XhBe 7wqT0qXq19ahnz2QltZKwhohRIVk0X4tLjBm/o0eldHgGQ2u2KvM/j6cl0dO+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=a743fc8826fa348b09d219632594c537f8e5690e commit a743fc8826fa348b09d219632594c537f8e5690e Author: Richard Scheffenegger AuthorDate: 2022-09-22 10:55:25 +0000 Commit: Richard Scheffenegger CommitDate: 2022-09-22 11:28:43 +0000 tcp: fix cwnd restricted SACK retransmission loop While doing the initial SACK retransmission segment while heavily cwnd constrained, tcp_ouput can erroneously send out the entire sendbuffer again. This may happen after an retransmission timeout, which resets snd_nxt to snd_una while the SACK scoreboard is still populated. Reviewed By: tuexen, #transport PR: 264257 PR: 263445 PR: 260393 MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36637 --- sys/netinet/tcp_output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 1a8887984b7f..2323b0b41419 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -415,7 +415,7 @@ after_sack_rexmit: else { int32_t cwin; - /* + /* * We are inside of a SACK recovery episode and are * sending new data, having retransmitted all the * data possible in the scoreboard. @@ -431,8 +431,8 @@ after_sack_rexmit: * of len is bungled by the optimizer. */ if (len > 0) { - cwin = tp->snd_cwnd - - (tp->snd_nxt - tp->snd_recover) - + cwin = tp->snd_cwnd - imax(0, (int32_t) + (tp->snd_nxt - tp->snd_recover)) - sack_bytes_rxmt; if (cwin < 0) cwin = 0;