From nobody Fri Apr 05 15:50:45 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 4VB2yF73FHz5Ghmw; Fri, 5 Apr 2024 15:50:45 +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 4VB2yF3Krjz4R7x; Fri, 5 Apr 2024 15:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712332245; 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=1uEq9r0AgPuUp8qeRu2iMSRwlzf0rQSz2+VLye/63ew=; b=qU/B2z0T2KH8IX9Zpqq8DhHw3NRrUg+xnz27RgslOv2rmF0vmdTIyiCBJTyx0b4+nsCvNF fRau4IIQzYx+BBHJSHBxmS0EOBzoUqJoeUq/t30mRsEjJjSQptDw0hXR8M5v/hFDGgd28T 0KDu8d4d58EEPRk8p0+9WuLanlZ26kZh1p0zgP5z5kRlbU6u384iNZeucReTPR81XORyoc KD+mywc6L57i7sDvtzDw7Xes7Vr0JteY9W4N4u1J86u+z5e5Ffk3HVP19pdGIg+8oQte5W ZCgBKmWAT9e8ELSxX5/+QBW+K9OMtmuxRqNujqXUE+hweS21AMrM6p5EgQntNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712332245; a=rsa-sha256; cv=none; b=WCRJ0iDcpFEdjm1K+Sny700EmK+GLyuAHCc3x6YIxcx/LjvX7UoHqofLQo8ezFTzvfnVFc /RBsY87rhnBpMA91/QCTmHgUTidYvufGv4P+nX3GwJrKEWfFkiZ861I/S5ESM7WlFDgZpZ xvcqneRR5lJIZnV0BEV9HmScenjHsDm7hqemNc8JSxPVWUzHVNPD6IFG7W1H2fL3K4431w aZFO3EqWYayBdrBkGsvu/YqUvAqnRAzEzNdxQX9KhCvTcsSbRvkuyaf1XQO5lzQnbVooU5 E7yMN1icIuV7Tng8mNTGNohzXW9zwK4nLbO46KaKmX7nUXmqXw/8RVN7XlAcOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712332245; 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=1uEq9r0AgPuUp8qeRu2iMSRwlzf0rQSz2+VLye/63ew=; b=PpgJuH+oRYHuMBc6WNIJlBQjHe8DRurkacIJYvL1UGBWYF1dMaSUNWra8gzeI7Gs07qt2i pJYPXRWXxqgCnpIp0UsSaNb5kqKHI8dCf8C6GVGDUIi7o+YAiyFJuiKbRf21N7wPxI1pAw qGmEq38dgm4yY7iGU2IV4RIzboPlUfcmUqajU54B2VucAT25qYKMd8NOPXaY/7wS9RnoWE YjKHGhoe779R/mnlGTZzYIK/y3sp5HGGhYXt2Usy0lYhOT2l4ffgUGODt9UGYjUnacibJn IfArkctlcuSWM0xe0VpJHmTV7WT6ZROaV+3csI9z4EYJMMH/SfVYibzE3a2/2Q== 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 4VB2yF2y9zz15q5; Fri, 5 Apr 2024 15:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 435Fojph038483; Fri, 5 Apr 2024 15:50:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 435FojYl038480; Fri, 5 Apr 2024 15:50:45 GMT (envelope-from git) Date: Fri, 5 Apr 2024 15:50:45 GMT Message-Id: <202404051550.435FojYl038480@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: 7df0ef5f48e1 - main - tcp rack: fix sending 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 7df0ef5f48e1c67b3f1df7c7964bfa59bc56f4e4 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7df0ef5f48e1c67b3f1df7c7964bfa59bc56f4e4 commit 7df0ef5f48e1c67b3f1df7c7964bfa59bc56f4e4 Author: Michael Tuexen AuthorDate: 2024-04-05 15:47:03 +0000 Commit: Michael Tuexen CommitDate: 2024-04-05 15:47:03 +0000 tcp rack: fix sending In rack_output(), idle is used as a boolean variable. So don't use it as an int and don't clear it afterwards. This avoids setting idle to false, when it is not intended. Reported by: olivier Reviewed by: rrs, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44610 --- sys/netinet/tcp_stacks/rack.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index f89fd46f2a85..ea52eb0a92cd 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -21283,7 +21283,8 @@ rack_output(struct tcpcb *tp) unsigned ipsec_optlen = 0; #endif - int32_t idle, sendalot, tot_idle; + int32_t idle, sendalot; + uint32_t tot_idle; int32_t sub_from_prr = 0; volatile int32_t sack_rxmit; struct rack_sendmap *rsm = NULL; @@ -21525,8 +21526,8 @@ rack_output(struct tcpcb *tp) if ((tp->snd_una == tp->snd_max) && rack->r_ctl.rc_went_idle_time && (cts > rack->r_ctl.rc_went_idle_time)) { - tot_idle = idle = (cts - rack->r_ctl.rc_went_idle_time); - if (idle > (uint64_t)rack_min_probertt_hold) { + tot_idle = (cts - rack->r_ctl.rc_went_idle_time); + if (tot_idle > rack_min_probertt_hold) { /* Count as a probe rtt */ if (rack->in_probe_rtt == 0) { rack->r_ctl.rc_lower_rtt_us_cts = cts; @@ -21537,7 +21538,6 @@ rack_output(struct tcpcb *tp) rack_exit_probertt(rack, cts); } } - idle = 0; } if(rack->policer_detect_on) { /*