From nobody Wed Dec 04 20:25:00 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 4Y3TXY0X8bz5g8Vs; Wed, 04 Dec 2024 20:25:01 +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 4Y3TXX5z7mz4DnZ; Wed, 4 Dec 2024 20:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733343900; 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=gjrKD/gu7xKO8w0nE9C6YQb9G8sRE160iP4B3e2NjIU=; b=Yjg3ZUV/J+9MYCMljvDo6CLweSgrVzg0V1HV1jjGAkMh1oHttKTiOMSTFwdcKVvmW2gQqT R1LUDxmvVobyFpm3SWHqL+YDvH2ClFnLaZA4hrn06GPrgFIR7HLzV2GOd8oMXJ/0UIn8iF 7VUX4kHHadMa6QTt1F1SRhdzdWQ/143/vLuRz7lnciKxJuht6R2xju1Yq8ouS9KXfQ7rCI IQnrDjwdKitg8f3Uw/Men+SMbnzcD7ssplxSM1tM0Mpyf/TzpzI8CZwWOO+itZMcomctfe VOfT4LABT6Orcp/CmgY31agT3W7ldpnwJn3QMzXz4c4azv/Vi7avIoUjsu15Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733343900; 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=gjrKD/gu7xKO8w0nE9C6YQb9G8sRE160iP4B3e2NjIU=; b=cr/ij2u+BwsTu24gkj/5mAkSFqxUtuvPKd2woGV9HeVlPUZq2qecJi27Gz8Sbkc93gPWVU 5PoOKIRIIgSMaRuJU7AC6t0UQaFf9aQnCdiZh+5Z9aLsCVqezHD1UTnV/wy2Vs+RBqeWJD 4TlfPuGBP1j83oyhIlu9xTXDcsxIhfS4d0J5S+4/CXRDIDiSPRVgYdQ6TV+m3/t+0qwNv5 Y17eoa2KQwVG2VvBtDm4lXJ9gnzrRskhYNYqk7hnb/e/x0AGDtxhidr8Zi5u8fqbKvYUKR mtO6vcLMCpbP/eHCphuQYFIaMD3lWsgxR5k7Z/lwLVWaq5oPfaz5t8e04QiHpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733343900; a=rsa-sha256; cv=none; b=EKum6oKEdcBrJLBngXVe/ebSkPZygzrlY7Qd2RYTefAQBwvWsHAN0a14scD4BWWqCc3ned L21hMWRYT5C/pBnsnGEyI9wlRtveSx5QpvvHgKHmJpHmMugzWIsW/FMsMzL8McyGaAKW5O 23oGZZfzfCNSjfXBMxg/06JdSG1YiIucfal20kSuPGYXbrtbQyJD64oVilpfuNb183vCBH jiVkqddx9ES5+z7/OKV+6JNplRPoONzk/ZsD99h5ZDm7TrBJ8akkJei1N+hBWYuoql5r7h CzQuvGYCUmRiFXNJNkOwJ8VWQ4oV/EaW8zofcBvNYYK4YyKJSgPS90LOWDZfvg== 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 4Y3TXX5P9TzMqC; Wed, 4 Dec 2024 20:25:00 +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 4B4KP0UR083592; Wed, 4 Dec 2024 20:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B4KP0OB083589; Wed, 4 Dec 2024 20:25:00 GMT (envelope-from git) Date: Wed, 4 Dec 2024 20:25:00 GMT Message-Id: <202412042025.4B4KP0OB083589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5cb73dbe4820 - main - tcp_hpts: use booleans for tcp_hptsi() local variables 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5cb73dbe48204210d4e2c08a1e15641678612c8a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5cb73dbe48204210d4e2c08a1e15641678612c8a commit 5cb73dbe48204210d4e2c08a1e15641678612c8a Author: Gleb Smirnoff AuthorDate: 2024-12-04 20:15:46 +0000 Commit: Gleb Smirnoff CommitDate: 2024-12-04 20:15:46 +0000 tcp_hpts: use booleans for tcp_hptsi() local variables No functional change. --- sys/netinet/tcp_hpts.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 7d897d30392c..d5dea1c98a94 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1086,7 +1086,10 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, bool from_callout) int32_t wrap_loop_cnt = 0; int32_t slot_pos_of_endpoint = 0; int32_t orig_exit_slot; - int8_t completed_measure = 0, seen_endpoint = 0; + bool completed_measure, seen_endpoint; + + completed_measure = false; + seen_endpoint = false; HPTS_MTX_ASSERT(hpts); NET_EPOCH_ASSERT(); @@ -1251,11 +1254,11 @@ again: } /* For debugging */ - if (seen_endpoint == 0) { - seen_endpoint = 1; + if (!seen_endpoint) { + seen_endpoint = true; orig_exit_slot = slot_pos_of_endpoint = runningslot; - } else if (completed_measure == 0) { + } else if (!completed_measure) { /* Record the new position */ orig_exit_slot = runningslot; } @@ -1398,7 +1401,7 @@ again: * is where we calculated the end of our cycle to * be when we first entered. */ - completed_measure = 1; + completed_measure = true; } HPTS_LOCK(hpts); hpts->p_runningslot++; @@ -1436,7 +1439,7 @@ no_one: } hpts->p_curtick = tcp_gethptstick(&tv); hpts->p_cur_slot = tick_to_wheel(hpts->p_curtick); - if (seen_endpoint == 0) { + if (!seen_endpoint) { /* We saw no endpoint but we may be looping */ orig_exit_slot = hpts->p_cur_slot; }