From nobody Mon Nov 27 19:39:26 2023 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 4SfGB63c85z52CJ8; Mon, 27 Nov 2023 19:39:26 +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 4SfGB638NRz3TrG; Mon, 27 Nov 2023 19:39:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701113966; 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=j1eVdOG0dtaa4y8OWfCyJWNjedxYslNDouKwC+OQJTI=; b=LKqT0a5cSeDO3PXLOEbxna86qOZXyNUWuVRAoBo3iGdQK0BMxvcvgArOMl55t+xiPDUxeC l2ssSCgIzvtouAdqtD/t24kDAwct7UFdIQwa6VywvNYsGDRsC2W2BgMdK77o37/UevKqmW imCZXaiRQObDO/5n5u1SDriSaX9SItOe/OW5d0chs7LrOFCLhDXIHWyRvsRUsBPGjpoML+ bNK4aVTl7uYGrlihMbME8jG8lOORDOi/BxInJm+I5VIauZAkKZuCrfoE1m3US2Dv/OsYas nj7HMThE3SW5k0yxytXiCV8+ObvHCedQLUyP1zirUjO3G3h6BHceVIgwVpMllQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701113966; 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=j1eVdOG0dtaa4y8OWfCyJWNjedxYslNDouKwC+OQJTI=; b=mW7DHuP/sz5YYOHN5uxnfgPSu1YAENwhMLJgZd0dJnPVHuR1OZnp8TkLuCZUNrU0khWLX3 N8Veorhwd6dqPYSKCBvpOe4hEk9K6wVrij6baTxfc6qRX0nDjdFfcPFah+RFnt7LjPmQSC MD4azqViwXNvrR7pmxTsOOWXhNLGvqMaGgiYuGj16VFpM6p72q+/3YtndCoaIKCHXHeN3b AWRUo2zjG/3WcHHWDqTLqys6a0ysf50hwXqOYRdRM0OlEzKijqyLTwRHDEkahiWNM/eqi6 bPUKhUNCafw1Asp08xj23/gMkWKKFOj6TFJUpUTA4qT7ZxeaPb5uQuaUKnc+ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701113966; a=rsa-sha256; cv=none; b=gzD5lwDlfwuwSX/odwC+9UDVpCbeBng7eNPraLeDjVeAIErMLGad4wpPGyLb4SOqPXh3Nn McfJ0EeFH8MSZLUouHWBTN9vF1OmcS553k3fnfGovLVvTOU58u4rNRUnTRXWmrZ+H+tpQq spYbN+M3xNqwP+UIl67431f46nUmkLBsCzDB914fP+SSJV1Cbo6Tpok99U7jTOlbPxzC7J nrJBzSHbGqvk/78A27Vhew+W0/bGYHV6P7ySFiL7g/jPzlEnXc7sB+mpWbero/3aDGaXDU Bl3aZt4JuS6Os45zIvoq6QVai61htGkH78rEVEgerFW6j7vlPnqIS3h/3pqIHw== 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 4SfGB62F25zrjR; Mon, 27 Nov 2023 19:39:26 +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 3ARJdQEn020169; Mon, 27 Nov 2023 19:39:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARJdQJK020166; Mon, 27 Nov 2023 19:39:26 GMT (envelope-from git) Date: Mon, 27 Nov 2023 19:39:26 GMT Message-Id: <202311271939.3ARJdQJK020166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 6a79e48076bc - main - Fix two latent bugs in hpts. One where a static is put on a local variable, the other an initialization bug where we should be setting tv.tv_sec to 0. 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a79e48076bcce3e902323e62689eacb98faa180 Auto-Submitted: auto-generated The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=6a79e48076bcce3e902323e62689eacb98faa180 commit 6a79e48076bcce3e902323e62689eacb98faa180 Author: Randall Stewart AuthorDate: 2023-11-27 19:38:06 +0000 Commit: Randall Stewart CommitDate: 2023-11-27 19:38:06 +0000 Fix two latent bugs in hpts. One where a static is put on a local variable, the other an initialization bug where we should be setting tv.tv_sec to 0. PR: 275482 --- sys/netinet/tcp_hpts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 92b2f69c9e58..d673ccbe4a73 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1519,6 +1519,7 @@ __tcp_run_hpts(struct tcp_hpts_entry *hpts) hpts->p_mysleep.tv_usec = dynamic_min_sleep; /* Reschedule with new to value */ tcp_hpts_set_max_sleep(hpts, 0); + tv.tv_sec = 0; tv.tv_usec = hpts->p_hpts_sleep_time * HPTS_TICKS_PER_SLOT; /* Validate its in the right ranges */ if (tv.tv_usec < hpts->p_mysleep.tv_usec) { @@ -1600,7 +1601,7 @@ tcp_choose_hpts_to_run(void) void tcp_run_hpts(void) { - static struct tcp_hpts_entry *hpts; + struct tcp_hpts_entry *hpts; struct epoch_tracker et; NET_EPOCH_ENTER(et);