From nobody Sun Sep 25 10:05:21 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 4Mb1jF5L8Hz4css3; Sun, 25 Sep 2022 10:05:21 +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 4Mb1jF4tGYz3VcR; Sun, 25 Sep 2022 10:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664100321; 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=TJgIg1UD8A5/borDDczpe5sAxJ6dg6C/eRiAashGfK8=; b=YCLyNcXE8AK47xNjq5Sv3vAai9gdg+uK5TtzGkhOpYooHPYaXVJpNjT9kxTc74JhKh6JYn 1eWcYgXocWz8YcKCZDxPkYfUBZzGSg2PlgK20MzkvKdmISB2ufvqaXggjEQ/5RngGicauh nXUIRbVtA58Rkj20GcHd26Il63PZJj7JKiWl3GxuuqtQg0YKNQJQudWAwYZ2asliKpnV9Z 6/T1vVZ91F1Cd8TRpJiY68fivmwg7kZogTJvuipiFKoVAJpTlWdNJMB39tzzoqHm4TGvO2 /3mbJR/59sMwYO6AinRiyVWdL5AJTi/XOT0dr93BbkEOaOtCwe6kQ0dfvppLmQ== 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 4Mb1jF3QSSzNgB; Sun, 25 Sep 2022 10:05:21 +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 28PA5L6E047532; Sun, 25 Sep 2022 10:05:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28PA5L5k047531; Sun, 25 Sep 2022 10:05:21 GMT (envelope-from git) Date: Sun, 25 Sep 2022 10:05:21 GMT Message-Id: <202209251005.28PA5L5k047531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: c1f9a81e7bfe - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c1f9a81e7bfe354dfa4f191d5180426f76bc514b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664100321; 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=TJgIg1UD8A5/borDDczpe5sAxJ6dg6C/eRiAashGfK8=; b=S3aLbJ2K13GRS5mUbeWlvKvJNJdQ64R6NN8201mtdiKqDBD+lx9qRUxqYSJGBL6JYBc+GT AFwppvWw4C60GojBe7+YTNbUPljuBCFOHUOQyj1KIMy4gVPbfYl3vXSy4ohHOpTzffTmcF 5JIzW2p+phI5FTGR2aegxiEW9Y3snt7RK3R8sFbrPNCwpG4MhfgVgOpuzDuRVkXlQtoyuU E9ASEyygJasnUZHn4NTvs9+BH1b/fee+RHBBf9NIBnVGA4Nu0qw/dmXSYx5IAA9PFSX4+f kfQYXdTfnOGm6MOtPAHfai7dMKRvSoXqYa1zit4qqdz5oyYXPiGj72UbKpO/VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664100321; a=rsa-sha256; cv=none; b=bPLqK1pCspE8ysX1WlR6uSzMWJJtVmz1mitWmL0zf2BS3fGp1f3tMdBmj3ON62lWU5KeN6 Kl8SurzJ7z9JThMJgsylrCKyXu+LCGPHScJA4qAB029Jc7V6hk3h+qsU3TDLBNRjJNtwjS Q+VH0jCamheXlZdY1yxWhz8KSCieUFlUFsd+A3VkH4I5bvsHu65af6q9KysKMqelRhyW6e xOCoEdJdOiioCoOJmFpSRRsyHZ0XP4XM+lC7H4RGr8RjLgG1/tXSYR1IGG7kUhuC2Rg+Pw mxkXi0IZ+QbJ9f3UAzR2esAgMPDSOwqBHtnDtlBDpae3cPdkhDbV089cS0DNIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c1f9a81e7bfe354dfa4f191d5180426f76bc514b commit c1f9a81e7bfe354dfa4f191d5180426f76bc514b Author: Richard Scheffenegger AuthorDate: 2022-09-22 10:55:25 +0000 Commit: Richard Scheffenegger CommitDate: 2022-09-25 08:56:28 +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 (cherry picked from commit a743fc8826fa348b09d219632594c537f8e5690e) --- 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 01dca2ba3ea1..a30f8eab389d 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -411,7 +411,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. @@ -427,8 +427,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;