From nobody Tue Nov 05 10:06:11 2024 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 4XjP9v53NNz5btRP; Tue, 05 Nov 2024 10:06:11 +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 4XjP9v4XWfz4hW0; Tue, 5 Nov 2024 10:06:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730801171; 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=UmunW0u6JTtDDZOw9s1n8ICjuXhF5KupuSvD4OKqU9c=; b=Orqv2URx7YD2h/eUQcQUQJ9JRV9WvxH/DwuO4DBbCBD6dT1VpOI/tV3rGpjs28QOn0Ofa7 Zbjuq5WJeVnNjTyNrijhDjlrmrPdBvQxruve41cmV94/LtxQIzkUOVBa+xpSmreSxyCj7H bfNxZ7mHxwC3D9WYt7FGtnA6QlriRYyH/CW3wDeaHUZ23rEc3r1zc2cF+htB6xG/1QI1EK 9Loo/2DsOXuOfbmn9VpUJtptwk0QRbzncXjXuyK80NQXqTqVEWzyQ04FkqnK0MvZ4CH8mI uSY0+KWXDac+KKTyBWafLRTp2+TMBY/HyiZoWjwWgjlGnYDyzrx1fMbHQs2paA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730801171; 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=UmunW0u6JTtDDZOw9s1n8ICjuXhF5KupuSvD4OKqU9c=; b=PGlGasLtJJCPd79i3M5qdGX8qM5t2K0k7puZVqROMTxQD5VZyWc3CQARIXRXhtqTT85DZ3 Nh+0oO/OcO13z6YM9Cr0Egt57iTF8VqeOfSdrcDV2rDll38mq27ROFx84JYGbLh5vwJPCu 0Z+j+qFSODEytkNvoqCD29ZeVYwKRMXqy2JwnvNebZf7UAu6kiZ9t+MwxNAGctXJ3WxCEZ 3P7UCXJm5Pq0r0GyTDEi9fobRBhAP6i61qihXby9mBq/7FJ+p39711NENW2EOopC4EyyvU t+EQMl7iMtzxcMOi4DSTGtHeGEGUcxljQ+HHWsBRJpuX6HanDmrl3zI+Mz9Bag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730801171; a=rsa-sha256; cv=none; b=kNfCz+iRnXPzwOpFJioqIll6leqphN67KmUK1QO0i/3HwEzHVgM4bb8zTN7cItoV7nvyGV sL5YXOJ5aXe+55Il6coUDUx3/wxGGFZsvFdSHZLR8YFoE1DBhy2dGosMoNaPXA7GuCh94X W2/bdQ6SiBnP/JvqC0/CMf/2Q762cRqwvTElL+6NSdEq3dxmhXcYcwimgEzfvGYdr0Tt8O LaNHAZsyO0bYbSET3P3UEh/9iZkTT2K3SRMLDMaPR1esjXLsLb5/WGSAmfBs0XLKDFrWVU Nir0vyBoZNB82ruC8cogLBdEVwUKzzJ0IxaVr4vwPiT4nBy6N7zpT6kftrfW8w== 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 4XjP9v41KKz1CCt; Tue, 5 Nov 2024 10:06:11 +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 4A5A6Bj4099166; Tue, 5 Nov 2024 10:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A5A6Bta099163; Tue, 5 Nov 2024 10:06:11 GMT (envelope-from git) Date: Tue, 5 Nov 2024 10:06:11 GMT Message-Id: <202411051006.4A5A6Bta099163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 625835c8b5e8 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 625835c8b5e897e54a1a023788a3a9c3b16631c9 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=625835c8b5e897e54a1a023788a3a9c3b16631c9 commit 625835c8b5e897e54a1a023788a3a9c3b16631c9 Author: Michael Tuexen AuthorDate: 2024-11-05 08:52:42 +0000 Commit: Michael Tuexen CommitDate: 2024-11-05 08:52:42 +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 MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D47439 --- 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 c5c65dda5b1a..4d8dafaec31d 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -810,7 +810,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);