From nobody Wed Feb 5 17:59:57 2025 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 4Yp7L53B8Dz5n6q0; Wed, 05 Feb 2025 17:59:57 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yp7L52LHRz3Kyh; Wed, 05 Feb 2025 17:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738778397; 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=RJ4+w+kzwE4iEjCpOGm5Tj0KK1ZDZhr/94wVEDmrq4I=; b=plEhdlfZ8vuzy0UxI7pyfxRiXPiUTGkvNgLwMMkZrQkb7U+EISmv+S7FkDnYRZTF0dsjkT eE329sEC3bYnXTrMnIPmODYsYZZmTndrluoqQHoUZOXmDBL9RiDa/dBbdmsMDY1QwstDMv oRyKFEo+T2JUjZCPWasPmwfKF68oIxsVygW9Afmd+ASWmXg3CuPxjf9RzNQD+RrdJS82Yz NbqDp9o2NjHDBZmzCL8WX7umXafDXAezOWKFBPKZpgthKZ2WSjCKAzabWGHyvPJ0Oj0mQT WT+plOQxkfiCe4bGaafcLksv2ry9vgYRwQJEP4BBq4TzD2wgSjSt1LAxodPIlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738778397; 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=RJ4+w+kzwE4iEjCpOGm5Tj0KK1ZDZhr/94wVEDmrq4I=; b=UYnheYbg9/ZA025NsA4Xi/rXj8TSej5auoTSp1U2DMtZQnYe8R7rENumRBWyix9oUDZXDG t61XQPYWz6RZExtQ0Vnt/gHg8tBOP45IuH1YKJ3eecm9uJKoB19+32CdUCdZd9sWQxgplQ STHdQK/BkK762wCM5mgSaj4gF2lIm/zyfWEuyE/pE+b9IjK2tLtzvml6m+MtnuGIVlZHIK Ta14nwtrG7LdkQJtTdxn8YQVFpNVsxNZUw6EvVdlbNlbxravyTTOc2tqfCI7Yo7Hhw0eDz 824VnOC7vAs85rdPgDLU5j/DyLXR95SUV9lqd9kiaUsLEJhd/KNy+novX1BjbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738778397; a=rsa-sha256; cv=none; b=TbeidUNYgug7QwlUYNqT9wEn2oLPCyqI31G6IPJQqPtNm9FC05kw1LfiEnq7ZR7f9MW6f+ 2wcWZ9sSfo4a+XZ9sgqdRR4+1zFl2nrBorIaN1Uwg0gbPtqaC6vjD/hALoy/b6gJDl4heA 97NK7mWpQFeWmAbT3A1h5N6ZNvr702FLTRrG6x9mOjaI8eJc58fBZP/+awtt/WLWg6j4FM CnaS24FPJt9DkQZJeG5ZT/WCsNBRl0ucqAXD1cxQjsGCrSP3rQAFFYBfgvulRxt0IrJ5/8 UzYj5/fv8B4mtFauSAR1ppbb2K8zF7Jl5BNv3q5kbq1Iu9yf5cea4ges8tKCSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4Yp7L51hlnz12rM; Wed, 05 Feb 2025 17:59:57 +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 515HxvBc062541; Wed, 5 Feb 2025 17:59:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 515HxvH6062538; Wed, 5 Feb 2025 17:59:57 GMT (envelope-from git) Date: Wed, 5 Feb 2025 17:59:57 GMT Message-Id: <202502051759.515HxvH6062538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: f9e4eb3e8efc - stable/14 - tcp: fix the initial CWND when a SYN retransmission happened 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9e4eb3e8efc5a3c7b3c07ba7c894365570c46b9 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f9e4eb3e8efc5a3c7b3c07ba7c894365570c46b9 commit f9e4eb3e8efc5a3c7b3c07ba7c894365570c46b9 Author: Michael Tuexen AuthorDate: 2024-11-05 08:52:42 +0000 Commit: Michael Tuexen CommitDate: 2025-02-05 07:14:14 +0000 tcp: fix the initial CWND when a SYN retransmission happened According to RFC 3390 the CWND should be set to one MSS if the SYN or SYN-ACK has been retransmitted. This is handled in the code by setting CWND to 1 and cc_conn_init() translates this to MSS. Unfortunately, cc_cong_signal() was overwriting the special value of 1 in case of a lost SYN, and therefore the initial CWND was not as it was supposed to be. Fix this by not overwriting the special value of 1. Reviewed by: cc, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D47439 (cherry picked from commit 625835c8b5e897e54a1a023788a3a9c3b16631c9) --- sys/netinet/tcp_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index ad407d5c111a..65a9fbc84ff7 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -800,7 +800,9 @@ tcp_timer_rexmt(struct tcpcb *tp) */ tp->t_rtttime = 0; - cc_cong_signal(tp, NULL, CC_RTO); + /* Do not overwrite the snd_cwnd on SYN retransmissions. */ + if (tp->t_state != TCPS_SYN_SENT) + cc_cong_signal(tp, NULL, CC_RTO); NET_EPOCH_ENTER(et); rv = tcp_output_locked(tp); NET_EPOCH_EXIT(et);