From nobody Tue Nov 18 15:19:20 2025 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 4d9pDn0nBRz6HJCQ for ; Tue, 18 Nov 2025 15:19:21 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d9pDm71g5z47gP for ; Tue, 18 Nov 2025 15:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763479161; 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=ah2RJTtM/+aNPw8GPk1wmaSkfYZiDM2dpuDxw/dH13Q=; b=obqw+tlANO9j4E9PD7Ofufw4m80mKVyFe8woj+lZufBZtbiQvO0mEX6gdT37TR2MGPag3p S2YcKhIWYTFohfBcblHUtHvYW/3BVy8U5jZKIXhN/bZesDupK4I9fb+ueMID1+icW/jYIE rSGM6NyOZWwZSpO1nYckKUFIn0/EacxU6DaISI4p4cyV04yUMLPjZs8krvK2lI+Pxk+4XX ounQJrftliRFp5sJRKJ4q+3GOOp8FV2gzatJCGsEK5F1WhbT5ortyohEN56iDexnzdpxgq gBy1MyYfCDnYuB/6XQzIp+9EbDdyEtJf+9pVN5vQ3eCb/wrRxlfQcBlr+ASUBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763479161; 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=ah2RJTtM/+aNPw8GPk1wmaSkfYZiDM2dpuDxw/dH13Q=; b=mV/+rkIasYw0sAMm0gsKcNgBIgJ3QmnAq5sxsgmcbUg3WvnQnie19YHnJmWHj/0S63EZ0o ltmOASNmnqAF9nhx7dLS+vx6vCqoWIwK6E7+/XcQ7aJmQu2RffAabbLU56xnk074Pr/XZu duvBFc7+wxtRdC0O6Pbkegz7ZunCMHeBXB35ZQVQjISYzhVZHCfdfdPyOLJGkhS+7ZKBSz 7JcJMwgoP/rtKxCQdw6R47qE8L3YHOBj3XNrsi77K4wOCJAd5hxk39+pZwRGd5067yBt2m jpB1UZO5oBbL2nIaVIQ9hjMMf8mA6VgF30DldsrNOt5iv2KqDkNndOyL/cvbVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763479161; a=rsa-sha256; cv=none; b=cEQIvHqKyqpmGFXAftAVCdX2PLMIWGXREne2oHCEAH25epvdk5+m87gtOzJn4Z1pEsXMAt p4LRSzNZX9E3qqmBkDN5LRFNAh8xqtujJJZqC9fqneYOdThxwPyxwmgtXcLCnTat1SqEfQ Tas2lKpymEKLikFW1gYj4UFZ12CXEeYK0a5657PEqJ/2G/iQiq0YDnM2diTCWz3XoGqFfF mvcuViSJKtYwitOvUt6NLuRAaP9BTRrb/UfXdGBXQXWLd9ZJRFlV4CqT6UcfIelUj+53Ir tFa8rTKXQZ/26UBk5qBLqH/bZjX0F52ro5M8o0HItPOjurik3c+thVxzuDDoiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4d9pDm5zr6z10Tk for ; Tue, 18 Nov 2025 15:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39deb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 18 Nov 2025 15:19:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 8f2f66b323ac - main - TCP Pacing system (HPTS) is missing an API 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f2f66b323ac3ea29ebedf12cad06fbbb76edd3c Auto-Submitted: auto-generated Date: Tue, 18 Nov 2025 15:19:20 +0000 Message-Id: <691c8e78.39deb.528019ea@gitrepo.freebsd.org> The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=8f2f66b323ac3ea29ebedf12cad06fbbb76edd3c commit 8f2f66b323ac3ea29ebedf12cad06fbbb76edd3c Author: Randall Stewart AuthorDate: 2025-11-18 15:18:25 +0000 Commit: Randall Stewart CommitDate: 2025-11-18 15:18:25 +0000 TCP Pacing system (HPTS) is missing an API Recent changes to HPTS have broken an API that was somehow removed (used by user space programs for time calculations). This commit will add back the inline function that was removed. Differential Revision: --- sys/netinet/tcp_hpts.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 6b05f9701ac2..13527f7f9a4a 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -32,6 +32,10 @@ #define HPTS_MSEC_IN_SEC 1000 #define HPTS_USEC_IN_MSEC 1000 +/* + * The following functions should also be available + * to userspace as well. + */ static inline uint32_t tcp_tv_to_usec(const struct timeval *sv) { @@ -50,6 +54,13 @@ tcp_tv_to_lusec(const struct timeval *sv) return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); } +static inline uint64_t +tcp_tv_to_lusectick(const struct timeval *sv) +{ + return ((uint64_t)((sv->tv_sec * HPTS_USEC_IN_SEC) + sv->tv_usec)); +} + + struct hpts_diag { uint32_t p_hpts_active; /* bbr->flex7 x */ uint32_t p_nxt_slot; /* bbr->flex1 x */