From nobody Thu Nov 14 17:59:42 2024 X-Original-To: dev-commits-src-main@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 4Xq7G64dqwz5cyJP; Thu, 14 Nov 2024 17:59:42 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xq7G6483sz53K6; Thu, 14 Nov 2024 17:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731607182; 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=5n2rniXikmSS9U5clz7qcCle7TAyo8KN/GOGH/uU+Mk=; b=jjxjeEyIhVMtxZPeJoGsXRINYxq88382cCo46Tx3MqJL8i821kAQMhYG8teCMl2W2XR86U codhHUj81gx11BzaWB5iWayBl1VhvCofBD15SzP0qFHyvcDX64XlQpUrkTyWlRRljUwGX9 HE3xABSmCYS9a3Clk85YaBNCugpFF/VvYepiju2E4QbY3S62LQLbR2ycr/k68KDAopyaSw 6TJSvvTR5z5iBD7d/62kEUV2Dcdu92u+exLOiMfaSG/fxUagxDzYkU/cyvaopLH9NePFC6 Q8RJLfVxu0is69+DXZkRUgiM/x8L36TrZfJ37b67h7A5pUPw0U1xPK/FBeHdPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731607182; 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=5n2rniXikmSS9U5clz7qcCle7TAyo8KN/GOGH/uU+Mk=; b=e0t6CCOlTMqfbol7gIw5fdUvTyMUUozNB0PukXz8TTKUHTs1qbUDg1nUnpjWNYb4XIT0r7 BAzURXLhLJYiiGlummQ2tDyALWVar3xgE8BXhqIhxxZwBCF1mQyAgVmHgMmtDLBtXueaa1 cZrOr6fbwXiHI2qMmnlPR5pPoo9rgvH8BMhqN0tOnhIdprTofzvo3slGQ4FeshAdn2L9W6 OuQRSU2yMW4w1t4vEeMeUH0cIzUiY8ZloQESOMHZgXTHWT2aLuJT6gZvMHg+/o+/PBVfpI vQjW2vT4F6uI8amB3dn3DzkGORb2o8cJqBJUhNIjkvcb8YqEGwZyvQ+rw3gCfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731607182; a=rsa-sha256; cv=none; b=imJo7IPIMnK2/q8xdfKIdrCIT7rSEk7kUNrxTK1sRp8UH73Nx4VPOMnKj22EHobPU4Mza4 1JQOPKPkpDQ4wgJyJW4blSm3+8N9ujw2FzMt7voDn+Km1crwSC53Pj7KF3ZMxzgIjvgpjL +NLMs6VF/i8W8WiKSPwH4I9pbhE0rlS44//84DLZhFbQqn0TfCFMEGUzsIHFI99wjd9ljF GybcmqBpU5O8JDu7r5kmsb3DbZK1DkJuQBHg4/DCT5SmzHMbr/B7pWFwxtrGWdcPgrhpUs P2v7oMMfV9dT22DXX898iLoQOeKuIa6p4C50UPAlieTNxVcjQ8OWZ3mZHx4JaA== 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 4Xq7G63XLczpZ2; Thu, 14 Nov 2024 17:59:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AEHxgD7041133; Thu, 14 Nov 2024 17:59:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AEHxgDq041130; Thu, 14 Nov 2024 17:59:42 GMT (envelope-from git) Date: Thu, 14 Nov 2024 17:59:42 GMT Message-Id: <202411141759.4AEHxgDq041130@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: 8f5a2e216f4c - main - tcp: fix cwnd recalculation during limited transmit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 commit 8f5a2e216f4cb955150c8f88ab21eaecc5adc8b9 Author: Richard Scheffenegger AuthorDate: 2024-11-14 08:19:34 +0000 Commit: Richard Scheffenegger CommitDate: 2024-11-14 08:19:49 +0000 tcp: fix cwnd recalculation during limited transmit Properly calculate the expected flight size (cwnd) during limited transmit. Exclude the SACK scoreboard from consideration when still in limited transmit. PR: 282605 Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D47541 --- sys/netinet/tcp_input.c | 2 +- sys/netinet/tcp_output.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 3dfdb13994a5..7ef480d949e4 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2813,7 +2813,7 @@ enter_recovery: tcp_sack_adjust(tp); tp->snd_cwnd += (tp->t_dupacks - tp->snd_limited) * - maxseg; + maxseg - tcp_sack_adjust(tp); /* * Only call tcp_output when there * is new data available to be sent diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 38ce2e3f3145..854cce2a0cc1 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -292,7 +292,8 @@ again: len = 0; p = NULL; if ((tp->t_flags & TF_SACK_PERMIT) && - (IN_FASTRECOVERY(tp->t_flags) || SEQ_LT(tp->snd_nxt, tp->snd_max)) && + (IN_FASTRECOVERY(tp->t_flags) || + (SEQ_LT(tp->snd_nxt, tp->snd_max) && (tp->t_dupacks >= tcprexmtthresh))) && (p = tcp_sack_output(tp, &sack_bytes_rxmt))) { int32_t cwin;