From nobody Mon Nov 18 00:00:28 2024 X-Original-To: dev-commits-src-branches@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 4Xs7710jzBz5dZm6; Mon, 18 Nov 2024 00:00:29 +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 4Xs7706Tgcz4NcL; Mon, 18 Nov 2024 00:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731888028; 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=q6f1LOuuS095LeoUTUFKrUEvkYfj2hieeS0rD/frGoQ=; b=Kc5j/KvDIUHYwD70F6CDRuYD4Ut1Se1rIF0pWkvfhrfyJuxNkyrJvn891L9J++jFj0SdtU 4Klvr3vzFjas+WKkRAS0DAgljX3PFVOq6MuLLcZA8J12P/m4DzXb2sC9m5ZqLYIZGMmTch sFycaBxai8sCuqsV0grGva8hNQSjLNKXL5rsSJUg/A/oFYacu2NB8FZpVZMaKXfMvE/Zsi Oazuvgryzn6iYIWlL858iHGaZDgZW4UPO5zFx9u0vs/j0n3CxMQVQluTkmn1y/w0RWQhDB DFz1SQgmv1xiQYZnEQ6Z+b/QH71j2M9scIerpni1+N/noWrJEYByr4FDv90OGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731888028; 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=q6f1LOuuS095LeoUTUFKrUEvkYfj2hieeS0rD/frGoQ=; b=PBR7KaV9wRogYywymAdEV20nteIocxsT+7Ca9MWvzqJjk4cPgEgq5TmXmkOnN5NuV5aCiU PLKUKK7te329ygIutiRfElPntFBIurElacIVn6aheME/hFJbcEaPBRWPOtfoG3lKVdqRPY XgANsb9C39Ri2FVd1nIL+IV5oa2LHmtGlRbecACebr5/62gjLECjfBgHGodO3m/I5l755Z 7f+vKpkAavwv0EoXUVx8QjPsHitcSH4yg4qyHYkJLeJc5rH1OzziRCxeG2OWjFPvpFoN6/ 7jUUmXQzsXc4eaeQPBbWqZahSZ2BetoOR2angIuIjQNWnqxYtHYgDldlySVerg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731888028; a=rsa-sha256; cv=none; b=SUsivAhZH0VjwwYmjtOxD/W4axGPLukyfPr7pdPybt1qpKSYBABaJAUZpukSEieM5hkxg4 P8SXsSQGZnLARY2/ZEVH700AqyIbVWDdO1kCA3SntseIE6IVrvxczeqP/OTL0YjgSLGBbu ObIBxsENLcXmQaCbuz5SHXyuqrycMuOjxydqSwTFU/he94R38gHF+q88eBN8ussUjDfrEm 71hVVHT2+y3aD8eybiQhcojJH4YL0ohFx8Gb2CMT98hrY145QG9SBiMNpmEzjQmHkE9/yh 9vbv22GdIyRcZ+DpWxCdgU9MEBoPZ61tVtnoKBEgMtXYiZNg1DxvW9WXgra5rg== 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 4Xs77064vDz1CqJ; Mon, 18 Nov 2024 00:00:28 +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 4AI00Sdo040310; Mon, 18 Nov 2024 00:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AI00Sdu040307; Mon, 18 Nov 2024 00:00:28 GMT (envelope-from git) Date: Mon, 18 Nov 2024 00:00:28 GMT Message-Id: <202411180000.4AI00Sdu040307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 3b8bce6a6be3 - stable/14 - ena.4: optimize apropos and hardware List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 commit 3b8bce6a6be3f562db8b291f90ed8cf5f27afb16 Author: Alexander Ziaee AuthorDate: 2024-11-14 05:45:23 +0000 Commit: Colin Percival CommitDate: 2024-11-17 23:59:54 +0000 ena.4: optimize apropos and hardware Remove "FreeBSD kernel driver for" and "family", and add "AWS EC2" and "driver" to the document description for better search discoveribility and consistency with other driver manuals. Rewrite the introductory sentance to the HARDWARE section with driver name for inclusion in hardware release notes. MFC after: 3 days Reviewed by: osamaabb Sponsored by: Google Sponsored by: Amazon (cherry picked from commit 13e82893d8588d09e6d721b38ba5d775b9b96a0e) --- share/man/man4/ena.4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man4/ena.4 b/share/man/man4/ena.4 index a3cb9ef5b37a..cb5b9367da43 100644 --- a/share/man/man4/ena.4 +++ b/share/man/man4/ena.4 @@ -27,12 +27,12 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 4, 2021 +.Dd November 14, 2024 .Dt ENA 4 .Os .Sh NAME .Nm ena -.Nd "FreeBSD kernel driver for Elastic Network Adapter (ENA) family" +.Nd AWS EC2 Elastic Network Adapter (ENA) driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in the @@ -93,7 +93,9 @@ framework is provided by the driver. Kernel must be built with the DEV_NETMAP option to be able to use this feature. .Sh HARDWARE -Supported PCI vendor ID/device IDs: +The +.Nm +driver supports the following PCI vendor ID/device IDs: .Pp .Bl -bullet -compact .It From nobody Mon Nov 18 19:21:13 2024 X-Original-To: dev-commits-src-branches@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 4XsctK3crwz5dSyH; Mon, 18 Nov 2024 19:21:13 +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 4XsctK2rL6z4G4S; Mon, 18 Nov 2024 19:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731957673; 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=kgQAI6MQDAUIRIburYRSJodsCEjVyuXzmEI3tI4G1Pk=; b=u1iGU9G6np7veMQuNmbhKmeBDS8fl8qyHBsVtU/Wvm07X+0QnvAxDWVc28bGJO6iZdlQ2T L/eice6ls1Wgj4G6eV0K0TLDqHqKaJpLj+FBXw2eokCpP/1zG5LHapUHSkLU6gJuWxcGSg sJBXgi1YvUGF4+JmochEBVzjdYn1Id3pZUNiSyrHEXMbBrTtcxjO9PTzLiABW8cwj2ufZH UtQ+AhnYW03ZMOgGIbbB73W9j3kEAFH+UCWPg5GvWKdRhbB1RIA6MeSVxG7V/5tyVAtH4H 7FLAWWaF322URtqzGRWBbgQ/reeL6xTzm8G3CCEpJRsgNVOmZx73UBnhUNGBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731957673; 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=kgQAI6MQDAUIRIburYRSJodsCEjVyuXzmEI3tI4G1Pk=; b=yXz6GCAT3AGzIZdt2Qkm7rjXYRwX3q87HQbdFlc32ox11cRnvShs3ZN+/kfTOIgG5S3u0c 7vpSJp7PUslhdnKcjtc7d/Fnql1aDpm3LEWPY+7s17pDTMlrPHKrp/tFtbbhnTQFH79Aq+ dMwod99AutAamBsmtVici0wwwyCQHLjDG/UPEAqcFxnbYkqIeWd++tfUND3pv2eD7OQwKk WtS17/dEv1i2v+KExU9YglzNrXeo+adcezy5itIBp7i+hlcM7xOqhwutbswdeyn0HVnlRT TjoFRQWjy8/u4SrjgwNEdZkFaKG4blkjZSGhbYo0C9lxX2ceJfgm98Jk5U1bow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731957673; a=rsa-sha256; cv=none; b=F44Z62A/ERKDMBkjHRuvGpL1RNZ0pPu8D2Oqc6QKRhUNe4s9eeOaXoYLVng8ygcjGriLQc 0R3ZYmpWmRvcbqaLT6qD1Znu4JJcL2S7C1mLOtFScXHD3T9t5Q753g6seyZN4q/IfjJNEB GzyteDjDVcHSIkVuKilB1+GSo+pTrH48+i0iqUq4o4TbPYU2ZVSPAz/HyGgzLa9K5a3B0/ xeBg+k4oWTGu4IRDpM6DSMeAQ5kN8RnjhILG/uPSwUVDnXvbAEGmSwm0rxIqOKlRj2cbF3 mwiMb0cCpEE3rBkJw0LHSFKtn5V/Bmq/iYLFgnWg+PK3VtatainnNLJJFRh4TA== 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 4XsctK2KdSzsPN; Mon, 18 Nov 2024 19:21:13 +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 4AIJLDJf099864; Mon, 18 Nov 2024 19:21:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AIJLDId099861; Mon, 18 Nov 2024 19:21:13 GMT (envelope-from git) Date: Mon, 18 Nov 2024 19:21:13 GMT Message-Id: <202411181921.4AIJLDId099861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8b0dcdec411d - releng/14.2 - 14.2: Switch from "quarterly" to "release" pkgs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 8b0dcdec411ddc93dab4392602825b51877f7f9c Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8b0dcdec411ddc93dab4392602825b51877f7f9c commit 8b0dcdec411ddc93dab4392602825b51877f7f9c Author: Colin Percival AuthorDate: 2024-11-18 19:20:41 +0000 Commit: Colin Percival CommitDate: 2024-11-18 19:20:41 +0000 14.2: Switch from "quarterly" to "release" pkgs Approved by: re (implicit) Sponsored by: Amazon --- release/pkg_repos/release-dvd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index 600c309d5979..5988200b26e3 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_2", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From nobody Tue Nov 19 00:26:46 2024 X-Original-To: dev-commits-src-branches@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 4Xslft4rQYz5dGb3; Tue, 19 Nov 2024 00:26:46 +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 4Xslft2JBQz4db9; Tue, 19 Nov 2024 00:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976006; 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=/iAZMolzmDXVW77aEsV4fdb1DTB4foFwzHMVJsPcrQE=; b=XCf0i2Aru4q0UuKXypJ02Y/GFRv/wVU3t0Ou0G8CqGvVePQHTVWPHlRvGVNJbMg+MUmg6p IjR4wgFD8PJqbrxvVgnHC7KDvVH3Cq6EIvxdAl3Dzk1by3vtQa+BoXBYUxQNlkiFzTgi4y bmqfI6jU6iRiU1eFFh7AmILgwvB1uMsGfE/usPwaTzUGPno7PkDrCfSimd8q7NGx62d0ec 6LwQu+r69EotWTlseCDZ1VqN8QhN1+0mIlN7rpK7R2b3Gshe6jt9ewNuWvp41gkSs8RVek MlVzP0CUihIaep/GPNqN2cTkthn+DLIaSvP5HVjET8HeJixoFaKpH1j5PWuBmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976006; 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=/iAZMolzmDXVW77aEsV4fdb1DTB4foFwzHMVJsPcrQE=; b=bgYWFdxF+GmmLYX9lgldwRsdqbdxQiD0jRwUVT425yDV5+HYnr8ITlAHbhsWgjpKfmrpuf lRq7pMGvIG6lDJNM09zrN+M03l2iTXEofYCX0TPXN8S/y/WUvGhW3XFocCYN88gH/YP0rX emvtHkBdChzt9LqcO/2lhOxmbxRjQLpRVXS2Royue13xiLkCoWINL2dzhqMcNMcY6tDD2Z EHOTHoIx6zyvWg9epc/z/lsTHd1VXPxB7ivEHNxyyvAvwZa8ALSnqL1kyvXhsCi//XSQXy 0jvbhdflPPL49k3VFpAKUr7Jm40oG082xjhr7roSZ6FSP8n3Tl14LfAfMjnJBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976006; a=rsa-sha256; cv=none; b=rRam0uypzs8hAp15473VVsNUhVpY+3LqwRLKQ37dyTqaAOsXvQu1MbDxZiO4LinG8kwlaa ekYjRNB0ZRax7m4nRS68/kmLXK+HHgmpA8+G7W+b8mMuvCs8rgFMY20zKZOaiKInFALKbW AXlQo4Zo5eJ9mxc7lNEjFqixNRSrzFePbAcU1cnEywLURNSmkxsKEgRVmiJgmeG8ROMRBr YRVYt9K7g0UY6b20VFQpK3rpg4exj0ZZRusdAjVImK5ZP+dD9SCZf17oq7rAyZGFyZLSyJ NfYV2imF9EIVafMlCFplB+4vIr+RZgsH2WT37HPV+NWU7RIj6Ec+F22VQsCbxQ== 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 4Xslft1vphz12Vb; Tue, 19 Nov 2024 00:26:46 +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 4AJ0QkTk063631; Tue, 19 Nov 2024 00:26:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QkpF063628; Tue, 19 Nov 2024 00:26:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:46 GMT Message-Id: <202411190026.4AJ0QkpF063628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d46948338cd2 - stable/14 - ipfilter: Avoid overrunning the message buffer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d46948338cd2565f4845ac53ddd810bf47068a2f Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d46948338cd2565f4845ac53ddd810bf47068a2f commit d46948338cd2565f4845ac53ddd810bf47068a2f Author: Cy Schubert AuthorDate: 2024-11-07 01:22:57 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Avoid overrunning the message buffer Avoid overrunning the message buffer when printing an ippool btree error. We do this in two ways. First we increase the message buffer from 80 to 255 bytes and secondly we replace strcat(3) with strlcat(3). (cherry picked from commit 42935716286e7887bfeb9dd8daea72d6a5d40908) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 5c9fd838bfa0..8d65f019da43 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -52,11 +52,11 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { - char msg[80]; + char msg[255]; snprintf(msg, sizeof(msg), "%s pool node(%s/", what, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4)); + strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:47 2024 X-Original-To: dev-commits-src-branches@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 4Xslfv5JWLz5dlJM; Tue, 19 Nov 2024 00:26:47 +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 4Xslfv3BQWz4dPP; Tue, 19 Nov 2024 00:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976007; 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=w93Tl6Fl7fiK2kxQxmGyPsIJMZqZcHCrTEFGwbjhUaQ=; b=wIkfpvZ/H8VR+NM47VWuMNtQDmPeadbSQHxqFC8RHjU5mKHRvElkCvnH69Lj/h6VlBi+uC KytXyLUxgU9r02SJ4mM08Ztnj7pUP6AE3bJaqkIrC/eX4AUHm3tTVwJBOXPpuPmrorJbtj ytwXg3dFCvHLBzQFFx2bYIIdhHaWM8kWoPi1mg+xXBrmektFpqOnpMzk73vU/c4nT91BQq WABV+VRcTa2hpM+ryYA2whqzaUCanEZW/tSopUWngUi7MbHOUTY8CkBcIYkJGhM6+hWIFD SKK5xokZstoq78vec6Q4+za9+CXOpxvruQFYZZXqSLH5m+2lkKmzK8+a7bUlMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976007; 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=w93Tl6Fl7fiK2kxQxmGyPsIJMZqZcHCrTEFGwbjhUaQ=; b=PyNOiWPWt4DDiOOAS8DB2JXYrWA3eJGzF3iTrkc/SVXR2eFW/0sY/gwoHtEgN/4Ts/Vg6R wCHQRtlB3DmeLNn9+oB7ppm2DgDvCYiBdiqG+GF/zXjeYT/p/a0KRHnyWa1EUWLLzP8y3P DjyTJ8gKmpv1ctr2pMrTEWG57yDW++m79itF+K6VVbcV+TQqpEzkMXwaUeoYwQ7U8Fwp3Q 6Ad1ZfTjVksDsSHDya4PXqslcyzqe9hz0nMAGTl3BkXNfe1wfjOyrV2AEeuExlk2dQWgVV SA+xIDT/at7asTB1hgca9Cp+mh/TGN6OdGVostinhOEEg/pfWdkz2+D8lWNgMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976007; a=rsa-sha256; cv=none; b=vSwZUzC2ZB5xm6DBBnbj95ep3WGQL6W+SUc+xxyL5U9RtZsOq4ifgpQ6/CyWiUDl+l08Vo qRV+RlgYdkzQsWl+qwkNT8rAEOQ2mcEwqQLsR1VSDjP9HhEmSG9oIRL+ISizFeuZ/pxtCQ c/oThUBd7xQev20KAhuw1PIRlXyfYFYgT0dRG9iiGxFNQr9mVXEkQu8/JbACufwd11fNyq 94RLMGltF1e4jcFA0Hpi4t6+DZRIBU4mDANvYqcvV+GAgbgUSnRXzyfGbXBXl0aVkghKyv ZGJAD5nyImXeZDRX4MoIgK22heQyqPXCxfHYXftMi8198VH2qTl0mo+ydfbXSg== 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 4Xslfv2nzfz12qQ; Tue, 19 Nov 2024 00:26:47 +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 4AJ0Ql2o063694; Tue, 19 Nov 2024 00:26:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Ql4C063691; Tue, 19 Nov 2024 00:26:47 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:47 GMT Message-Id: <202411190026.4AJ0Ql4C063691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c6385ba2c9ff - stable/14 - ipfilter: Print the pool name when adding a poolnode fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 commit c6385ba2c9ff20d6cdc4ff673ff993a1adbd49a2 Author: Cy Schubert AuthorDate: 2024-11-07 01:26:37 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Print the pool name when adding a poolnode fails Printing the pool node (IP address) only leads to speculation which pool the failed add occurred. This is especially useful when the same IP address is listed in multiple pools. (cherry picked from commit 470c680cfbf5f6cd9ac392b210b97b41d02cd969) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 8d65f019da43..7a01da9df94b 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -54,8 +54,8 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if ((opts & OPT_DONOTHING) == 0) { char msg[255]; - snprintf(msg, sizeof(msg), "%s pool node(%s/", what, - inet_ntoa(pn.ipn_addr.adf_addr.in4)); + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, + name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } From nobody Tue Nov 19 00:26:48 2024 X-Original-To: dev-commits-src-branches@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 4Xslfw4ks5z5dGb4; Tue, 19 Nov 2024 00:26:48 +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 4Xslfw3qCjz4dJy; Tue, 19 Nov 2024 00:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976008; 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=ykZ/k6vLUdDEfqJImfhpevfJGbus9JKGUSz3MjtHaPg=; b=wqCnPB+aXuLWHlfc/f8Pa6ffDw2HfVFSPybuTmTEut6dUnIAwhmQTBwdjLlACPh4QebJS/ YzKsER+MObT4FKtinIsZnDsfaqpv3cJi3OoncFmRyjInUgXrPp935JP1Flw/fVamnWWEpi pclrEEMeMUAYQ7jGaCbHcgRhfwNDhK+bjKzIX++XTrw7hG1hW/foNG3VOYSqmy76czlVBf /W5otxPajURLuI65XeOG1TgVa4ccWyhBnLwRxORxOetYbp5+9VaxQJG1/lGkRJbg2vueAp kwtjk0pQwKrUzF2KzsOrtlHFNKa8X9nyCh9bHeYkeAIne4GKjWtT5EYuvN3GNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976008; 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=ykZ/k6vLUdDEfqJImfhpevfJGbus9JKGUSz3MjtHaPg=; b=OZzJAQ1f/W2hO88SypGOoe0IjPYH6yJirqLDcyTMWF5PQw3Ngyef0j3xsKCjnYc4PG+F/m MqYXp5i53WXqY1zDM20vjxct68U9XtPqPHKh+aScVMoWu7fVQiJyIPy5sSuSFngoh1PjQG waJkIIMREJd+7klS0SvDHVxbNt59GvHQo9tLeIVF65YK9jADOX7qUcYKZI3klKXNTXP1Rc RIFcCa53mxTr4fR0KT5w4ZxRtIS5E3FwPb3B6LxsCbF+QTxaXXRuIP5jLeVIwSl8c1poqS 6HuH3tgFzKgCs6TBx7tYe2J0KH8ZVOtIpX56UARZcpNA+Pv7MnaRkhGVZfLTYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976008; a=rsa-sha256; cv=none; b=L3d/jN5LPz63ZvXpjbpkokPalP8vHEA9j2x2dmIT1sYeDqUcK1uJ2IUaqF6x7BGtqgDTaU cP9kRRdOb5AARXBl7Fnq1G8oS5TtwqgaYaMhByhtTBeop3W5nDieE+zBlxMnleD+EwEB47 mFoz0uqLicVmzS2behqb7DtqFWM/7Lftvw1sq21AvnnjiRP6ymnD1wnA/jXipd7xrpE9mW m2WrEXG1MfAq8Bf6ma06ADQKPxfsX08piL+c7xOZQpc1l/LkKfrLPcBXXPNatw1hyJppcm XIXO3RkMJorpuHGlkr7ZZ1mB+ExZrgEiJbJF+5gAHh4TGhIbuq9kY0qz+cDiCg== 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 4Xslfw3RKHz12Vc; Tue, 19 Nov 2024 00:26:48 +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 4AJ0QmdC063751; Tue, 19 Nov 2024 00:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QmLK063748; Tue, 19 Nov 2024 00:26:48 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:48 GMT Message-Id: <202411190026.4AJ0QmLK063748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: f9d3c2a44353 - stable/14 - ipfilter: Print the hash name when adding a hashnode fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9d3c2a44353f3d987b5443d6fc30ee270ea0061 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f9d3c2a44353f3d987b5443d6fc30ee270ea0061 commit f9d3c2a44353f3d987b5443d6fc30ee270ea0061 Author: Cy Schubert AuthorDate: 2024-11-07 15:51:12 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:04 +0000 ipfilter: Print the hash name when adding a hashnode fails As with when printing errors for failed poolnodes, printing the hash node (IP address) only leads to speculation which hash pool the failed add occurred. This is especially useful when the same IP address is listed in multiple hash pools. (cherry picked from commit 8aae4220d76602f22291d7567ba0c61b9aa8c188) --- sbin/ipf/libipf/load_hashnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index 11525dc96e35..bf22edb9be87 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (!(opts & OPT_DONOTHING)) { char msg[80]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table", what); + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:26:49 2024 X-Original-To: dev-commits-src-branches@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 4Xslfx6SLmz5dGLB; Tue, 19 Nov 2024 00:26:49 +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 4Xslfx52Psz4dK0; Tue, 19 Nov 2024 00:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976009; 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=EJ+BOwY1kZ9PUY6QXuIxIgLPI05OoqfKIMueiypHv4k=; b=DyM0bBBnAbKn7NF41qaB7D68+x6QRKyDeZF7jRsDniLONSVCB6ZfAL4P41UGgF0Qbd4n9R g4t/ACfDBdjQATXXj55QELEVFtdDUZLRnpV9WAUU3V6ayaiiE2nRoLyO9vb7dWsMF7nU1a C/TW9AEWXqjnOBDa9QAtDFJ4nKUWjn9+8zyLJMl7FOKVAXD4ClyN+WoBJ+FYi4UepoV1jL lnRZJC5UIo0I3ovjhgnoznxEPbp+wo4UHESTOmr0yWcPQ+cfE11B9lBk9fK3hHaAbL/y3a GJKBqq9uJNcbiscmCmTsVBWfihLV/jJWAE9Uz5z6bSz4X4l75HDZopkljfLhXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976009; 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=EJ+BOwY1kZ9PUY6QXuIxIgLPI05OoqfKIMueiypHv4k=; b=Vt95J2F8PDbFI1YI58SHz6XUU9+r2dJpkI26iy6dqB+QGkjBNi+Wxq2uQb7NnJWuhn/5M/ Q15ONrNjPK2stkt75vJg3asct7IwXtTni4jxWHb9ffcMINDFEi4lvwQ1gV5/vlnkyLhvlR +HV7OS5DK3b2jiXO2rJl0Y25Kw6tvYXY5xeTNrygOPBRa6lVMkqMCHle8NqwJXFtO5JUV/ kikFmTkF4Kd8Zs8cEkuORIWkpUsJtltZ8SVEhI5ybSYWdPz0JVt9WGrqb4xcOOhAkr18Jf g0RKTzNOiu8TwealXVBq62ZOThXKSYzqBngIrpH+/AkoltPPHvuZSqEwe43yLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976009; a=rsa-sha256; cv=none; b=a1SJrKy/8qwMswB0AmjfKYIDjhxH/Le5OYJz3ncRqewGoDNXpUvgEM52u7PtH2uvTudygz qvhpS7+6lP0Al2WAfHuRAuCltROZYaiIL9hMH5bA7stGhT0R4aIdYSw5sF52KoPaD4cK6x NdYZBN6NDz/+XR45pUNAuGlGHXDmb9WjSL1SkWv+tjcqcwnJqbqDuUQr0sE3AcrvXg/zYM PRhsYcFMYuoTakAECVk3cZI21H+jbqT8edPepErMZ2dzVmJX8JyHzuiAbf5/wyY9VRKa2O 7IHHGKVFA/GihlcwLG/CKyiZjSeZTSNthZp37Fwk55UZo7VqpQ9pdJ1angB4ww== 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 4Xslfx4SrPz12w3; Tue, 19 Nov 2024 00:26:49 +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 4AJ0Qns7063810; Tue, 19 Nov 2024 00:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Qn2J063807; Tue, 19 Nov 2024 00:26:49 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:49 GMT Message-Id: <202411190026.4AJ0Qn2J063807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ced92eab36f3 - stable/14 - ipfilter: Close a bracket in the poolnode error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ced92eab36f37e4babacbee72e708af02af87a05 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ced92eab36f37e4babacbee72e708af02af87a05 commit ced92eab36f37e4babacbee72e708af02af87a05 Author: Cy Schubert AuthorDate: 2024-11-07 16:48:00 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Close a bracket in the poolnode error message When a node in a tree is discovered in error, i.e. duplicate, the IP address of the node is printed but no closing bracket completes the node in the message. Fix this. (cherry picked from commit 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa) --- sbin/ipf/libipf/load_poolnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 7a01da9df94b..0e41a3921b71 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -57,6 +57,7 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); + strcat(msg, ")"); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:50 2024 X-Original-To: dev-commits-src-branches@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 4Xslfz14p1z5dGbL; Tue, 19 Nov 2024 00:26:51 +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 4Xslfy5wkYz4dPb; Tue, 19 Nov 2024 00:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976010; 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=tfhh/ZfPgTazw1fTM4pfKtq66HAKdDXZumv4Ob9JPf0=; b=OFg8XLCCA4b0q7wvew+XAyLofhGmqWhWA9Pshd61eWF48f6gjACGMtOBN3Ngvxz54pwJRg 4a3PcL1FlIjPW9DoQjRHG4KDV6vjLIy2NJANNYz1NBRLiok8o57pN8dsYioV3btPwMJQ6J F8dQl8XQwmI/FYyRI3MO50PotDqXIn9wEBRNT+L9Dozs/juBKh7iFRX0zI1ZGYQzN1Wf4W UYlGG13bEUw6zdAX3fHZYenUi+N77gMfsq0SwahZ+MBO5GKgDvC7iN4ZOP673RO8wBZykz 0llt4U/BoyY93veBUzrRCttFjLlx5LMYn+CAxYG4N9fd4xsrLEPBesZ7toY3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976010; 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=tfhh/ZfPgTazw1fTM4pfKtq66HAKdDXZumv4Ob9JPf0=; b=KuoFc60qD/FTs7lca5PJukLNIAHtjSgKbniAU4Wme4Xu/YBFLVDHq0QJeoFOy1VGuKj4VW 14opc4Yfid92lPUGbfbhelI297A+ZRRGvl6weNhDS1VivddoMMNdwDn3tkIIgzfCrRHNmd X4AxoYyEt3Vg2jSfydqGclZqp4BjSDzxfl/W4slpwtWRJ4PtrIWdjGr71v3ydPxgR8x0vJ 5r2eNEQQa8AEo2KzxNDGYvMjYg1arH8XlYSKQsD8E9zltUA+v2CoYLuD9uYPCjLVb0E2i0 pMgqZzeaU/hwB+Gtmt93QdXAbGXrdQubRm/T137/Hx8fw7BFt7sA2p3C3+Rn1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976010; a=rsa-sha256; cv=none; b=qCYowtPhw1UPIM9E3dPlN1oNXl0193vnQNdhCKOADPOChu6v/kt1jNJpPNSZVCSJd7AmcC 1qbQfTvP36v83kd0oGEMBMZaZ63gr+me+8Komv7cHgc7XGD9W6i44HuqZbbIh1JQWowGu+ ULwU25/gVsPYRXYiUaBVtEVypMR8f6LPOGWWTkPlUI/U8Neeu3e+T1RQhJ1dyecaV2qM1G BHwVf9ynsYxq93APTshQHP+srBdKwUCCSxQzMQjRfrKzpDdD49Z2Y5ffBvBKUUnpdyIBMx FGrgsl4QRgoaFDlmAp0+aBwdtofzUqOwywCbVr1UEXZAM9PqaI4hs96ItPxhpw== 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 4Xslfy5VYjz11qF; Tue, 19 Nov 2024 00:26:50 +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 4AJ0QovP063887; Tue, 19 Nov 2024 00:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0Qove063884; Tue, 19 Nov 2024 00:26:50 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:50 GMT Message-Id: <202411190026.4AJ0Qove063884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 17c21e9e5205 - stable/14 - ipfilter: Support printing of IPv6 addresses in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 17c21e9e520559087658cb171774afb310744a81 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=17c21e9e520559087658cb171774afb310744a81 commit 17c21e9e520559087658cb171774afb310744a81 Author: Cy Schubert AuthorDate: 2024-11-08 07:39:11 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Support printing of IPv6 addresses in error message Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of IPv6 IP addresses in addition to IPv4 IP addresses in error message. (cherry picked from commit 3a2cb65b6e6dc1e71013db27ce143eb8670a1755) --- sbin/ipf/libipf/load_poolnode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 0e41a3921b71..880a6cd1c681 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -53,11 +53,29 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, - name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); - strcat(msg, ")"); + inet_ntop(pn.ipn_addr.adf_family, + pn.ipn_addr.adf_addr.vptr, ipaddr, + sizeof(ipaddr)); + +#ifdef USE_INET6 + if (pn.ipn_mask.adf_family == AF_INET) { +#endif + inet_ntop(pn.ipn_mask.adf_family, + pn.ipn_mask.adf_addr.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s%s)", + what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:26:51 2024 X-Original-To: dev-commits-src-branches@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 4Xslg02W6Lz5dGfk; Tue, 19 Nov 2024 00:26:52 +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 4Xslfz6yZCz4dhF; Tue, 19 Nov 2024 00:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976012; 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=OStCKpIvff5mmFIPtyDcAOBg3YGRUAiuok9LuUgwODw=; b=UN1+XZyoX96tSAdSOaQ8a/CFyyhieko4Ek+uQWWx6qeqyPh5gBgVvDnglUVcOH1DklUlrQ m1AJfwkEC2t4Ybsx4tEJunP5YeyvrZjKMLjd2Fiflu6Axhe/MivYqfmo1Con8qt/broIQT JNzmgsaFcrHAfC/uj2Fw//zxx/hho+ZoBlID/YieLEGG49N/RQMGd7AAKymCzufE1ltmGy iXXF3Ink9y+X7/ecmp+PdiXNG/GoMrhwOho0JqLGGUqrvC79lkM9uDhIHKVcWhZ0S38BCv zha9pfvzVV3ggKOcw2Gw3Lka/Ffna0bOTnuFktu9WTMW0TkQAIMaDCtir5gAqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976012; 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=OStCKpIvff5mmFIPtyDcAOBg3YGRUAiuok9LuUgwODw=; b=DjxWAjqiFoeCx8ZlYAy54hO8W8rOh9+zQt/X9u9CzxWRiXWMw67vqdYNJaRJ/Suh8oVhfJ tITsh39VJDUYPAPXOncU81ZdwNmBBpyRiz3pC5j3/yPSXc5VNqDLYGfChNXMxV9W3DoFIm cpG5p6gRf3N8FBAsIRuMSWfIPHX2l36EMfqtbSm5QRkEK1p4ILMT2OAtTp6IS5fACk32SS jsIzqCwUMUAOnY+BQt85z7oA/nOKQ7BzzCCgnJJpbj4b0GLbYBZyKekuTzH4nUb277ZD4J ZAIXdexkxF5Q7wQFqV/s4Ro2ZDL8qYnM+g4bw8Dwt5Z1C7uY5SLWKEGnCAMDjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976012; a=rsa-sha256; cv=none; b=giPdPHIOEqvONsJlsMCRKnqmoFvO4dbAMSYQuQ8DUkOCHx+LZJBoPQ0w9VQGg5L3G/OHTE 9kHiLC68Jx/e9K9rdY+Aa+xvaSZ4kJGC902kHjZ75u51WBQWFaBd25uh+vEPiP5IMC8BR0 gFuw2/u6h3Nm5aVzyZmCKLiRpEx9SJOgOQuvKkOkA+qSNzmQcDNAdMznxlqbjPg2M/vMyq 5Nj/Gj03f1osE/x1ukLytTOj9oRdlIIGpBHOfnrPe6ByYuU74Bs6hTZI4PaeJUXKaJVFj5 H9Ttp6Cj2p4rJqLNX/XinLg2qjTWaV/MQVjY+p3zlF/KfV/Q+mFPsNHfKrDBXg== 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 4Xslfz6YCvz12Vd; Tue, 19 Nov 2024 00:26:51 +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 4AJ0QpEE063939; Tue, 19 Nov 2024 00:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0QpKv063936; Tue, 19 Nov 2024 00:26:51 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:26:51 GMT Message-Id: <202411190026.4AJ0QpKv063936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 43d49c178e12 - stable/14 - ipfilter: Include the IP address in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 43d49c178e12a93e54742e999cb4233553b11064 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=43d49c178e12a93e54742e999cb4233553b11064 commit 43d49c178e12a93e54742e999cb4233553b11064 Author: Cy Schubert AuthorDate: 2024-11-08 16:30:53 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:26:05 +0000 ipfilter: Include the IP address in error message Include the IP address in the message when a hashnode add error occurs. This helps to identify the ippool.conf statement that the error occurred. (cherry picked from commit 9da30a23a5ecae151ae1db045354fab105c69e12) --- sbin/ipf/libipf/load_hashnode.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index bf22edb9be87..12b11687710d 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -53,9 +53,28 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (err != 0) if (!(opts & OPT_DONOTHING)) { - char msg[80]; + char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); + inet_ntop(ipe.ipe_family, + ipe.ipe_addr.vptr, ipaddr, + sizeof(ipaddr)); +#ifdef USE_INET6 + if (ipe.ipe_family == AF_INET) { +#endif + inet_ntop(ipe.ipe_family, + ipe.ipe_mask.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s) node(%s%s)", what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:28:12 2024 X-Original-To: dev-commits-src-branches@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 4XslhX5q5Fz5dGLS; Tue, 19 Nov 2024 00:28:12 +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 4XslhX5Lfhz4gM8; Tue, 19 Nov 2024 00:28:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976092; 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=vkga5q4z+RGUkVTdCfO89MvGno0p5xhn3kfcf83QCHU=; b=NKnQhBmnooKzg24YSE72qHS694oJAxEJotOTqgb8jIh1STeTdnyK6t0bR7kYdQkuHEFSsp rXExYAvzQ3KG2OrU8r9/4mXPuidCa3vUgtjUwoBOk1vqzMksv7cQ9DHmqKAlbksY51Pvh5 bjDe1cZJGP4XNIa/a9x2BI6F8MUqlV0+HE4AhuThjtMFLHEDkHoDoIzbbZ4Bh+/buS9Et1 eXz91lUgNUzxz3D4RdcNZipURGSwCN0ooTkKX8yIaSrQdqa8YS2jWlsJ0pvWl4s/GAzG9O S3Ev+lY4wCPlCv2hwFdQyIpk80+yiu2bYnL0uYknNvWjVf6Ims76z460K/P6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976092; 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=vkga5q4z+RGUkVTdCfO89MvGno0p5xhn3kfcf83QCHU=; b=wFYEkW8y41L5wT16p5VG9yDAK217KfsG/z9jOI90a94lml6YFPSe+Rvzwb9kMwN9KhGpvr wajveOnK2108UdI5o7i6iLf7FEB1T0Mf+Xib++h7hbYudyjggAZPfJw3bFDgRySR9eYdRb 0Z5C7pUY/jnrSHlVQcNP0Sc7lmPoIImQVoje8GhWpEmLA/VUUcb02F5Ix5IH2qWO6XHG4g JBDGdW8MGZCmfrjP1xNkSI6GkmTsJztVATv8zXZ+Wji2tATRdTh+CI6OvEhKZg2dX0Rbix wxeEOi42bMC+zHZmcl4FmfUWfqQMVFVy82Hp2mgA3WpOT33urCR1kpEx2bYDtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976092; a=rsa-sha256; cv=none; b=QL4jSYC6frIgYiQxlSa+/ETwFqI5wOZGi3c1zzgxY9XJmYe17P1mjiUS38iFaSAvpuz7lp 3Mqf34FDhcjtnZaMhEVbVodox8Z2OSa63hVz2MHu7PEHrGVFGGO92rGoNi92/y8TKkTNPp 0fF+uYJ7sl7sHPQ9lmR89N4GYRGc21yBrg1v45JQ8QOenZTY+j3DOyjhYRkC0V8dIi+zXv 2f0Km6yJbUuzS7Do89xyMxOgcI3g4acKsyPbPEpSiaghdPRpM5h4LsFwaYwmFeVmo/72oD XqJv35ZfmniVqovqOkU7p7ahg53vM+pcTaO939AjZtfPKIZY/bGkdEc+3bBUmw== 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 4XslhX4yKhz12Q2; Tue, 19 Nov 2024 00:28:12 +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 4AJ0SC2Z064549; Tue, 19 Nov 2024 00:28:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SC3a064546; Tue, 19 Nov 2024 00:28:12 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:12 GMT Message-Id: <202411190028.4AJ0SC3a064546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6739198793e4 - stable/13 - ipfilter: Set ipf -T optionlist at boot List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6739198793e469f9f9c414ddad49b7c0e08eb03e Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6739198793e469f9f9c414ddad49b7c0e08eb03e commit 6739198793e469f9f9c414ddad49b7c0e08eb03e Author: Cy Schubert AuthorDate: 2024-10-30 19:28:31 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:06 +0000 ipfilter: Set ipf -T optionlist at boot There is no easy way to set ipfilter optionlist variables during boot. Add plumbing to the rc script to support this. PR: 130555 Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D47346 (cherry picked from commit 8d6feaaaa26f444abb209360e52b993e39cb81bb) --- libexec/rc/rc.conf | 1 + libexec/rc/rc.d/ipfilter | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 6c9a58ff72c1..5e70aa5cbc06 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -217,6 +217,7 @@ ipfilter_program="/sbin/ipf" # where the ipfilter program lives ipfilter_rules="/etc/ipf.rules" # rules definition file for ipfilter, see # /usr/src/contrib/ipfilter/rules for examples ipfilter_flags="" # additional flags for ipfilter +ipfilter_optionlist="" # optionlist for ipf(8) -T ippool_enable="NO" # Set to YES to enable ip filter pools ippool_program="/sbin/ippool" # where the ippool program lives ippool_rules="/etc/ippool.tables" # rules definition file for ippool diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index 816db50540ff..de406f8e1740 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -30,7 +30,13 @@ required_modules="ipl:ipfilter" ipfilter_start() { echo "Enabling ipfilter." - if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then + if [ -n "${ifilter_optionlist}" ]; then + if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then + ${ipfilter_program:-/sbin/ipf} -D + fi + ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" + ${ipfilter_program:-/sbin/ipf} -E + elif ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then ${ipfilter_program:-/sbin/ipf} -E fi ${ipfilter_program:-/sbin/ipf} -Fa From nobody Tue Nov 19 00:28:13 2024 X-Original-To: dev-commits-src-branches@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 4XslhY6m9Nz5dG9H; Tue, 19 Nov 2024 00:28:13 +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 4XslhY6LnQz4gD5; Tue, 19 Nov 2024 00:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976093; 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=hrQQq0F1gSb5MPYyNRDAsWytCUEiLjgezsUrP0g568I=; b=ZXZTLLkIzrYjxyRY3UBJqEkeQjgD4JRPMKcC7ghmyn+kFyYylLV7aGgFDi5+3J+2zZ6ONJ RJuyy2zaAMv2af17r6RIO7V5uWg/GEQjynZKVAww3RywFYbAyqxmM13TGisRcpa2vwMLUU OWNtrevWNecrLVDG6Ee8luFtJE6BZO4N4Q0dogJHUdk1eJBogt+uk+ifxnFIsHr8+/5PQE FJNBZT0pAhy5IIUfiHroA511KrluvIQTtcT5/NBqrNEsIduY+UAmrLrvI5Z8icCKM4MmSk COvUwPyabmUk3eacLKxerxjJKyd9oHeLGnum6Lwc+6O+3v9uxXoeHZ3GAWpOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976093; 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=hrQQq0F1gSb5MPYyNRDAsWytCUEiLjgezsUrP0g568I=; b=ZY+tHWpKCCgTVPZLFi1IKL+NVEuLTRVkVO9yZyV2eiDmHItwAyR7YqVnFx/BXoIDgoOXs9 l+TMd6azKl1bnNpBl/JXLR8kYCUAUjy0J9oK7w6/xz0832+IJ9mxg7ORNh9AbMy2lsY8bL moGawKLha1FVGw6FF8gznpakQi1cHOIcrq1w3WdsDSFTyKwFD9m/GhKzWrr8+iKxaNghbr OHv0MNilH9kcvwCfjDrx55mzxa9MMCYcBpUqROJAcsudzScZwQtxiy5CbE0c4IOpp82Gac NBYQlzpzup1Djt8Chji4azeQvhvyJwPZZ6UlSo5+rywyiLA2D/jarQM4xFKLcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976093; a=rsa-sha256; cv=none; b=ZqLEYwtzzY3GPgHQFhvCg3nOOmKHstiS4os4Ab1RAgq2RI4E9yyyD6Fq/EP+rCskFLVnxk H3Tv/O7B3fRCtXxoHAhsrQUa5tzzIrljsVBjpD5x6obWSUMctITkKQIUU5JbiHPv0pqYRw E3zNntGRxE3sz3Lh8Qe/m6qOw9jfM5BopG9u1LmUkcB6C1UzN5RDCbX7j/RIdf2DcU0yvi AxYQM+0nlIaWmbUsP8qUC4DfY166j1uA3zEAot8tqUPjJSIg5qhszwZ59LyWu+JevE/mm5 iJ4qhMSfFxnaFWtV5k+7/a6WJO5Tr0fgvGeu99J5DBfcCBia0KpWHmFXv3/0Hg== 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 4XslhY5yGbz12Vh; Tue, 19 Nov 2024 00:28:13 +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 4AJ0SD3q064603; Tue, 19 Nov 2024 00:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SDlZ064600; Tue, 19 Nov 2024 00:28:13 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:13 GMT Message-Id: <202411190028.4AJ0SDlZ064600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 36f7ee7346cb - stable/13 - ipfilter: Avoid overrunning the message buffer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36f7ee7346cbdc9d19edb62da1526e1d970271b4 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=36f7ee7346cbdc9d19edb62da1526e1d970271b4 commit 36f7ee7346cbdc9d19edb62da1526e1d970271b4 Author: Cy Schubert AuthorDate: 2024-11-07 01:22:57 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Avoid overrunning the message buffer Avoid overrunning the message buffer when printing an ippool btree error. We do this in two ways. First we increase the message buffer from 80 to 255 bytes and secondly we replace strcat(3) with strlcat(3). (cherry picked from commit 42935716286e7887bfeb9dd8daea72d6a5d40908) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 5c9fd838bfa0..8d65f019da43 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -52,11 +52,11 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { - char msg[80]; + char msg[255]; snprintf(msg, sizeof(msg), "%s pool node(%s/", what, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4)); + strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:14 2024 X-Original-To: dev-commits-src-branches@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 4Xslhb2gWzz5dGbV; Tue, 19 Nov 2024 00:28:15 +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 4Xslhb0J2xz4gML; Tue, 19 Nov 2024 00:28:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976095; 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=2T0quof4F9oTxIhqvpfU0/V9P9SzzLqFjBEIg4S9n3c=; b=gyXyeTh8hJXOoJB1blfVH2Ocb+PB1tfvneIaSA3nzEypgqmj4rlcaEC+cVrEDToW9dvlzn gow26jnfkxaTYth7KDxALs6bb6/j9gr0r5SnJbRRtAYtOac6JSmtFlgmQqu04K/8J76WU2 RouxYacbfbctOJjKtROoa+6z6AFBew7uVSYegx8kGIMtw9q2d4hcYc9foApXCBSBYbvVGJ 5YfsavamONN1nflqyGGIDcQRf+Gbemzsxm2a1buQRHwFHXxV1DiiwPkxTnbhkWDjwmJiCQ jZVb5L/+wmEKRYIGL/H7N0U3I8XHimQGvOXJguXSUV/Jm2dKVCyN3Pz1czlw/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976095; 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=2T0quof4F9oTxIhqvpfU0/V9P9SzzLqFjBEIg4S9n3c=; b=spXwTwd+C9pAEQhS/9X+L08RT1eqSDQsRdbd6G35jXSVwLNhjYeTTz+amJl2w/6BNm17s2 jgMuMcCzAy3GAOiKraiARJB5ZUh47ELts3nHdcSc2ShtOYAArmbUN7btDF9ioTfCl6qB4X 554UsuQqdPtR0OOYbUPcMLw1OY6Dujb3Bpb9peYHpRMecGgnmZ2sAc9MPCMpPGP6YQK/MU 9I0LCDOyZbFrDMbKBQCOguECrPD+qq4SId553xYDRUwb7wTKF93/bRCZd93ONpZZTvtASV eHod6EVh7GkEXhFgOOPs4yalMSzDlrFw6sWZY0lLon+4Fa8hVYHr4bAyoAESUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976095; a=rsa-sha256; cv=none; b=ns9qz4e/63H4DOz7eVhqjYzgFhT1D+jAtPwC4V55GO4zXK/nrb4W0xHvvAKdZWyOZG3A7n 4kzGmsjI/5m+3Qk/wpVeiXNoDjcsH27w+bi//WKO396SVrtEDgGME/dW6SSQzPH6x0Z03d cLf2HRHLLbaqdnIvMEXMrtWzuzBh7eyEDL5/wcdUB0nh4WyRJhOVLDdaBMMK8C2FQ0WKWq J4jcbAlEmHmuS/TcJXaGyAVhGfbd6aTSFGfzkZLCrUS4d8PrKF1QUI+R41w4khWUloWISX zcny3aknuuaNE7KO57zjM7V+P7Fnjf3R3ENlE97Saj/CdJFVUhEcx2JQqyr+AA== 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 4XslhZ71fDz12t6; Tue, 19 Nov 2024 00:28:14 +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 4AJ0SEqp064660; Tue, 19 Nov 2024 00:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SE26064657; Tue, 19 Nov 2024 00:28:14 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:14 GMT Message-Id: <202411190028.4AJ0SE26064657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ed2ecba890e5 - stable/13 - ipfilter: Print the pool name when adding a poolnode fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed2ecba890e58c6164fb5f21a89119bb8347c088 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ed2ecba890e58c6164fb5f21a89119bb8347c088 commit ed2ecba890e58c6164fb5f21a89119bb8347c088 Author: Cy Schubert AuthorDate: 2024-11-07 01:26:37 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Print the pool name when adding a poolnode fails Printing the pool node (IP address) only leads to speculation which pool the failed add occurred. This is especially useful when the same IP address is listed in multiple pools. (cherry picked from commit 470c680cfbf5f6cd9ac392b210b97b41d02cd969) --- sbin/ipf/libipf/load_poolnode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 8d65f019da43..7a01da9df94b 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -54,8 +54,8 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if ((opts & OPT_DONOTHING) == 0) { char msg[255]; - snprintf(msg, sizeof(msg), "%s pool node(%s/", what, - inet_ntoa(pn.ipn_addr.adf_addr.in4)); + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, + name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } From nobody Tue Nov 19 00:28:16 2024 X-Original-To: dev-commits-src-branches@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 4Xslhc2xFSz5dGcl; Tue, 19 Nov 2024 00:28:16 +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 4Xslhc1MW2z4gH2; Tue, 19 Nov 2024 00:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976096; 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=PTJ04vcHOG+nxZdBnmH1OUtz8LZAsxp2Pxqc5PiXfVw=; b=J+N4S7fKIBM1Cz6llo2Vohht9vV0IGstzaMI8lB4kIGsy5jP78JOVaqX3V4E6fBQEMpfSD j8jyGG2qPLZ/8OandsVNETc6ILlXl+m57MF9SKErffS/wHVy/aRB+ZGUdKPQPfiSYgMxeh 1KBv5rfcUzftMPFJNgiRQltNRlf0bqjzldH/DWf9SJhz/e1bynsvG5QTEFwtsQmX2lFePD 66qNA9o65QYpgPBcK3LG67k1Ews8hzwD7R9b2g03vw4CV695LqZEAxVMWYwjmnLSVXSPdt w5CBdU29+SdkygiwrNbiIZrsw9KF2LApwwgkAcGbLNAwb20zh+m2WkyjkA6vEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976096; 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=PTJ04vcHOG+nxZdBnmH1OUtz8LZAsxp2Pxqc5PiXfVw=; b=Na8k0QL6FLcd6dZyzhwmw7r0QtAyQ359/VDSdPzsHgXxVG81BmT6AFwLRch07uJzrXNmNq BOdNRdPOigqHasQjpEqcg7Ls9G7X6rnpqPwBFJdTXox9yDy0BTZzlS05Q/Y52OFpY/iRwr Bfc92Thy1je61LiRHyYlC2JVRX+FIcfdueTcPhEnF4FiYmzNiPDUx4LK5Fv13u/TaCt/c/ vI24ctGZAE9xXUafprh/qsiyjszebCM9bu0ctQ+13vJP03y9yqqx/7hGttJO3uqQBETCng P1Vuto4IGDPTQEqkRxXlo+eHYVErOc0yB9pQBjT/ira4I+v5sOMq+AlJZVb5Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976096; a=rsa-sha256; cv=none; b=BpdF3fuKIkrLBdihZp0BCgufM2qMOtkgS8vx62VZIId7vbMjWUODCHJ9DSIhFjDanNHd/3 k5XmLUH5FMauz90v0dn2jtO3s7+L+FoCuQ5EcTgXrW1kHZVusV8R/d/gWoMo91MPN9KSGR FC2n09FIvH191yTnZL2FbxHpK+ii6yNgZCsxDQDc44vK2iUND48nxNrxtVBZ3RMwWLOcfM X8TE0kvCcWAJAdVS78s8Mb2Vt1vWl2Hy6AQ/0hJxOLYHyJNB4SLSMetDb5g8Ym+RfDJRhO 02kFDSwgu8hn28IQ/Wz09ZBRM4U3v78PiEWDSvh3LegpMQrTA1G4SRK0jfohFw== 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 4Xslhc0wj7z12Vj; Tue, 19 Nov 2024 00:28:16 +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 4AJ0SGl8064724; Tue, 19 Nov 2024 00:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SGUC064722; Tue, 19 Nov 2024 00:28:16 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:16 GMT Message-Id: <202411190028.4AJ0SGUC064722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 7bc49d8b1e49 - stable/13 - ipfilter: Print the hash name when adding a hashnode fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7bc49d8b1e490eba0710923ef149d52418197472 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc49d8b1e490eba0710923ef149d52418197472 commit 7bc49d8b1e490eba0710923ef149d52418197472 Author: Cy Schubert AuthorDate: 2024-11-07 15:51:12 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Print the hash name when adding a hashnode fails As with when printing errors for failed poolnodes, printing the hash node (IP address) only leads to speculation which hash pool the failed add occurred. This is especially useful when the same IP address is listed in multiple hash pools. (cherry picked from commit 8aae4220d76602f22291d7567ba0c61b9aa8c188) --- sbin/ipf/libipf/load_hashnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index 11525dc96e35..bf22edb9be87 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -55,7 +55,7 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (!(opts & OPT_DONOTHING)) { char msg[80]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table", what); + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:28:17 2024 X-Original-To: dev-commits-src-branches@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 4Xslhd2zNRz5dGHZ; Tue, 19 Nov 2024 00:28:17 +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 4Xslhd2M0tz4gDk; Tue, 19 Nov 2024 00:28:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976097; 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=2eCWmIVbjyUuj9lO7FOu2zHrbsk6FlNfb4owLnn9VZY=; b=UhFHDZ99EkD8hf2RhBoXh/DgfQFvuM15iAKHqdcfhO7y8NrfOD7+nm/Mnok1XbT1gpxWzI vBMBRlOs/il8r+0JHalxwlJESPHloXK7et020dF+vszfdxHyqyEInZj56eST80cz23U35W mJ1EcfI7Juv6Eu8GXH3xVZAeLAUMsWAOjCBycdhzFCc8qIzrtbb5Lw66TZHCetTsCBi+Xq h/UL5evrKudi0HB+/hAtggZ0KOCNBggVSpIcWOXUoLVfnvztS46pka+luimusxBPSzbblu +Mcs6LVV6vzRTy5sHgdtFn/QvO0vKFXnC5voUSp+pm8A6ZpyDHCLeWHVdCNbqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976097; 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=2eCWmIVbjyUuj9lO7FOu2zHrbsk6FlNfb4owLnn9VZY=; b=eTGauzUYun1NMuvSSPOqMo5TPUgNz/mt+wjXRhF/EOJI8bG/n+WqJnz0QgHGdK7j150e+2 A3Mbu3YTnJlKBGojcWJGFopVyfdkGFPoB26lJMRRn5TwUzBBDArZVtsDaMxr6l179J/Mw8 GYgMpXuEvN3AciY+jpQiVUDDeL89oC/F7ZveIP0FZegNvKec62IvRojM6YUd5RYf6I5E7B tLHHljHQWxWcmpdjf5NY7u3xYTn+EWiIMN3BX7P0SpMPLOxc4ySuBRtu/FIigSmpcnLZuR ZPh0EoywyKZFFqkDLFcykgV4NSi8JH6KXubNJ0/1zswUFoVEqURvG+7CPfvBZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976097; a=rsa-sha256; cv=none; b=VnTlf0VHpZT3fMj0fxwoKZ1Hv8jiazHs2l0W/hkMwf352dw/Jbjq7tUicaWmjp17f7D1F0 1LzDm0I7pqDwK9708ferL6dufL7/hkbteu7NTgizxM2LUc5G5pgLU9q0YfhnPi3L86YOkL 1dYGk6Ube49b4gX+Wo9VdQ0MpbUMhdQ/3Io9WP6e8trENKcMJyad2oibcJ62xDJi0HfAuU rqelHwy1PnpEUSrWqTb5bBk6PnwcRTbq9NYMGS66rMZoh19gzuEyCWW+WZ+s2h+cKaW5/w QHSM27ViNuPftNThQWgDUtlhkrjWAJR4srsUIsgJVxg6FjuGlUvNv+EHnkAgVQ== 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 4Xslhd1xrhz12w5; Tue, 19 Nov 2024 00:28:17 +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 4AJ0SHHQ064778; Tue, 19 Nov 2024 00:28:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SHg2064775; Tue, 19 Nov 2024 00:28:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:17 GMT Message-Id: <202411190028.4AJ0SHg2064775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 0195893f9408 - stable/13 - ipfilter: Close a bracket in the poolnode error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0195893f9408e043505dd8599ebbcbc8e843c302 Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0195893f9408e043505dd8599ebbcbc8e843c302 commit 0195893f9408e043505dd8599ebbcbc8e843c302 Author: Cy Schubert AuthorDate: 2024-11-07 16:48:00 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Close a bracket in the poolnode error message When a node in a tree is discovered in error, i.e. duplicate, the IP address of the node is printed but no closing bracket completes the node in the message. Fix this. (cherry picked from commit 858a7a27f5c82c8364a0eb8bf1d9f0b1315422aa) --- sbin/ipf/libipf/load_poolnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 7a01da9df94b..0e41a3921b71 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -57,6 +57,7 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); + strcat(msg, ")"); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:18 2024 X-Original-To: dev-commits-src-branches@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 4Xslhf4nhlz5dlJd; Tue, 19 Nov 2024 00:28:18 +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 4Xslhf34k7z4gHd; Tue, 19 Nov 2024 00:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976098; 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=kTiVbUFhQbOcwURlelTbPL/1M8AG0UYfdpcgec5rUyg=; b=dnBYsCPivhixTHuM8oxYML7PkGSNH2giQoC0/RgE4//jBVHdaBnktW3DUZeFCM3aVJoeoK 7nC991GPXyxCvWM0ft/0oT1ks0x25pMTHGlim4vBykmDU3jZkDb+uJhyEKEogWX3eNDW6L 73LkdSNnQePrGIIFJ3WbGlmskZ/chBSdUAre1zDlvfR5SA12eOqnxD9+I8LSHQY8JG7R5X 2m0tlrbJRkxY3yM4HT6w8W7K//V0AvPWBcl/U7SeHXyTOaxaOebj70LCs2sIw2jd6iihd/ 5T7+Ed4QtzcFxPQr8kt4ejh/j4CuqH3dyy/XsXhxd+KoA6VNoA2k1+fOsukNww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976098; 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=kTiVbUFhQbOcwURlelTbPL/1M8AG0UYfdpcgec5rUyg=; b=oZ+MLH3V73cgKjYdaM68Zio1G4AzvN2gRyNB+5vLEDboxJMc9/HYVqTsMet4aOfx2uJPoN w5q7LoPFQ/u1BlxDh8HJxcf69aVWnkJZHPwi+AeHCw5xLQaw6STmNn1ymgsVOxhm6k/i5f J5TBcYs22Fgd6UMBzRv7dKo6ddz7MS7CRvKNyqyHV6k3P3Thj3PV3RL6MYqKndL7vNuAPa lPK2JG5GLDWn0pM5VIr00VDkqsyMQRMaL/24qewYQ4pyPnn7wRZOfhAQfKrg1Rny/JXvm6 plWDG66cEl3wdxKNzcL42BmEx12VQz3/csT3hcMR3jgNErxcEtxxnBjDYWrVtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976098; a=rsa-sha256; cv=none; b=g9ia8A2cuDvNvX+Yxx16CYIFfaFHM8B5rnCcf/fQIsF0hmyxGhGJ+5WFdQz3+NOadbe6Y/ myj9fWTCaCs/9gDv84y08vMIgBO9nF+morzcuvwlCR+gYQbYGxe8P626jWBkKIQE55b5dd E8rVX5oWclnPJJUtpyIAB1FLtYypeLo8fWnvrdriPgM+2kAQA5qIYlpfZUnRH5l35B5fT7 RqkaNV88Llr0kLSmRgtD1d6Oogje271nUEw/UM1cjqbrKkYNsCs4QKfAT0RSLQWUl2J3Zk saQudGNQ8yfmnuB+ZUcW6EuAyUPoYrm7IMAN4JjyJ04st/u+L53FRtBM6buHyA== 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 4Xslhf2fmBz12yM; Tue, 19 Nov 2024 00:28:18 +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 4AJ0SIvK064848; Tue, 19 Nov 2024 00:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SItV064845; Tue, 19 Nov 2024 00:28:18 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:18 GMT Message-Id: <202411190028.4AJ0SItV064845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 9bfba304a8a3 - stable/13 - ipfilter: Support printing of IPv6 addresses in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9bfba304a8a36d3b2b8c8d2efa2caeb65955474e Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9bfba304a8a36d3b2b8c8d2efa2caeb65955474e commit 9bfba304a8a36d3b2b8c8d2efa2caeb65955474e Author: Cy Schubert AuthorDate: 2024-11-08 07:39:11 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Support printing of IPv6 addresses in error message Replace inet_ntoa(3) with inet_ntop(3). This supporting the printing of IPv6 IP addresses in addition to IPv4 IP addresses in error message. (cherry picked from commit 3a2cb65b6e6dc1e71013db27ce143eb8670a1755) --- sbin/ipf/libipf/load_poolnode.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c index 0e41a3921b71..880a6cd1c681 100644 --- a/sbin/ipf/libipf/load_poolnode.c +++ b/sbin/ipf/libipf/load_poolnode.c @@ -53,11 +53,29 @@ load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl, if (err != 0) { if ((opts & OPT_DONOTHING) == 0) { char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s pool(%s) node(%s/", what, - name, inet_ntoa(pn.ipn_addr.adf_addr.in4)); - strlcat(msg, inet_ntoa(pn.ipn_mask.adf_addr.in4), sizeof(msg)); - strcat(msg, ")"); + inet_ntop(pn.ipn_addr.adf_family, + pn.ipn_addr.adf_addr.vptr, ipaddr, + sizeof(ipaddr)); + +#ifdef USE_INET6 + if (pn.ipn_mask.adf_family == AF_INET) { +#endif + inet_ntop(pn.ipn_mask.adf_family, + pn.ipn_mask.adf_addr.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s pool(%s) node(%s%s)", + what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } } From nobody Tue Nov 19 00:28:19 2024 X-Original-To: dev-commits-src-branches@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 4Xslhh07hCz5dGbm; Tue, 19 Nov 2024 00:28:20 +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 4Xslhg4B3pz4gVx; Tue, 19 Nov 2024 00:28:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976099; 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=UX+9uAsT22dBhXc0aXjuWlv23/bl7sWfkF0ozUiOccY=; b=yxIO9ZK/3MyJOS7VIoKLHAMHtaIxbwBo+ExzWJ/C/JfCotuv8OkdqXaIJOy3et0sVSdEMe xkNHalmzlKQl0oKpJOQuwU9y4HVIgYI8kkgbV9OQNLmlO6sT+jjqp1/74QVKnJxhox5H9v PPJLxODCnAA6X4RZ/fsZv0z4xs20XT8qT2MqHR4qdRxPD3wh+PyqeSL2D8Gv4eotKdNfsY sww9Kz1sGS1O8XobsKu2nc1txcGIgydBvMU0+8ASHELHMLG/ljkd5Gbt0+sOcN+70ZCsUp gc6cOqFPW9f8r2D6wqpfDyl3BZ2zMl2oWBA/gvnv9hPbT0erjtF0QP3TScwfoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976099; 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=UX+9uAsT22dBhXc0aXjuWlv23/bl7sWfkF0ozUiOccY=; b=r3HNeN2+pAutSYo/NLDiALqOy1cA3fECYU0yvV8nLq2i2quPmyvbxvMDbeBGjJq0GRQaYp ibNFguK0Ui0FbQSuu4iR8jsNLpCafsIWt1apYafrxXypLPXruBn7aOtUpxzCT9ZnAH3orE //ZfSdikHyKagSAfotn90MQkHuZQf+YTabXCb0Y60PNBI+xPMV1TZm85aC9U3muxSQwnyp CYpTPbmW/hwwHwB8ZF4rZa7RauM+ZQgxsvmNz4CqXMCxHyqiAhjgh0I6xAK8PytrinNtpB hX+iXVGbLfQ1zuYHSIMsSbPK1LDqN3DAFENOYe3kw8Pr04cTwLqoF9mFn3vTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976099; a=rsa-sha256; cv=none; b=dSy+a7QlFVgL7biPNM1VnhtsdKAveHsueW/TLbcpEyYffXU3s7CJXisW08e77WM86cS/b5 zKJzFrilci0iB8ncQzWApC6hMA4OeCYNhz+DDd7JA8u2xSU9kCUhOVaXNDEzY26Bfmz1mg QvdrEiN+yuxrT07p/wOJ6zuZcxDAluF5J5wbo/zC+UJIUqvZOjahnWTvRp9FnLJQjwyznZ s61FrrZvY0ZsujdDzTF5ScksXKVtMChPBdYlRuR5k0IiwgpoHaSoRd0FBvPGHwX0QyEk5F xkfXZYqjaNMkevF6fcnJpMk8jmgfnkSlnyz19/eR3GmGhlWMj2STBRU3HF0vBQ== 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 4Xslhg3grnz12yN; Tue, 19 Nov 2024 00:28:19 +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 4AJ0SJDC064903; Tue, 19 Nov 2024 00:28:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0SJnF064900; Tue, 19 Nov 2024 00:28:19 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:28:19 GMT Message-Id: <202411190028.4AJ0SJnF064900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 16d1a55b63f5 - stable/13 - ipfilter: Include the IP address in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d commit 16d1a55b63f5e2a9e1b5307cad1c91da9cf9bd5d Author: Cy Schubert AuthorDate: 2024-11-08 16:30:53 +0000 Commit: Cy Schubert CommitDate: 2024-11-19 00:27:07 +0000 ipfilter: Include the IP address in error message Include the IP address in the message when a hashnode add error occurs. This helps to identify the ippool.conf statement that the error occurred. (cherry picked from commit 9da30a23a5ecae151ae1db045354fab105c69e12) --- sbin/ipf/libipf/load_hashnode.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c index bf22edb9be87..12b11687710d 100644 --- a/sbin/ipf/libipf/load_hashnode.c +++ b/sbin/ipf/libipf/load_hashnode.c @@ -53,9 +53,28 @@ load_hashnode(int unit, char *name, iphtent_t *node, int ttl, if (err != 0) if (!(opts & OPT_DONOTHING)) { - char msg[80]; + char msg[255]; + char ipaddr[80], mask_msg[10], mask[8]; - snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s)", what, name); + inet_ntop(ipe.ipe_family, + ipe.ipe_addr.vptr, ipaddr, + sizeof(ipaddr)); +#ifdef USE_INET6 + if (ipe.ipe_family == AF_INET) { +#endif + inet_ntop(ipe.ipe_family, + ipe.ipe_mask.vptr, mask, + sizeof(mask)); + mask_msg[0]='/'; + mask_msg[1]='\0'; + strlcat(mask_msg, mask, sizeof(mask_msg)); +#ifdef USE_INET6 + } else { + mask_msg[0]='\0'; + } +#endif + + snprintf(msg, sizeof(msg), "%s node from lookup hash table(%s) node(%s%s)", what, name, ipaddr, mask_msg); return (ipf_perror_fd(pool_fd(), iocfunc, msg)); } return (0); From nobody Tue Nov 19 00:38:41 2024 X-Original-To: dev-commits-src-branches@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 4Xslwd6DKSz5dGnn; Tue, 19 Nov 2024 00:38:41 +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 4Xslwd5kJ2z4jbk; Tue, 19 Nov 2024 00:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976721; 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=POFpJF1AFCEVBI2tzQ0ikCYPGasKwDmd0ftNnwm0L3o=; b=rNzOsp/w2QgGIuZm+MIT6SGfN1QVGettDQHPTYz5lRmzBPNn8HWu0g7hSTmIYk0HWMpufh q+Tevtuv7WsnDSfSB7PtO1v62/3Rkv/xQfXfVltQK1gthrl6h7NPlKQywvLOwx41b2LD0z sY9g11Zyk7JI9nJ1lw0GbGRfNd14ev1k7y5XFEE+MQhvxYS9tpnm+9yHvW5pBmgpCpIud8 eTfIW2C+Ou6lPRgUfYSllpF7yasKHlnChxwzOgpnkLhBtzHUgJNxzWCACk1Ael8JIjRpaC BcfetseWHvxizLPfwKClT3/gFntun5bJ6dKF2yuCS9pXcXAH76Iyz5xc1Rpluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976721; 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=POFpJF1AFCEVBI2tzQ0ikCYPGasKwDmd0ftNnwm0L3o=; b=rqAEu1LOsWlAWAKUqxQuPqDIOsnGvVqQ9BUBdAZG6K8imzNMSU3ijrgwb5UK3SNyEKBZbt p4RIWk4TTWgPsKSZ0nakCSQqIuf+sMOmPU/aLoNjxfSC0GHu11Nv1VZa+cGi9bD/B72LBT BJmWiyVOJk0aRj1SUebwQxkB6vwzobO54gOKwfD8s6vKqVHN4CQIxqWYGgOAFsyhHuYb5u UYuHsRcLH2stkhFkzAs5ax46JBhKn3LGBWjB1nVn97BIm8yQtytm/28iEo5dWaHfSkmCLD qRDrN/lkReSSomKehx/iOeQ/nu4tB9jNXuDlls+go39OZQ9st0yjo6fiv0AcLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976721; a=rsa-sha256; cv=none; b=Dh6VUaAUQbH2gbb+99vNcuHNQcFnvLeKJrCT58NCtTqllWaaGQtiGp40UHIDb+Lzv09J7B rv7ukUGZ4QJezpbeEOS5/0KlCDcLzfKgAPwmL3O8oKZn9h7GZdBfKk12fU0pr6qXFMIbi0 casb+83YfYZEa3Nxe/Z/Pjmhf/MdoGsMfox7yCO5kpQovZjV1zSQux1Ihv4m3IPY0T2dl0 +PM3nzoGK3gU3avibp/M/YKd2zPePYfvbEwDhWu0CqOrdZ4s4lL1BybGqIjEv7Zr9QQw9U isOoCEgW6DTAkbWKJZ+/ZTRUXQwB86lWbBoC2ftfTMMU6aCN6uuZ6a0n6PWXgw== 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 4Xslwd5Bl4z132b; Tue, 19 Nov 2024 00:38:41 +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 4AJ0cfFM083862; Tue, 19 Nov 2024 00:38:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0cfZY083859; Tue, 19 Nov 2024 00:38:41 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:41 GMT Message-Id: <202411190038.4AJ0cfZY083859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: de5496958c86 - releng/14.2 - LinuxKPI: lockdep fix #includes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: de5496958c8651fd62e9d65722ad36d322a59574 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de5496958c8651fd62e9d65722ad36d322a59574 commit de5496958c8651fd62e9d65722ad36d322a59574 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 01:21:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:04 +0000 LinuxKPI: lockdep fix #includes Add sys/sytm.h for __diagused which unbreaks compilation of drm-kmod 5.10-lts on main. Sponsored by: The FreeBSD Foundation Reported by: Evgenii Khramtsov PR: 282479 Fixes: 5c92f84bb607 Approved by: re (cperciva) (cherry picked from commit 9b2705121ba230bf71a1509cc928f0481dfbf31c) (cherry picked from commit 06733ceca677b2d8ea2ae738bbb624d510fc9df8) --- sys/compat/linuxkpi/common/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index 70a4e45867fe..93fe445f7057 100644 --- a/sys/compat/linuxkpi/common/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h @@ -30,6 +30,7 @@ #ifndef _LINUXKPI_LINUX_LOCKDEP_H_ #define _LINUXKPI_LINUX_LOCKDEP_H_ +#include #include #include From nobody Tue Nov 19 00:38:42 2024 X-Original-To: dev-commits-src-branches@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 4Xslwg0YH4z5dGgd; Tue, 19 Nov 2024 00:38:43 +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 4Xslwg00XGz4jpT; Tue, 19 Nov 2024 00:38:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976723; 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=ZN1bje9JpWp1V34m0xAG2aw4i/VCOYGvP4gu/RFqfoY=; b=SEfCzPc6bWe/cupzBRJN1nsFMJp5TY+8+h/guGSGjc6QEdOwckU5Sbt5i935jhvcy6pLJo 9bu7JPwXUphhRjME+2WwebXYvIgbAgwelxyYBEtQLkUC0Iuiv6V1taNT9Phylz70a8G602 jVS/knfWTgEKz1iD+ZCRSC8XfiuTJFEYXkbSMWXm6b3G7DPx7uDGi1QWM3dnzNsAjs7tgt 92wRHyvDni4WfPKvBxR162LxAijXQhmbQzNLLC3bQ5RP2J7MypIXxe9oUoyZ2eF/g5FsFK n6HYwKSf1iHiEXBIcuB+0upbBwd8hYpqbNLU/lWvZ2PIYOG/pG17ZpPO3lNm8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976723; 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=ZN1bje9JpWp1V34m0xAG2aw4i/VCOYGvP4gu/RFqfoY=; b=utdiloIQ1SOKS+Bwylzja+xid+5p8rFoacCwooDT82aPUu6Pyajw7DPXrAUfIc2bzdvTlg +rw5ajd4KFsv9bxdnhFWsoiMcxhCB6fsnFPtAGdFISNZdWpgsJXxAfU7mNprMHhvKdiKVv +nITcoTtejt678LSxgbDvwUPbg49f0JL+k24iSjeoWV6MFSl+shdNyzBeOMQ8C9wZLQtAA tnT8sf95orLW8D4af723kXXMwCMF4T3LXNALjbzD0eBYW6VBOUthC1n6yX30g9l3vy+Ojk wqraxHfQvOpD8CC81KaihYKI5Fo+Evr5w4i7Y7jX6noxE1JGGXYC0YR+MDP5RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976723; a=rsa-sha256; cv=none; b=lzT3DX+CKS2OpDCPhoIQIe1Y8kW0DC3a2n55Z6uqmPhJf6IjUhFuoaIdwoOp6KI9zZJail RcID11WpMPQRxmAdogWjll67sc8CUw9sxzRZGV8KpvPx+d+POJGpTwTVsKpXHFouWEV34i UfCN0HCLPvJi5B3o0gu38jJxJH5KD50tsBQ55+bDGQk/+7tjav1FdzR9PinHvHiBexwrx7 iRu+0Mo/SS6Vysw7s+3ro8L0lKzSU2zpRbwJzcfwp3Q8IsGyDURvQUIjgYsgx8HmxSSZVe jtwYEmIqMyyXrkr4NoWtgQNEHtPMG3HWGKhBAz3g7b4SgqsWVnya/ruf8+VKnw== 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 4Xslwf6W4jz12wf; Tue, 19 Nov 2024 00:38:42 +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 4AJ0cgCr083937; Tue, 19 Nov 2024 00:38:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0cgFu083934; Tue, 19 Nov 2024 00:38:42 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:42 GMT Message-Id: <202411190038.4AJ0cgFu083934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8c6df7ead19c - releng/14.2 - release: add wifi-firmware-kmod@release to ship as package List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 8c6df7ead19cae1e1d799c3e5576a2d792c74b13 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8c6df7ead19cae1e1d799c3e5576a2d792c74b13 commit 8c6df7ead19cae1e1d799c3e5576a2d792c74b13 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:47:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:40 +0000 release: add wifi-firmware-kmod@release to ship as package Add the flavored port for all the supported wireless drivers we recently added support for. Sponsored by: The FreeBSD Foundation Pointed out by: cperciva (as part of the set of changes) Reviewed by: cperciva (#releng) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47406 (cherry picked from commit 2483a2d36803896d27861c03e1f53dd9546b1e73) (cherry picked from commit f21cb43c91ef5ff54173b15f550e711c9f87eec6) --- release/scripts/pkg-stage.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 5742f84b0258..8f96bd5cf5a1 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -19,6 +19,7 @@ graphics/drm-515-kmod misc/freebsd-doc-all net/mpd5 net/rsync +net/wifi-firmware-kmod@release ports-mgmt/pkg shells/bash shells/zsh From nobody Tue Nov 19 00:38:43 2024 X-Original-To: dev-commits-src-branches@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 4Xslwh33zgz5dGnp; Tue, 19 Nov 2024 00:38:44 +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 4Xslwh14FTz4jdb; Tue, 19 Nov 2024 00:38:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976724; 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=pZrvPl8YaCI4AsKRJP2WbzRHauTPBIGPcBmwMuJQcdI=; b=nEP98sbVwsUhjhhlGCTYjoXcf2ngfiwAR9UwndME9qoeUHlC6Y2xW/kIsT71pw3nkLNE2N KFYYBSp/nlFbdOCMo1oOMw4YI6Zs13SGWEMrWMmmB8EoHUoG4HEzzLi24o5O87d0W5m9q9 FiA9rzDeBXYQsYgCOoskzWxY83QNMakiCO+rZksfNhc+G6+zT8rXfpxy+/Ds5S6B3WvFHj MBR87zcaDFcIu45VeJLoQz9KQ68tVBDfhHwqYu5G++bMRIZA82RiB7/+4gOg5A27jgEAEy B3A+OyzstJHI0g6hv63DsWe9GcpmbuwZzVnifEoTRtSkQwKUjRAlJoh9GGmdbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976724; 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=pZrvPl8YaCI4AsKRJP2WbzRHauTPBIGPcBmwMuJQcdI=; b=rM2UQyJvtKkpw7tbCVSsn3IZUzcC3Koc1V/GtCWmCgZZDQdOIoztRpxkIFhMbVCu+j/aJL pYaH20iu2LMjT60CmNacakCdgT5lg8xPAhIK0C/4sZl1CXhGM21uBTLBNIee0f66TVE4ds WWdBDqT9x2Od0wFHFaGIQpTRRg1VBWF9ajVRkOyAaCVKRu9XBAkJAn2zPJs9MACG/rc7zA nZYGuNzFa6Xm7AOeBwztmNQ/Qn5mcusP1+S8sDSDfT1SHo9WdiulCHpJK0tWUQm7NmMVg8 H3g/LbLL+uJX4WHeo3ThcGdEEgaegzAQOHPh0Zvtgxe6nhTmKFywFwlE3AXDcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976724; a=rsa-sha256; cv=none; b=AN9xPaeFrd/ZSaT113oiSgcxOYtieN25dr4X+SXDFVh9ieCJk8+9mmHVHiCp8lX7rnsf9B lds0AlVTBHx59Xna2ex73tlCZ0aq9qsy4PiNwmTs391SDxdMtMfs5nbse4ubUeiXsYYb4A kK7OLN+MuP6mhx4pol+45xi8s1JWn2kFva0fCxW6pVetD5Ze0IsseU7ptpvES3qZU4wKas Bjk9SpCa9xDPxmsUW9hXvY2k4S6qzeVP35vO2vhMinIpHCrvrMhbmsUlj4Qo2jCxHTeQFu oaCMgiQN/mBgPTL3QCRKSe8W4FKGPl9KrkubuuzBfkkdRx3+r+tuecP0BC5vdg== 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 4Xslwg75p9z132c; Tue, 19 Nov 2024 00:38:43 +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 4AJ0chce083993; Tue, 19 Nov 2024 00:38:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0chxq083990; Tue, 19 Nov 2024 00:38:43 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:43 GMT Message-Id: <202411190038.4AJ0chxq083990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dc647e4df990 - releng/14.2 - fwget: add -q for quiet output List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: dc647e4df9900eae1611803ba481d9cc355fc5e3 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dc647e4df9900eae1611803ba481d9cc355fc5e3 commit dc647e4df9900eae1611803ba481d9cc355fc5e3 Author: Bjoern A. Zeeb AuthorDate: 2024-11-04 23:59:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:49 +0000 fwget: add -q for quiet output Introduce -q to quieten other output (unless -v is also given). pkg-install(8) currently has no option to allow skipping unavail packages but it will just fail. We would realy want to try to install as much firmware found as possible from the installer. Work around this by doing one firmware package at a time. For that it is highly helpful to be able to query (or possibly re-query) all outstanding fimrware packages. -q together with -n only shows each package to be installed one by line. Once https://github.com/freebsd/pkg/issues/2195 will be implemented we could undo this part of the change and future changes to the installer and use the new option for pkg-install(8) there. While here switch to getopts so -qn works and not just -q -n. Sponsored by: The FreeBSD Foundation Reviewed by: manu Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47445 (cherry picked from commit 1eb3f15c149b9a2e5b6f5e10aed454fc85945bbd) (cherry picked from commit 814a49d65ace83b7a955cca32ff243f4abe7cd50) --- usr.sbin/fwget/fwget.sh | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh old mode 100644 new mode 100755 index 154fb7dc92e1..3e2181e53b73 --- a/usr.sbin/fwget/fwget.sh +++ b/usr.sbin/fwget/fwget.sh @@ -38,7 +38,8 @@ Supported subsystems pci Options: - -n -- Do not install package, only print the results + -n -- Do not install packages, only print the results + -q -- Quiet mode. If used with -n only prints a package a line -v -- More verbose EOF exit 1 @@ -75,22 +76,27 @@ addpkg() } DRY_RUN=n +QUIET=n VERBOSE=n -while [ $# -gt 0 ]; do - case $1 in - -n) - DRY_RUN=y - ;; - -v) - VERBOSE=y - ;; - *) - subsystems="${subsystems} $1" - ;; +while getopts ":nqv" _arg; do + case ${_arg} in + n) + DRY_RUN=y + ;; + q) + QUIET=y + ;; + v) + VERBOSE=y + ;; + ?) + usage + ;; esac - shift done +shift $(($OPTIND - 1)) +subsystems="$@" # Default searching PCI subsystem if [ -z "${subsystems}" ]; then @@ -112,13 +118,25 @@ done case "${packages}" in ""|^[[:space:]]*$) - echo "No firmware packages to install." + if [ "${QUIET}" != "y" ]; then + echo "No firmware packages to install." + fi exit 0 ;; esac -echo "Needed firmware packages: '${packages}'" +if [ "${QUIET}" != "y" ]; then + echo "Needed firmware packages: '${packages}'" +fi if [ "${DRY_RUN}" = "y" ]; then + if [ "${QUIET}" = "y" ]; then + for pkg in ${packages}; do + case "${pkg}" in + ""|^[[:space:]]*$) continue ;; + esac + echo "${pkg}" + done + fi exit 0 fi From nobody Tue Nov 19 00:38:44 2024 X-Original-To: dev-commits-src-branches@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 4Xslwj5b0pz5dGrW; Tue, 19 Nov 2024 00:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xslwj18MNz4jgy; Tue, 19 Nov 2024 00:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976725; 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=UpEcNlU+i3Gf+uu/FGWVkstFugboaS4vZlzaxz1g038=; b=FnHfjQPI3APiouKlj8WAjwoCF0Pv0mF8qDlG4GhxktuPqD0ZOoUHQ7QGQDp5okMcsVcB1t 1aaNLVSUMf4+WnNOdjVGZh6p0f6/sJ18kdzmnLKbZAN4ailNlfWczt+7pjiwYyzaXfHq51 Bfle3BEtiqcUMheJrTNpRek4vqrboHWAyxkF03oRDJuXJ6yy70Lt22g0MXz+8owsU3a6k2 n+GaudnCTmaDCzB6t8pNg0PxortMAbtJzQlLStSMVQSj3Ls1CrOQ9uOkR5pRlf9HaUvEPo iqYUScP6LgnxHnEJAhWSAq3pyTVoOimZ/HnPxV3SpYauM6anygxqjbIQqrbf1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731976725; 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=UpEcNlU+i3Gf+uu/FGWVkstFugboaS4vZlzaxz1g038=; b=ytvSHYxk5EwIdrBqAQhjj2i9tL+1A46x05p/E/EKl+/XO7l1A62MBMkf6GNdEOj3GwupbQ RgVVjFgBxfOLwMX7C3ivETyoB22UjBCTiloHcxvZcm2fItoF5IOmAgncs4EboGhPHbkZUD FUsXTvEuzvrvheBAdfkLJdyLoTRgnJxgKPHEDSqrPYAj1VI2QxmWjobRoJguOrO9lCYlMq 2aP5TRdIkSlpg+bejaKbz46DwpPfYsm60TI1efWDntMLplXd2ZBj8kiPWZe8Xe28rePczM VRVEfWRRYntlvRJLg3hwcOFQ4Fotx8jDfSNFLlry8iDybDmcS4mQSuIapJ21Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731976725; a=rsa-sha256; cv=none; b=PwZNn/otUFhcS4VsQjWSz69+pURxUi7hlGktTfeZVpn6ZYU9gPpMEjqo+aw6GdMxOMrfzz 6Z/6yIQob4PRert04K7zRsmxrOonFtoKxpktBYunASNPS/r6cYazYE9z7IKrzc3LkTc/9G xVbFmSRtrqpjViWWb8TSu9pO7fzvHq2XFwJ4Gwfbv141++xWY0+fmmtO4T9IRACqRRTe83 kn/bug0vs8c2aHI8ai8CioE5saghI4hUdKZhoX3B4ykAqFZ7KBXz2YZtaM6F0zgmcMV8/S cdY8zlYrWPeHgOyEH3dAg2tQML/dpXZhVJKH8SOkVB2OdYKT5MwUBQXtCfSCLQ== 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 4Xslwj0RwKz12WR; Tue, 19 Nov 2024 00:38:45 +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 4AJ0cj6r084055; Tue, 19 Nov 2024 00:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ0ciaA084052; Tue, 19 Nov 2024 00:38:44 GMT (envelope-from git) Date: Tue, 19 Nov 2024 00:38:44 GMT Message-Id: <202411190038.4AJ0ciaA084052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5252ae96ad2d - releng/14.2 - man4: wifi manuals: revise .Sh HARDWARE + polish some List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 5252ae96ad2df7d812d4e9689cb234b036dc7a98 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5252ae96ad2df7d812d4e9689cb234b036dc7a98 commit 5252ae96ad2df7d812d4e9689cb234b036dc7a98 Author: Alexander Ziaee AuthorDate: 2024-11-10 19:28:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-19 00:36:55 +0000 man4: wifi manuals: revise .Sh HARDWARE + polish some The Release Hardware Notes are generated from hardware sections in the manual pages. Create or organize these sections in Wi-Fi driver manuals for information flow, and perform minor maintenance on them while here. After some testing, we have determined that a compact column list is the best for a single column listing in the hardware release notes. This makes very clean subsections and is for some reason denser than using a tagged list. This adds the long requested conversion from netmask to cidr examples. These examples probably shouldn't even be here, but that is a discussion for another day. Reported by: bz (relnotes generation, cidr, test-net-1 ip4addr) Reported by: grahamperrin (HARDWARE order mentioned in fdp-primer) Reported by: Graham Percival (don't prompt) Reviewed by: bz (anything wrong likely is my polishing fault; incl. iwm.4) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47508 (cherry picked from commit 8f1a2d507e25e77d20a5d7675dc8eee9b83d3570) (cherry picked from commit 93b30f1b6caec5083efacf3fb5049b72e75cc09e) (cherry picked from commit 6c140ba1266b7957e1c2861e6ce41d9b88381f8a) --- share/man/man4/ipw.4 | 39 +++++---- share/man/man4/iwi.4 | 47 +++++++---- share/man/man4/iwlwifi.4 | 67 ++++++++++----- share/man/man4/iwm.4 | 96 ++++++++++++--------- share/man/man4/mt7915.4 | 38 ++++++--- share/man/man4/mt7921.4 | 38 ++++++--- share/man/man4/otus.4 | 94 +++++++++++++-------- share/man/man4/ral.4 | 27 +++--- share/man/man4/rsu.4 | 83 ++++++++++-------- share/man/man4/rtw88.4 | 60 +++++++------ share/man/man4/rtw89.4 | 63 ++++++++------ share/man/man4/rtwn.4 | 104 ++++++++++++++--------- share/man/man4/rtwn_pci.4 | 26 ++++-- share/man/man4/rtwn_usb.4 | 21 +++-- share/man/man4/rum.4 | 23 ++--- share/man/man4/run.4 | 211 ++++++++++++++++++++++++++++++---------------- share/man/man4/ural.4 | 30 ++++--- share/man/man4/urtw.4 | 44 +++++----- share/man/man4/zyd.4 | 147 +++++++++++++++++++++----------- 19 files changed, 777 insertions(+), 481 deletions(-) diff --git a/share/man/man4/ipw.4 b/share/man/man4/ipw.4 index c1010b798290..0ebee0f1e6eb 100644 --- a/share/man/man4/ipw.4 +++ b/share/man/man4/ipw.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IPW 4 .Os .Sh NAME .Nm ipw -.Nd "Intel PRO/Wireless 2100 IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2100 IEEE 802.11a/b driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -57,19 +60,14 @@ legal.intel_ipw.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for the -.Tn Intel -PRO/Wireless 2100 MiniPCI network adapter. -.Nm -supports +driver provides support for Intel PRO/Wireless 2100 802.11a/b +wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm ipwfw @@ -80,28 +78,34 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_ipw.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for the +Intel PRO/Wireless 2100a/b MiniPCI network adapter. .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_ipw.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_ipw.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_ipw.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev ipw0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev ipw0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev ipw0 ssid my_net up" +.Dl ifconfig wlan create wlandev ipw0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev ipw0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -144,6 +148,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwi.4 b/share/man/man4/iwi.4 index 9de9b3e6c490..31ef4ec83d32 100644 --- a/share/man/man4/iwi.4 +++ b/share/man/man4/iwi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 15, 2015 +.Dd November 10, 2024 .Dt IWI 4 .Os .Sh NAME .Nm iwi -.Nd "Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 driver" +.Nd Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -57,19 +60,14 @@ legal.intel_iwi.license_ack=1 .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -PRO/Wireless 2200BG/2915ABG MiniPCI and 2225BG PCI network adapters. -.Nm -supports +driver provides support for Intel PRO/Wireless 2200BG/2225BG/2915ABG +IEEE 802.11a/b/g wireless network devices in .Cm station , .Cm adhoc , and .Cm monitor mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . .Pp This driver requires the firmware built with the .Nm iwifw @@ -80,28 +78,42 @@ must be agreed by adding the following line to .Xr loader.conf 5 : .Pp .Dl "legal.intel_iwi.license_ack=1" +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports the following wireless network devices: +.Pp +.Bl -bullet -compact +.It +Intel PRO/Wireless 2200BG MiniPCI Network Connection +.It +Intel PRO/Wireless 2225BG PCI Network Connection +.It +Intel PRO/Wireless 2915ABG MiniPCI Network Connection +.El .Sh FILES -.Bl -tag -width ".Pa /usr/share/doc/legal/intel_iwi.LICENSE" -compact +.Bl -tag -width "/usr/share/doc/legal/intel_iwi.LICENSE" -compact .It Pa /usr/share/doc/legal/intel_iwi.LICENSE .Nm firmware license .El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwi0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwi0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwi0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwi0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwi0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -149,6 +161,7 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh AUTHORS diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index ddeeb549d0f4..b4dce91f1ee4 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2021-2024 The FreeBSD Foundation .\" .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from @@ -25,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt IWLWIFI 4 .Os .Sh NAME @@ -54,11 +56,11 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from Intel's Linux iwlwifi driver +driver provides support for Intel Wireless network devices. .Pp .Nm -will be a successor to -.Xr iwm 4 +is derived from Intel's Linux iwlwifi driver, will be a successor to +.Xr iwm 4 , and may supersede that driver in the future. It still complements the .Xr iwn 4 @@ -66,33 +68,51 @@ driver which supports older chipsets. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac/ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. 802.11ax and 6Ghz support are planned. .Sh HARDWARE The .Nm driver supports PCIe devices from the -.Em mvm -sub-driver with the following chipsets: +.Sy mvm +sub-driver with the following chipset generations: .Pp +.\" awk -F\\t '{ print $5 }' ~/tmp/iwlwifi_pci_ids_name.txt | \ +.\" grep -v undefined | sort -V | uniq | grep -v ^$ | \ +.\" awk '{ printf ".It\n%s\n", $0 }' .Bl -bullet -compact -.\" --------------------------------------------------------------------- +.It +7000 +.It +8000 +.It +9000 +.It +22000 +.It +AX210 +.It +BZ +.It +SC +.El +.Pp +These chipset generations match the following common device names: +.Pp +.Bl -bullet -compact +.\" -------------------------------------------------------------------- .\" This list is manually generated from a sysctl and post-processing. .\" Edits will be overwritten on next update. -.\" --------------------------------------------------------------------- +.\" awk -F\\t '{ if ($2 == "") { next; } if (seen[$2]) { next; } \ +.\" seen[$2]=1; printf ".It\n%s\n", $2; }' iwlwifi_pci_ids_name.txt +.\" -------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -209,15 +229,15 @@ Intel(R) TBD Bz device Intel(R) Wi-Fi 6 AX204 160MHz .It Intel(R) TBD Sc device -.\" --------------------------------------------------------------------- +.\" -------------------------------------------------------------------- .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr iwlwififw 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -225,3 +245,12 @@ The .Nm driver first appeared in .Fx 13.1 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. +802.11ax and 6Ghz support are planned. diff --git a/share/man/man4/iwm.4 b/share/man/man4/iwm.4 index b810f7016e54..5249959cd3f6 100644 --- a/share/man/man4/iwm.4 +++ b/share/man/man4/iwm.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2004-2006 .\" Damien Bergamini . All rights reserved. .\" @@ -23,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 20, 2024 +.Dd November 10, 2024 .Dt IWM 4 .Os .Sh NAME @@ -31,8 +34,7 @@ .Nd Intel IEEE 802.11ac wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, -include the following lines in your -kernel configuration file: +include the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device iwm" .Cd "device pci" @@ -79,55 +81,59 @@ iwm9260fw_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Intel Dual Band Wireless AC 3160 -.It Intel Dual Band Wireless AC 3165 -.It Intel Dual Band Wireless AC 3168 -.It Intel Dual Band Wireless AC 7260 -.It Intel Dual Band Wireless AC 7265 -.It Intel Dual Band Wireless AC 8260 -.It Intel Dual Band Wireless AC 8265 -.It Intel Dual Band Wireless AC 9260 -.It Intel Dual Band Wireless AC 9270 -.It Intel Dual Band Wireless AC 946X -.It Intel Dual Band Wireless AC 9560 -.El -.Pp -.Nm -supports +driver supports running most Intel Wireless AC series network devices in .Cm station mode operation. Only one virtual interface may be configured at any time. -For more information on configuring this device, see -.Xr ifconfig 8 . -.Pp This driver requires the firmware built with the -.Nm iwmfw +.Xr iwmfw 4 module to work. .Pp -Currently, +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The .Nm -only supports 802.11b and 802.11g modes. -It will not associate to access points that are configured to operate only -in 802.11n or 802.11ac modes. +driver supports the following PCIe Wi-Fi devices: +.Pp +.Bl -bullet -compact +.It +Intel Dual Band Wireless AC 3160 +.It +Intel Dual Band Wireless AC 3165 +.It +Intel Dual Band Wireless AC 3168 +.It +Intel Dual Band Wireless AC 7260 +.It +Intel Dual Band Wireless AC 7265 +.It +Intel Dual Band Wireless AC 8260 +.It +Intel Dual Band Wireless AC 8265 +.It +Intel Dual Band Wireless AC 9260 +.It +Intel Dual Band Wireless AC 9270 +.It +Intel Dual Band Wireless AC 946X +.It +Intel Dual Band Wireless AC 9560 +.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev iwm0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev iwm0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev iwm0 ssid my_net up" +.Dl ifconfig wlan create wlandev iwm0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev iwm0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Pp Join a specific BSS network with 128-bit WEP encryption: @@ -155,15 +161,16 @@ Verify the .Xr iwmfw 4 firmware module is present. .It "iwm%d: could not load boot firmware" -An attempt to upload the boot firmware image to the onboard microcontroller -failed. +An attempt to upload the boot firmware image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load microcode" -An attempt to upload the microcode image to the onboard microcontroller failed. +An attempt to upload the microcode image +to the onboard microcontroller failed. This should not happen. .It "iwm%d: could not load main firmware" -An attempt to upload the main firmware image to the onboard microcontroller -failed. +An attempt to upload the main firmware image +to the onboard microcontroller failed. This should not happen. .El .Sh SEE ALSO @@ -174,5 +181,12 @@ This should not happen. .Xr wlan_ccmp 4 , .Xr wlan_tkip 4 , .Xr wlan_wep 4 , +.Xr networking 7 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 +.Sh BUGS +Currently, +.Nm +only supports 802.11a/b/g modes. +It will not associate to access points that are configured to operate +only in 802.11n/ac modes. diff --git a/share/man/man4/mt7915.4 b/share/man/man4/mt7915.4 index eece142c11a5..ba67a77af735 100644 --- a/share/man/man4/mt7915.4 +++ b/share/man/man4/mt7915.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7915 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7915E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7915E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7915E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is yet to come. diff --git a/share/man/man4/mt7921.4 b/share/man/man4/mt7921.4 index d28dc520de6b..fe9efa77e35d 100644 --- a/share/man/man4/mt7921.4 +++ b/share/man/man4/mt7921.4 @@ -1,4 +1,6 @@ .\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2023-2024 Bjoern A. Zeeb .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 30, 2024 +.Dd November 10, 2024 .Dt MT7921 4 .Os .Sh NAME @@ -50,7 +52,9 @@ It is discouraged to load the driver from .Sh DESCRIPTION The .Nm -driver is derived from MediaTek's Linux mt76 driver. +driver provides support for MediaTek MT7921E wireless network devices. +.Nm +is derived from MediaTek's Linux mt76 driver. .Pp This driver requires firmware to be loaded before it will work. The package @@ -62,36 +66,34 @@ Otherwise no .Xr wlan 4 interface can be created using .Xr ifconfig 8 . +One can use +.Xr fwget 8 +to install the correct firmware package. .Pp The driver uses the .\" No LinuxKPI man pages so no .Xr here. -.Em linuxkpi_wlan +.Sy linuxkpi_wlan and -.Em linuxkpi +.Sy linuxkpi compat framework to bridge between the Linux and native .Fx driver code as well as to the native .Xr net80211 4 wireless stack. -.Pp -While -.Nm -supports all 802.11 a/b/g/n/ac and ax -the compatibility code currently only supports 802.11 a/b/g modes. -Support for 802.11 n/ac is to come. .Sh HARDWARE The .Nm driver supports PCIe devices with the following chipsets: .Pp -.Bl -tag -width Ds -offset indent -compact -.It MediaTek MT7921E +.Bl -bullet -offset indent -compact +.It +MediaTek MT7921E .El -.Sh BUGS -Certainly. .Sh SEE ALSO .Xr wlan 4 , +.Xr networking 7 , +.Xr fwget 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY @@ -99,3 +101,11 @@ The .Nm driver first appeared in .Fx 14.0 . +.Sh BUGS +Certainly. +.Pp +While +.Nm +supports 802.11a/b/g/n/ac/ax modes, +the compatibility code currently only supports 802.11a/b/g modes. +Support for 802.11n/ac/ax is to come. diff --git a/share/man/man4/otus.4 b/share/man/man4/otus.4 index 1e2d1e0a402f..06f73bfe3338 100644 --- a/share/man/man4/otus.4 +++ b/share/man/man4/otus.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: ISC .\" .\" Copyright (c) 2015 Adrian Chadd .\" @@ -13,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 25, 2015 +.Dd November 10, 2024 .Dt OTUS 4 .Os .Sh NAME .Nm otus -.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -79,6 +81,51 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for Atheros AR9170 USB IEEE 802.11b/g/n +wireless network adapters, including: +.Pp +.Bl -bullet -offset indent -compact +.It +3Com 3CRUSBN275 +.It +Arcadyan WN7512 +.\" .It AVM FRITZ!WLAN USB Stick N +.It +CACE AirPcap \&Nx +.It +D-Link DWA-130 rev \&D1 +.It +D-Link DWA-160 rev A1 +.It +D-Link DWA-160 rev A2 +.It +IO-Data WN-GDN/US2 +.It +NEC Aterm WL300NU-G +.It +Netgear WNDA3100 +.It +Netgear WN111 v2 +.It +Planex GW-US300 +.It +SMC Networks SMCWUSB-N2 +.It +TP-Link TL-WN821N v1, v2 +.It +Ubiquiti SR71 USB +.It +Unex DNUA-81 +.It +Z-Com UB81 +.It +Z-Com UB82 +.It +ZyXEL NWD-271N +.El .Sh FILES The driver needs at least version 1.0 of the following firmware files, which is loaded when an interface is attached: @@ -87,49 +134,20 @@ which is loaded when an interface is attached: .It Pa /boot/kernel/otusfw-init.ko .It Pa /boot/kernel/otusfw-main.ko .El -.Sh HARDWARE -The -.Nm -driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n -wireless network adapters, including: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It 3Com 3CRUSBN275 -.It Arcadyan WN7512 -.\" .It AVM FRITZ!WLAN USB Stick N -.It CACE AirPcap \&Nx -.It D-Link DWA-130 rev \&D1 -.It D-Link DWA-160 rev A1 -.It D-Link DWA-160 rev A2 -.It IO-Data WN-GDN/US2 -.It NEC Aterm WL300NU-G -.It Netgear WNDA3100 -.It Netgear WN111 v2 -.It Planex GW-US300 -.It SMC Networks SMCWUSB-N2 -.It TP-Link TL-WN821N v1, v2 -.It Ubiquiti SR71 USB -.It Unex DNUA-81 -.It Z-Com UB81 -.It Z-Com UB82 -.It ZyXEL NWD-271N -.El .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): -.Bd -literal -offset indent -ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e - netmask 0xffffff00 -.Ed +.Pp +.Dl ifconfig wlan create wlandev otus0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Pp -.Dl "ifconfig wlan create wlandev otus0 ssid my_net up" +.Dl ifconfig wlan create wlandev otus0 ssid my_net up .Pp Join a specific BSS network with 64-bit WEP encryption: .Bd -literal -offset indent ifconfig wlan create wlandev otus0 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 up + wepmode on wepkey 0x1234567890 weptxkey 1 up .Ed .Sh DIAGNOSTICS .Bl -diag @@ -152,7 +170,9 @@ The file might be missing or corrupted. The .Nm driver first appeared in -.Ox 4.6 . +.Ox 4.6 +and +.Fx 11 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/ral.4 b/share/man/man4/ral.4 index dbdc017dc33a..ad385e5f09d6 100644 --- a/share/man/man4/ral.4 +++ b/share/man/man4/ral.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" Copyright (c) 2005-2010 Damien Bergamini .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,12 +15,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 4, 2017 +.Dd November 10, 2024 .Dt RAL 4 .Os .Sh NAME .Nm ral -.Nd "Ralink Technology IEEE 802.11a/g/n wireless network device" +.Nd Ralink Technology IEEE 802.11a/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -119,7 +122,7 @@ The driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including: .Pp -.Bl -column -compact ".Li Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" +.Bl -column -offset indent -compact "Atlantis Land A02-PCM-W54" "RT2561S" "CardBus" .It Em Card Ta Em MAC/BBP Ta Em Bus .It "A-Link WL54H" Ta RT2560 Ta PCI .It "A-Link WL54PC" Ta RT2560 Ta CardBus @@ -212,26 +215,25 @@ chipsets, including: .Sh EXAMPLES Join an existing BSS network (i.e., connect to an access point): .Pp -.Dl "ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00" +.Dl ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 .Pp Join a specific BSS network with network name -.Dq Li my_net : +.Ar my_net : .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net .Ed .Pp Join a specific BSS network with 40-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e - wepmode on wepkey 0x1234567890 weptxkey 1 +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 .Ed .Pp Join a specific BSS network with 104-bit WEP encryption: .Bd -literal -offset indent -ifconfig wlan create wlandev ral0 inet 192.168.0.20 \e - netmask 0xffffff00 ssid my_net \e +ifconfig wlan create wlandev ral0 inet 192.0.2.20/24 \e + ssid my_net \e wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 .Ed .Sh DIAGNOSTICS @@ -254,6 +256,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr networking 7 , .Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 diff --git a/share/man/man4/rsu.4 b/share/man/man4/rsu.4 index 34cebc598c0a..7aaacb8112a0 100644 --- a/share/man/man4/rsu.4 +++ b/share/man/man4/rsu.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: ISC +.\" .\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini @@ -14,12 +17,12 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 23, 2021 +.Dd November 10, 2024 .Dt RSU 4 .Os .Sh NAME .Nm rsu -.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -93,8 +96,46 @@ The .Nm driver can be configured at runtime with .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm *** 1326 LINES SKIPPED *** From nobody Tue Nov 19 01:45:59 2024 X-Original-To: dev-commits-src-branches@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 4XsnQH5Jr0z5dMWC; Tue, 19 Nov 2024 01:45:59 +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 4XsnQH4v4lz4vB4; Tue, 19 Nov 2024 01:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731980759; 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=4NCTw3yL4gNxrFrh8y+tLw1Frc43G6wO3pkSMxvOdpQ=; b=vkA87D9fMj8ugqZh0Jg3fiZ/G5BvAGj1F0yEDhR/Re89sixERH37tSBqvc86Q96/IQzEhl Ot8dGiEZjX39UK+Xrcs9dcilR5cfnmR35t+ZEGvZJAM2TudOzxAGFSCDLfjiELfIaC6Rpy GVIBrSNLmkFrCUHdx/ohyKswr2M2qazTJTKOT6r57UniHfa+vPLOzEoJhCD3QeIDf8PjHk 70bDwVPPjJGNm2f70upXEqRKWD4lXpCmdO5DiSNFYbpIx/5oHIwrY+D/+fVniB7sN02aJs 07PEPPq2zeGTEZbdooiaENwPUztuwQH8anvuDuM3GCHFf6UiVMTVmhR5ZdDO1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731980759; 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=4NCTw3yL4gNxrFrh8y+tLw1Frc43G6wO3pkSMxvOdpQ=; b=E543qutOdNlwKMAiY4xHzu3Xpg1xkNMEV02eORBMbFPfLjW50d3nEQRYBr7WRpEmSiRUzp /OfgziXRLCPASUkpvqMTCuZJUbDZU0wv8RRCvafUY5DqYCgRiSa/tlsTOnmmZvsrpan2wZ o6PTy5r35aGXmWWYjPjEckh4exCrYztsoUSit9WfGKJbXJqdywwQoXTaeZnMxUz2QGdnfS yGaZeahy/Y8+rgEcHMpPtuwzMbaR90L7HSJj8/GDFtoingUro30cHQvVm5VOTfsFE63f3Y 7b6VfxKy+yZaOHOSIK5pjOgP3SoRlHyO9HerFPp7MUk2K2DF1Bwo5iUFZeGDig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731980759; a=rsa-sha256; cv=none; b=m6RDIiru1Z2JfHv1WwOsBfeF0TeHRvCHLDRKfySK7sTcpzk6GCCTgBJw8bORmz6uRKixF1 NdXHOkblNK4tcEZC62X45MYC2FoVi8XEKVQbpoecpaFV1kvIRvmz1ca28R91dndB6ZGwfg 58+PeiHwVbaaptMItSrbNVh5esYPPlqVS9nYf+mGt+vCQ0Q/EmdlSRu+jhJObaKHzh7gz4 mNNRUBXQ8q22Pt7Q/Sy2pYV61dLe/H85/94E7Ae3VBGReM5T8OhvWVnAdI8js6GKV47nhA J4ysuhwo2KnoWy6N10ecIgnSrODh/8zgKg5FJyT0NwhJDUBKItVvrpekvSu7jA== 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 4XsnQH4VRzz14t5; Tue, 19 Nov 2024 01:45:59 +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 4AJ1jxI7013474; Tue, 19 Nov 2024 01:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ1jxvX013471; Tue, 19 Nov 2024 01:45:59 GMT (envelope-from git) Date: Tue, 19 Nov 2024 01:45:59 GMT Message-Id: <202411190145.4AJ1jxvX013471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 2fb5f137668c - stable/14 - sound: Include ai2s and davbus for PowerPC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2fb5f137668c56bce084b5dda948724be96cf15e Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2fb5f137668c56bce084b5dda948724be96cf15e commit 2fb5f137668c56bce084b5dda948724be96cf15e Author: Jose Luis Duran AuthorDate: 2024-11-10 02:44:14 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 01:19:20 +0000 sound: Include ai2s and davbus for PowerPC Include PowerPC ai2s and davbus sound modules in the metadriver. Reviewed by: christos, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47467 (cherry picked from commit cdd3234186b19e1b9d7cfc985ef8d247552b0f11) --- sys/dev/sound/driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/sound/driver.c b/sys/dev/sound/driver.c index b9d530dce921..7fcc86c63c5e 100644 --- a/sys/dev/sound/driver.c +++ b/sys/dev/sound/driver.c @@ -55,6 +55,9 @@ static moduledata_t snd_mod = { DECLARE_MODULE(snd_driver, snd_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_VERSION(snd_driver, 1); +#if defined(__powerpc__) +MODULE_DEPEND(snd_driver, snd_ai2s, 1, 1, 1); +#endif MODULE_DEPEND(snd_driver, snd_als4000, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_atiixp, 1, 1, 1); #if defined(__i386__) || defined(__amd64__) @@ -63,6 +66,9 @@ MODULE_DEPEND(snd_driver, snd_cmi, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_cs4281, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csa, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_csapcm, 1, 1, 1); +#if defined(__powerpc__) +MODULE_DEPEND(snd_driver, snd_davbus, 1, 1, 1); +#endif MODULE_DEPEND(snd_driver, snd_emu10kx, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_envy24, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_envy24ht, 1, 1, 1); From nobody Tue Nov 19 02:39:03 2024 X-Original-To: dev-commits-src-branches@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 4XspbW34kcz5dQsq; Tue, 19 Nov 2024 02:39:03 +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 4XspbW2Cybz4113; Tue, 19 Nov 2024 02:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983943; 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=uvVvydrlnCu76S1b7170Jv6TpIXy+VPfihojEoSQCXU=; b=diCM/PyAcE7mA8ezP/jjIFzdLkdOSTPTlGkNYY3cFWkQU8SZcScN2ZYn9L5TjvtYnlCktm IWSWffhS231hxnBZ86fOOBGylfpwwbirefdpYY3jqufFVHaFR/IJAf+0/F4Q3ZKV+mFGHq taMOMlWjFY2INRFcKEjp4j0VpCrlFyPh4CfxFYSO9M5ST5fMCqN0qHEnDQ4eIdz9AvCYHh xDJgXndccxDlaDXDCgyFWeDl72crow019jTT1O+bp3wa8w/XmCj8+5HqfhfTGdOMkcV+lc trC98Zbow/vQqIEPfwPNs3dXvt0pNx587E7bhT39hpGwMQePrgrgZZIS3/9vBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983943; 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=uvVvydrlnCu76S1b7170Jv6TpIXy+VPfihojEoSQCXU=; b=UbHo79+mD8h9f5gsoXNEEtoL058SV4PGYklAkWO10fBDw2j2O9df3wp302Z8ecH6XjTcOf 2eJ3DRXVWzM+nuWuubZRFb4+il4bWqNplPNssmxIgsXIJB+h3U+wD76OzBmp5uT8FlYtDF suk5TzJiNn5dlGByXvXIzRvnell3dD6e1i/akmCdzt+zmJx3tI3bj+FGZSkbnEytvHxTZr W7SmY11RiiwqSmtTP3r9PdR26IASCvh2OHD6G7aQ82tuDQ1BSDXXsyJbCtZTkyu+QqAj/z yiO2nkkymuVhEmRJ/oNYFJXjDYixhFWIchKsTOVd1Tr/fY9VFTiopLJKsvvZsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731983943; a=rsa-sha256; cv=none; b=KtZYv3aTiyq1U0dYGOxk4dg/0AcL1GWIc8KImuhOG6cNZ/HGOJBtTuwOSHbPC+Ik/J+ndx IhTAubXlSST1rlJqIjv0tnwhNHJpRwKtupcZMyPetwaO6SdCvezrqGK7QW2sDqwT05CPMw UGxUUBi/mcDmX/5NI6T/xmitLCCcbMi5QCYf1W93dFQkbcUfAUJWR2yZoM1aYM4SeUN9eL OlVKBQGW/hyM3LrFpSgi/B2nbBJln37Ysx1JfubN2KdRCuG5ed7XHJSD+8rc4pj57uB5VX OBuKDep3Ty3mSHfxJvAMZ8gTKnrWumHzH69kF9TTH4yfzEXIcGkUywrawC4YXg== 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 4XspbW1M3Sz16Bc; Tue, 19 Nov 2024 02:39:03 +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 4AJ2d3c6006969; Tue, 19 Nov 2024 02:39:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ2d372006966; Tue, 19 Nov 2024 02:39:03 GMT (envelope-from git) Date: Tue, 19 Nov 2024 02:39:03 GMT Message-Id: <202411190239.4AJ2d372006966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 8b29ab3aff13 - stable/14 - ipfilter: Avoid holding a lock while stopping List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b29ab3aff13366f1032ec28611db5200e3badf5 Auto-Submitted: auto-generated The branch stable/14 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=8b29ab3aff13366f1032ec28611db5200e3badf5 commit 8b29ab3aff13366f1032ec28611db5200e3badf5 Author: Jose Luis Duran AuthorDate: 2024-11-02 17:58:59 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 02:32:59 +0000 ipfilter: Avoid holding a lock while stopping Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and avoiding re-initialization inside the timer function. PR: 282478 Reviewed by: cy, emaste, jhb, markj Tested by: cy Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47530 (cherry picked from commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d) (cherry picked from commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4) (cherry picked from commit 650900cc2f607458d32d333bd7ab0aa10be13ba4) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 95f9fa1dd278..2a6ff68649b9 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -172,7 +172,6 @@ ipf_timer_func(void *arg) SPL_INT(s); SPL_NET(s); - READ_ENTER(&softc->ipf_global); if (softc->ipf_running > 0) ipf_slowtimer(softc); @@ -181,12 +180,10 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); } - RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); } @@ -221,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 19 02:39:22 2024 X-Original-To: dev-commits-src-branches@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 4Xspbv1FSlz5dQsv; Tue, 19 Nov 2024 02:39:23 +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 4Xspbv0kBFz417Z; Tue, 19 Nov 2024 02:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983963; 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=du7FhkTYAgrGwnGPCFZRvay/yLK/HfI8VqdWtU96PzE=; b=JB+H0jQj81CVaayrqSFtzS3rc+ZSFIF614FVj94n6Sf/edoN4WnpHkkn/5xI8+Kb8l6DJK 7Z639/sB5prPhiD8U+WNnuDfjP0e7KMhNxwtFlg3t5w82ViVdUmGON1ZaUCDlvv1i6WOFn CxcX8LPOsTTxyCM3dzcjd2fdypv0+upv8ijRHG7cnsREFECee9D1hsKsmV+jDuUpnDw3PR N9nG8qS5HTMotOsaS/UN9GyaNxtGOAQMgCKPwJwAO7F7eT9jrARk5ScBVN6fF4gEG/R06Y JmZ4p97X8x4pe9xW11U7x46J7cSK/hrBigGL9Q+incWwdl4HTs/gh8vrty80fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731983963; 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=du7FhkTYAgrGwnGPCFZRvay/yLK/HfI8VqdWtU96PzE=; b=JzofADnzg1MCHwz57XbG33NhQid6FqQjlMdEptJ8GYv0/3ne8EAkB4BlrKxmhvsEdh5Web Vw+NC1TrZE/7mN2bE9d7OeK7Z+NHjeMe2dL9AGtfq4TmXwg9GJ83OHKCw2jfQKS39fiwI4 ZWlE6ef+h8uqXbbFYKriEt3pxPd9YwieicCgD8AVyZuz2TAU1nvZenpAepeXuLT6c7t0uT Y2f0puTKiPdwT+b12ALXefH1EL+1cJwxQXKK9+TTWNvMxpzKFDOHnznL+3iDSGqAk2Srnk btQvMsaCv1TZpHAW2cJk9HN2i8ISWEmEFcSKk5U6TjnA/urPBgYwRsfJWTKsZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731983963; a=rsa-sha256; cv=none; b=pvSsn9m7heNZhG+yO6mkHSqKHJPZeBDtwnXlNdC9CkyNq8EDzzbsD+hxzoBOLe9oHN/xcj 7/KIlBwzh3/sFeKlZ80t4DVJTbJHx9QjygeymE5nQ+OVcmRKmF9FP0+2ZcjDm47Fl4t3Zo SG0IO7d6fUNrbDwzgwkOCsOZyBfCI2g1Ii3KDnxzCjnd8brqKtVgxxrnVgztMmyyDZcRMm rgCikeh8suoa9DKsYc41zDrm34lAneLhgJL6vqEiwkNPkQFUqGtGhl9611WAKXdeniOkqx dFgzXOUxIe2JqiscljQOEOkilZq6+UJ/D8iUath97SFEmG4ck+he7v+qSqPrVQ== 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 4Xspbv0G7Tz16Dd; Tue, 19 Nov 2024 02:39:23 +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 4AJ2dMhl007178; Tue, 19 Nov 2024 02:39:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ2dMmr007175; Tue, 19 Nov 2024 02:39:22 GMT (envelope-from git) Date: Tue, 19 Nov 2024 02:39:22 GMT Message-Id: <202411190239.4AJ2dMmr007175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 5006b9b4223c - stable/13 - ipfilter: Avoid holding a lock while stopping List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5006b9b4223c9a6620ce6513cf5f14161bbafd81 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=5006b9b4223c9a6620ce6513cf5f14161bbafd81 commit 5006b9b4223c9a6620ce6513cf5f14161bbafd81 Author: Jose Luis Duran AuthorDate: 2024-11-02 17:58:59 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-19 02:36:57 +0000 ipfilter: Avoid holding a lock while stopping Avoid calling _callout_stop_safe with a non-sleepable lock held when detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and avoiding re-initialization inside the timer function. PR: 282478 Reviewed by: cy, emaste, jhb, markj Tested by: cy Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47530 (cherry picked from commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d) (cherry picked from commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4) (cherry picked from commit 650900cc2f607458d32d333bd7ab0aa10be13ba4) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index a09316163619..89e5be506be2 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -172,7 +172,6 @@ ipf_timer_func(void *arg) SPL_INT(s); SPL_NET(s); - READ_ENTER(&softc->ipf_global); if (softc->ipf_running > 0) ipf_slowtimer(softc); @@ -181,12 +180,10 @@ ipf_timer_func(void *arg) #if 0 softc->ipf_slow_ch = timeout(ipf_timer_func, softc, hz/2); #endif - callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); } - RWLOCK_EXIT(&softc->ipf_global); SPL_X(s); } @@ -221,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init(&softc->ipf_slow_ch, 1); + callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0); From nobody Tue Nov 19 05:20:16 2024 X-Original-To: dev-commits-src-branches@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 4Xst9X6Gttz5dZhX; Tue, 19 Nov 2024 05:20:16 +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 4Xst9X5rFtz4GHy; Tue, 19 Nov 2024 05:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; 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=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=YHpmhmXuxj67Ie9rQDQzXr18IekZRpbWgIyWzz3aNeC3RgxX3mjZHCDk7bitmx1y+Rrjpp dtQJvCKqSHOf41Gd4daZj2MMQpl7BUj24D1AACN9xKQ8IS93XmBqQGrLwnZGiPlpReUr33 PBsTcA/Mw34QtWDBSQBIG9WFI9TimtJxnxXVT1g1IkV8G0cxJHw2Sw9uU2Sn39QOeHUgux Rx3N6yTlZIXfhc9+azcQQh/4jSAbD6wTpprkpIIZDks6n3auejLekzHEnnU1B8feOWO2Kl MDmZDqb1HFUwJndJjbBSYmfs3ni+k/PNHpI6bz7kEJG/dkGfDfyJh89sEDOKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993616; 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=SnuPIrTq/t3WWaKHRak+Uu/9P/v+xm6XXkExJrxudsM=; b=hK8fF+CfCBvqbQM1puTp5hDi1uTk9+u+2yT14sZThP8I0qp+XU4P41fIljmG0umLzKUXSX Mm3XTRmP9fipItiWIkUoaYXXuc7sV6PpqjgvXESHWHFIlSHq5oGwAggHFs6aq96jpeII0L apt9q5qaFyzBQHaP+L3H770UVLeBSKD/g4kELC70VttMpeOW1NneStGnvUNMgQSXLMA/6e 6ZSGQ+e+sp5c6CdAeBljvVyiWAayuPr1AePH67ckrU0ARc6uholDdPg3YDpuB2ObTfZ/Fc HZD7uW/WnSYAqSwLypOhJmnNv3wtvr/osc8e6Si62XzZP1tRIU94KYI2Rg1rLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731993616; a=rsa-sha256; cv=none; b=ud5jQM42zGbs+/3awgLmpKxBKTTKCQ0xTH3X9/a0i6DqZQqAQOoRV5PuVPX5ajr7VRPWgF CRF65IzEGHnjdl8rdbK48W5OgAxJGTLd+58TrkMYzSnputlSRY+tOKceGkZasRi1t4GGsf 0WzPfQ4pADYkOu3Oec64sgZcbCXXXNd4N4Xtj0uC3O7gW2aGpeCBxnxAtvBA+FH9eusHFJ y/7FhT4Y05/nKWr2sYxOSeGXxSwsTLqcW9sP243a7YYOZbC+gcyHMqYtDZPXcKPx5WG3hX v+SupxhqmzPvmAgcJwm7ViYN5e44QU/p3iTtIzo1cc2MxxzXiSi6xgZ/UnbaDQ== 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 4Xst9X5GcRz1BSm; Tue, 19 Nov 2024 05:20:16 +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 4AJ5KGl1014907; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ5KGLi014903; Tue, 19 Nov 2024 05:20:16 GMT (envelope-from git) Date: Tue, 19 Nov 2024 05:20:16 GMT Message-Id: <202411190520.4AJ5KGLi014903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8925ea58c206 - stable/14 - mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8925ea58c20600fb740e5aa370af70b6b9b5febe Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8925ea58c20600fb740e5aa370af70b6b9b5febe commit 8925ea58c20600fb740e5aa370af70b6b9b5febe Author: Konstantin Belousov AuthorDate: 2024-10-15 22:34:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-19 05:20:09 +0000 mlx5en: improve reporting of kernel TLS, IPSEC offload, and ratelimit caps Sponsored by: NVidia networking (cherry picked from commit de7a92756f0ab50e5e243ce9ac680e27f5c41370) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 55a4bc3cec79..4399af43b93b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4518,13 +4518,25 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_setcapabilitiesbit(ifp, IFCAP_TSO | IFCAP_VLAN_HWTSO, 0); if_setcapabilitiesbit(ifp, IFCAP_HWSTATS | IFCAP_HWRXTSTMP, 0); if_setcapabilitiesbit(ifp, IFCAP_MEXTPG, 0); - if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); +#ifdef KERN_TLS + if (MLX5_CAP_GEN(mdev, tls_tx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0) + if_setcapabilitiesbit(ifp, IFCAP_TXTLS4 | IFCAP_TXTLS6, 0); + if (MLX5_CAP_GEN(mdev, tls_rx) != 0 && + MLX5_CAP_GEN(mdev, log_max_dek) != 0 && + MLX5_CAP_FLOWTABLE_NIC_RX(mdev, + ft_field_support.outer_ip_version) != 0) + if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | + IFCAP2_BIT(IFCAP2_RXTLS6), 0); +#endif #ifdef RATELIMIT - if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, 0); + if (MLX5_CAP_GEN(mdev, qos) && + MLX5_CAP_QOS(mdev, packet_pacing)) + if_setcapabilitiesbit(ifp, IFCAP_TXRTLMT | IFCAP_TXTLS_RTLMT, + 0); #endif if_setcapabilitiesbit(ifp, IFCAP_VXLAN_HWCSUM | IFCAP_VXLAN_HWTSO, 0); - if_setcapabilities2bit(ifp, IFCAP2_BIT(IFCAP2_RXTLS4) | - IFCAP2_BIT(IFCAP2_RXTLS6), 0); + if_setsndtagallocfn(ifp, mlx5e_snd_tag_alloc); #ifdef RATELIMIT if_setratelimitqueryfn(ifp, mlx5e_ratelimit_query); From nobody Tue Nov 19 05:20:17 2024 X-Original-To: dev-commits-src-branches@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 4Xst9Z0Drlz5dZhd; Tue, 19 Nov 2024 05:20:18 +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 4Xst9Y6C2zz4G28; Tue, 19 Nov 2024 05:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993617; 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=Ou28MGmeTYZLLDETYZNWg9DtcJtPVtL6Z/GbZwOzKoE=; b=P8hcNjyHKMD6DQCSQAdg+RyRaG5OmBkKJmL3z8T9hlWBLHqI/5ocSeFwdgIrWGqh7powiH GulJiIH7HxJFdC6X8DWk7OFJmb43JktcmIXhCHauOIwi60xU1RlYAMVAVn3VpZ3ft6qkB+ ExI2RxgBTnd7ovn089Psx2uyMUft3ECAzfz20fxEXRrUqD06kbvgpETXU1/4bAKjIcyXqp 58Y45Vt/US33pLmq+LpjzuMRGGufEJWF5xvxVkZc0owNkN9xRSQ3WV5IggeXyxUQCEHdwv 69LLHv2HMFm6cvW2Ng5hYqMjFdjJ0ps7fnXx9KfM2YVzSWU9l2Ys84aTg1E6yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731993617; 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=Ou28MGmeTYZLLDETYZNWg9DtcJtPVtL6Z/GbZwOzKoE=; b=QheL+1Pfg/HYwI5E/CZ4DrxpymW0plpa3DFkJgH4MGV6NpQVLZtayTxyril0vpbLJ47RjS wTHh3ZBcMJQE81x62pfZ4hYF74mUgn76k1m5Li28J4qSdbewxHUXKc1lK8ZzBnZeDtB1kd G/nxsolx6L6Yb02zIIgBofkYT+NACxXG4KjZujgyvIT7YSOJ1i5WOILCHggyj7Uvcxw3Nu ltMGU/EOoQdmopnRKSOYQoMJPBgYZaj5xg+CKm+GYkFA2ez3DLsggRKemZaRNRGciWzKJu OQomkuVnnsk35kpKFviB1P/QH2qdx41ChZ6/pHNS54JLAVgbx9ld2KQ6xhz/2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731993617; a=rsa-sha256; cv=none; b=cpujTTSB/uXFt34a/cSOWUD2rAHPwkBSTiWPY3s7KOP6Ud7VdZgzN35s9SC8v7I1yvvtUs Ac3k0gKdzXFHYH5CQsxVkfICFVloxbUXyFp8nPmy6zp7Sf/A1qUd8NK6IEieV19ltQvFAQ uy1X+O75kSX9AWXikosIzS3JWixdLt1avY744ZBCwJ6hDK+h7Uel5qMvhYD7Az8G4VudtV gGsNbRUpAGDDksqP0RY29Aj3Sql1jCQAx0dDT7D/Q4alNnkW+Rxa9U0W36ezSMXx2yShNn 7m+YH1fXTbKP/4B84+rujhjRt0f1vcngFGBpzUOqdDW24BVHjwJxvwOs/39tqw== 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 4Xst9Y5pF9z1BhZ; Tue, 19 Nov 2024 05:20:17 +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 4AJ5KHeu015554; Tue, 19 Nov 2024 05:20:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJ5KHtR015546; Tue, 19 Nov 2024 05:20:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 05:20:17 GMT Message-Id: <202411190520.4AJ5KHtR015546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ab2dfb93e372 - stable/14 - ps.1: remove stray tab which breaks columns alignment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab2dfb93e3723144c648e1cc508298d41af60e4d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ab2dfb93e3723144c648e1cc508298d41af60e4d commit ab2dfb93e3723144c648e1cc508298d41af60e4d Author: Konstantin Belousov AuthorDate: 2024-11-18 12:23:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-19 05:20:09 +0000 ps.1: remove stray tab which breaks columns alignment (cherry picked from commit 645f8bcba9c8cf4eac69cc66d4112800a496193f) --- bin/ps/ps.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ps/ps.1 b/bin/ps/ps.1 index cd29f4a0d70e..95f7f15e26ad 100644 --- a/bin/ps/ps.1 +++ b/bin/ps/ps.1 @@ -384,7 +384,7 @@ the include file .It Dv "P2_PROTMAX_ENABLE" Ta No "0x00000200" Ta "Force enable implied PROT_MAX" .It Dv "P2_PROTMAX_DISABLE" Ta No "0x00000400" Ta "Force disable implied PROT_MAX" .It Dv "P2_STKGAP_DISABLE" Ta No "0x00000800" Ta "Disable stack gap for MAP_STACK" -.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No " 0x00001000" Ta "Stack gap disabled after exec" +.It Dv "P2_STKGAP_DISABLE_EXEC" Ta No "0x00001000" Ta "Stack gap disabled after exec" .It Dv "P2_ITSTOPPED" Ta No "0x00002000" Ta "itimers stopped (as part of process stop)" .It Dv "P2_PTRACEREQ" Ta No "0x00004000" Ta "Active ptrace req" .It Dv "P2_NO_NEW_PRIVS" Ta No "0x00008000" Ta "Ignore setuid on exec" From nobody Tue Nov 19 11:40:53 2024 X-Original-To: dev-commits-src-branches@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 4Xt2cj6gxMz5dwPT; Tue, 19 Nov 2024 11:40:53 +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 4Xt2cj648Xz4mKC; Tue, 19 Nov 2024 11:40:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016453; 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=BMsoTRA9x81x40QnwiEUxBI3lLe++xU8fBlC8zMMvnY=; b=ygK2lLzrdm+IGCrVPpu8fZasoppnOxPm6VSIev0qpP8m2d1FmmYoxTIWqzwKwPYXi1WSv8 CbrUtlhrVkjDPxj2F9O01w0U8JgkaHI2NvyxBTZHrxxrRghsBOUCifhz4LIOx/Kk42rnEP DIAb7IACM9n/ib3EM7BtSEWV6YPWdQKMCHnC5L7UuFBHMnLnFbG+Y8s29x5Oohf1lUBk2K V/jDO1v+D/DM1Lx0q/IoiCWGoynQB0xYiiDoL0LUTPb9+c74Hm9FgigATltcgh4FCoMEa6 HkLWTE/rDaqnq1ltSVVKTuS4LRlKgI5wg1HOgC5CpbFz4OO3X6gyqpXvknNUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016453; 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=BMsoTRA9x81x40QnwiEUxBI3lLe++xU8fBlC8zMMvnY=; b=JjpLyi8ChBYh/68mRLl3B0qF+jo0GHka09ivP+Fd4lmniOkNANl2Gk2S3LKCPMiRo6RXT0 CbQcOsSw3RIpqdZb/KgnyRf+2Zu3hQ+52+Wh5/Z2ve4UGoQNTnv+IleQzbBkOvFi0oaDe8 ORVU3SnsNUAWX7jVHZ9siS33ej5ZeUpv/9fSUkXHbE8V5vb7A62sJ142Z6BrTaflNLCsJo f3AE6FOY9RYcofiY0vD3n7iAuPHAxrzA6uFnWolu7OCczLfBo+VPhxTJbAQxlBQcVH9dKW JQqJDQooO1ooIJs90YbkJVI+Oz/JqLSbP4bEluv+v+Rsv7XuENIEjMVtGMOzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732016453; a=rsa-sha256; cv=none; b=muaB+7+CbHEdZLZtih76+5W7JdDiyD8b5zgNwxAKCCvCvkaPSAGYyL1eN2Ibf4qtOROMH+ BkVHqzOnptyHQRjkYnkTRli793W+Sdsosop02jfr4k075j+wKoi0FlrXXsSCYLmjDRJ3hE lIvEYmgFQ9Z3BMrPrP5zuQuHcBGzLwGusAbOKsvvz3j+SYZogo7DmfSMkCXj/DVdoBFoFM O34RfHp/+TrQYFn2zTsNnq88a1wWIAkpT85g1YING6FasUG/5W4ChbVWU/hYFe49Y+H1Gd eIVG2xEiQh6CO235QyPe6sewqfLfBaRSiP/qdH2RzEcB9Kp+leg5KHSEuqXTRQ== 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 4Xt2cj5g9Yz1MTt; Tue, 19 Nov 2024 11:40:53 +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 4AJBerJG021238; Tue, 19 Nov 2024 11:40:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJBergW021235; Tue, 19 Nov 2024 11:40:53 GMT (envelope-from git) Date: Tue, 19 Nov 2024 11:40:53 GMT Message-Id: <202411191140.4AJBergW021235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 3bcbd391dd7e - stable/14 - gpiospi: Fix module dependencies. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 commit 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 11:40:29 +0000 gpiospi: Fix module dependencies. MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 15517f74f0b3..682ee5e0c176 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = { DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 11:41:18 2024 X-Original-To: dev-commits-src-branches@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 4Xt2dC5J2pz5dwXV; Tue, 19 Nov 2024 11:41:19 +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 4Xt2dB4Tpnz4mXW; Tue, 19 Nov 2024 11:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016478; 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=dSNaMQ3i8/Zqz2930oVCWLhO/I9riiYYIrNJTqkzBMc=; b=Sm003DdunqPHVkFdbcnOMP4SWU35x1Jb89TzNQ0SaRKiIoIvbqBtUze1jmFBTTcuqa3GLy OA8h2Wg0eSOjp79XTSSMlBW4ayXX7un1Gi5ygbxk3wc3Si5NM5Rh034MhZljwr0nbW7RjX xX/4LGSqXMVgPjDy0PgNtKr2+8GtchRQMEp3mFtPI+tLYhSULvfeXfKc1vGAupbYMOCTU4 hc/OYSlP9WicyV7o8aTg9kIxtYTS00Yb5e3e0EVCKVSlXMtovwwElRHKDA75ju/S8FS5yg yQhOs+SC00csaxl4WfNQ0XVC/rcicSuniB6MVsXB4iGo3CDltG70bYHj99w8Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732016478; 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=dSNaMQ3i8/Zqz2930oVCWLhO/I9riiYYIrNJTqkzBMc=; b=iEBSXmcW8uyavB0pELpRrsaMkf7Aht1CMStQ/Qpn+fDFNhq1ieecZ1r1Ce4zx0ZuZMd2GF Qr96N+hGSDrvpqpVsGopSXN1c5fyktF1ELWXRGu9/tEIfDI/Vw+IHfo6Ln8neXk0M9NmuI 8tKk6Npu6nC7kZ/iiZaZeMujL/z/IxHp8pNS6M0OkEFOaeLPzfzSy/87DqU3tEt0N5qUKt 3/f7P3QYsUf1LZuLlj9nEgmoJWHDxf2D/fKuOluNdQmH5ZXcQmuU5z/JLyh//orQL8I9YC 4SMDiOuLKQzdWwS9k7dKvXeaWaGVaKGs/0k2z43w7NuOWPuRh5MEtd27TBxE5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732016478; a=rsa-sha256; cv=none; b=FZcp+KXuM3TyBopWSxrwJ/kzQLfm5HGMU30SWlZB7siq6+a7cHMQmgun+oWLUJHIb6DmRy Vtw7QxS4eIAuwsPrh/XJPxuSUuiAhZjanptYfIxkpySDxi5BvxScGmgu5w9TZ8nG7nkeQn yiAZ4P/xkvU6qR+las6pl3NDZ3Fnu5nzkbkOJFwFH8lsTCqZe1z+QC2uoa6frqA2ci7FxP kmHiM3euyvRvNgQr3f10GFlFN3tYBnlZfkMw/U7iWEJxLeY+RUnZgIePEb2fK/WnA5XP4c +9bmFR1cDR2tK2b96PpJO+9cEgLpUshrf7e67rK3xTvLFFykJyPujVHGTZmJWA== 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 4Xt2dB45nVz1MvS; Tue, 19 Nov 2024 11:41:18 +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 4AJBfIie023668; Tue, 19 Nov 2024 11:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJBfI9p023665; Tue, 19 Nov 2024 11:41:18 GMT (envelope-from git) Date: Tue, 19 Nov 2024 11:41:18 GMT Message-Id: <202411191141.4AJBfI9p023665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5d7079bedcca - stable/13 - gpiospi: Fix module dependencies. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d7079bedcca72fd2ab14b2bf1df914234050dd5 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5d7079bedcca72fd2ab14b2bf1df914234050dd5 commit 5d7079bedcca72fd2ab14b2bf1df914234050dd5 Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 11:40:25 +0000 gpiospi: Fix module dependencies. MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 678dfaa70764..c453406ab767 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -398,5 +398,5 @@ static devclass_t gpio_spi_devclass; DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, gpio_spi_devclass, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, spibus_devclass, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 13:57:58 2024 X-Original-To: dev-commits-src-branches@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 4Xt5fv0834z5f448; Tue, 19 Nov 2024 13:57:59 +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 4Xt5ft6nSFz40pv; Tue, 19 Nov 2024 13:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024679; 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=d8km0XcUvH1vA3QRIQaUW8rjroJ6hnefsiphfmtlHLM=; b=lH5yavyG74udX+D83jwIj26u2mfIIgSCB2xmmv2ayu2DEHEt2McwItTzOBsttGWPCZj55y t1p/VOvxNCZ5y+7AxHyQaittaldto4RZtvvpFzYdYMX7f8law0hiMLGvy2UqF11RtS7GUg xAf5XUOLx0afhhnZzN0zr/kyffPPXCM0bY/0Y5Ls1u6kZju/S6HYVPuBhJmkaiI8zeqTXJ 27np0B4nfC48Rg3pCL8tX9ZIOW4n1rvjJAlqsFgdO5CRwkUqENV3Wph2Zx7ToMs3lNTnyu Q1N+N1RBaMWHG7WccNLFiINzsMBu4bd377poFL7yBO+ldJr/FOfZCXdOcXsk+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024679; 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=d8km0XcUvH1vA3QRIQaUW8rjroJ6hnefsiphfmtlHLM=; b=DZD3G+PvPcajjkfkKuQP7GrzniIpU4h6Ev2D0CQwmNGSL2BrRS0dtYffWrRHSwjdhhszeE xU8Or4FcG6DsslgXt8YnLi/XhV7iquZxjaU5mNhrmT1AC3GvTlBS4+1S8gi2wjdvs/TEVw LmOCkhDTGwFPEMn0a7eCCaZRRx5ZvElxxB2ho37LDUkHGEWogDDHDPEYnjO5nkAUjNEEdo K2l9j6Sa9nEglrlhM4V3Q8XS42zCdSm3tJKiD9bRH/2tnNVHvu20vTtKKItXql45JEWPXU gTLhvxm+XkO8b/0MfyBs7NVJJRR4qpnjRhkGRBejI6p4liSe8SM+Dx1YuEE3HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732024679; a=rsa-sha256; cv=none; b=fM95+gH4xO7Kt5AdEMbxNXvJ2EGTftuXPPIauiQaRLL7AjzlNdxvBrjFjbiyQdgea0CZgK hPY25FXIBaZ8QiqNH7+FBOptQP/GXM+lAuq0wJjXpqvTFoHgOPqyZABDZrdlLyXqDLlf2J Qsh4VzUfu4+q//tXD6IL6/dN18sH/Bz/7Zc4hG1kYnzgvmDBYYzSIKx9tnyAYZnME0Pw2c gVG6efZ1c2k0XmXFY9QOw3LtCDqU1i1AobDqRFjd22KV04P0Dw+NZH6QOxGBcmw5FIQMhm 6X7QAwaXpZiNzJgKFMczVLi/XyTwkoCd+zVjkFa5BbMify0YBqjWRLspIjbCPg== 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 4Xt5ft6Gvfz1RmP; Tue, 19 Nov 2024 13:57:58 +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 4AJDvwTX072594; Tue, 19 Nov 2024 13:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJDvwXx072591; Tue, 19 Nov 2024 13:57:58 GMT (envelope-from git) Date: Tue, 19 Nov 2024 13:57:58 GMT Message-Id: <202411191357.4AJDvwXx072591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d45fb7b612fd - stable/14 - getentropy: Add Git hashes corresponding to SVN references List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d45fb7b612fdab4172b9d348103c46145108810d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d45fb7b612fdab4172b9d348103c46145108810d commit d45fb7b612fdab4172b9d348103c46145108810d Author: Ed Maste AuthorDate: 2024-11-16 15:18:16 +0000 Commit: Ed Maste CommitDate: 2024-11-19 13:57:43 +0000 getentropy: Add Git hashes corresponding to SVN references getentropy has a comment about a special case to support kernels between SVN revisions r331280 and r337999. Add the corresponding Git hashes so there's a usable reference after Subversion infrastructure disappears. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ef07eb0802a6353faf79d58719d8008decabae0) --- lib/libc/gen/getentropy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 38cd515e74d7..060c2760bfad 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -124,11 +124,11 @@ getentropy(void *buf, size_t buflen) switch (errno) { case ECAPMODE: /* - * Kernel >= r331280 and < r337999 - * will return ECAPMODE when the - * caller is already in capability - * mode, fallback to traditional - * method in this case. + * Kernel >= r331280 (4948f7bf1153) + * and < r337999 (ed1fa01ac45a) will + * return ECAPMODE when the caller is + * already in capability mode; fallback + * to traditional method in this case. */ have_getrandom = false; continue; From nobody Tue Nov 19 13:58:36 2024 X-Original-To: dev-commits-src-branches@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 4Xt5gc4yFFz5f3Sp; Tue, 19 Nov 2024 13:58:36 +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 4Xt5gc41k4z413r; Tue, 19 Nov 2024 13:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024716; 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=vJgIgHtkv7yTq5Nt4NmB5T/pnpJx/kafjk0h/SZX/zQ=; b=HDneFuRuEmx0OU1K5rbqLvEDH/4yCRkdBPvs/hyOUOC27wNl3NQI2n/Z7mBSzk2iseYGRF sohl1fFXh67mlUUVj0v3kUYYOdBg/1vRqURCMC2S/UcSrOOi2QVuaQn+fjsGCuKbpU6P0o SATCk3eAifoN+quldhKHCcJqKG2G+CtiWwbRvXlj3JlA8egHwpyoOu4SIcGbW7dP/Sfspy E6x0mntAg0bdBqEqNZC+h5a07y7NPbpfdUwlJ2V5Jv+HDvKbnH0QRmMfn0zMiR6R8ZxMkq D2NekWxyscw3QdYDuiepISxVlOlITfde2Kzio/Yp3DUxTyVQQmiBSy9NqVPUkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732024716; 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=vJgIgHtkv7yTq5Nt4NmB5T/pnpJx/kafjk0h/SZX/zQ=; b=wEX8SaxKxbYy+8uY2XKQOmSRcoCTlzgHSc1klDzQ7AWnnBPvoh1ZTdLQPMEB+gwULPHcyX s/eYAZOOI+aH+d0AMLSLoaLLPSIs/MV8fOmKeTlipLYvrDipM5rYyj6DGDuy9flVPUu6mu 8+FaVwYLLoJbk0OnZCb440oaTfoiJLICw7VhzgsoI/R44rhGeH5V43/4zuY1CehqFWdgY4 VMEHDitpLxFc2a2zr/WjH1OnWx9Q3T0ZXmHOP03BRC5ZHZmJJcYmgNl84fz3Ed2u1fEnEO 8TvRno3bGnHEt3QRtolxIkfU74iMaBn+V7s4MBviSTv7fkXMj/LbY7Qg+8tMDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732024716; a=rsa-sha256; cv=none; b=rFSg0Y4zFt2e1yqEg9kU49Xz8sBhWwU9Gmbx/rWBeTQlp93yQ8njjhz0aRMbAcQtuCSfMf Cs1UrIcJZdNG05MoE/ZogM/U1lPBr36pX+d4nxtglvKF82XXDtn0LvmG3mwmPw9v19N6Da SdBIlIQncxgN5hkBpxzdf5ogjvxRTpmBrybWSBiM7QwAU5QRrwXnjwzjt2oje9/Mzna76h vG3GjMxoVBOJyLra2koMcPKVMSimaIZcSQ583eyrKUYxnaancAJb3cRdnjQ5JaoNFPdpFK SDdw5BzGd7NMeiIMSH8xWpTM7cyXzQ+HfUZ5GbBCQG+q6fbHLNbRWzpClMj6ag== 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 4Xt5gc3Ncfz1Rsy; Tue, 19 Nov 2024 13:58:36 +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 4AJDwaWu072912; Tue, 19 Nov 2024 13:58:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJDwa10072909; Tue, 19 Nov 2024 13:58:36 GMT (envelope-from git) Date: Tue, 19 Nov 2024 13:58:36 GMT Message-Id: <202411191358.4AJDwa10072909@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 8db85ff95433 - stable/13 - getentropy: Add Git hashes corresponding to SVN references List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8db85ff95433802935487c0a93b04b8debd3849e Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8db85ff95433802935487c0a93b04b8debd3849e commit 8db85ff95433802935487c0a93b04b8debd3849e Author: Ed Maste AuthorDate: 2024-11-16 15:18:16 +0000 Commit: Ed Maste CommitDate: 2024-11-19 13:58:26 +0000 getentropy: Add Git hashes corresponding to SVN references getentropy has a comment about a special case to support kernels between SVN revisions r331280 and r337999. Add the corresponding Git hashes so there's a usable reference after Subversion infrastructure disappears. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4ef07eb0802a6353faf79d58719d8008decabae0) (cherry picked from commit d45fb7b612fdab4172b9d348103c46145108810d) --- lib/libc/gen/getentropy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.c b/lib/libc/gen/getentropy.c index 44cb190f0237..10e7a274958f 100644 --- a/lib/libc/gen/getentropy.c +++ b/lib/libc/gen/getentropy.c @@ -125,11 +125,11 @@ getentropy(void *buf, size_t buflen) switch (errno) { case ECAPMODE: /* - * Kernel >= r331280 and < r337999 - * will return ECAPMODE when the - * caller is already in capability - * mode, fallback to traditional - * method in this case. + * Kernel >= r331280 (4948f7bf1153) + * and < r337999 (ed1fa01ac45a) will + * return ECAPMODE when the caller is + * already in capability mode; fallback + * to traditional method in this case. */ have_getrandom = false; continue; From nobody Tue Nov 19 14:31:17 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PL1Qx3z5f4qv; Tue, 19 Nov 2024 14:31:18 +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 4Xt6PL0wz9z42q7; Tue, 19 Nov 2024 14:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026678; 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=h1+nTSoie1B3Py63PCV7vE3Aog/w6QLl0lbtD57w52c=; b=j4k1a2vnm+fhhcL+8FQGqwHVmFEMMfbt7FsvzcnFzrd/hew/jZI79jKm85UtUuElG7ORmQ NwZdcCN4QcKAD/QhdC5Pct45VfzaTf1MN5wYScij3QQ1byZGCwYzBKfcR7Or+rTK7mFWqH suoRZZ/FX2cE4IKnVy54vJPFhIDDwS+MHIbjK2je7R6P4TJO53BGmed0kjbWyuC2MIsTKW iAnztbJRkB04RqCe3gwwQ7lgseUgpBgO4EWzNdSfujODrAx99+EcBVWUFPAHauvyk8Hkii 5y95/EPyglavNqtq+izCAyePZy1IpsgwCBvkK1NnRuStEt53LghJm9Xf5pWAhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026678; 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=h1+nTSoie1B3Py63PCV7vE3Aog/w6QLl0lbtD57w52c=; b=cjywaKPIPBFEr//g/s9gjoMOxAqojpjRoIhGmtWyjUoPR5KlO/qcl71Ov7lYlzN4yEe+tC 9ExLS19GeineoTkVHQeXRekka/ibv6CAEuIjzCJ2TnRO+tOB0NWpp5NzeTFRfkndDv6gKY o/g59ge7Ac2exgb0+a13NFAtsS+K8LSJblro/fYjr+UhvOGwcqPkBoxoMvAlvFryaSNQ+9 r3O9HSoU3qbnEwFTrcdX9S+/4iJAKPS0L/Sx+mcp7bAveTd9OC51kDsE+qwvGlMESBUoPV q3GYeyR37Naysz5eipwgyCzDH9s5hHl/h7aUDAME6HE6I3yuErjgm+fbEqvhHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026678; a=rsa-sha256; cv=none; b=TQMa53sMsqT7Gs8BbN1JH1fyuY9n7Zf1Lahp7LgE0GeUA6zPEhjOHOp9o0/M9fcpWWrHed /RZphuSAFP5NU02/488Xcnvn23cMwt2VGNC6p2jEd0YpTB5ezM1SDLjxhluSF9omFGwMs9 lSAbOqISqK+9j+aylMTIaGtvydmaHLEi8tDujIE1QYEOTTgH/gjr3sSnbvKzV7V8VfV2/D H6TSFq+drsel69EgtiOLgpEObCLzbZBOLSaNfwy97RDCFmcO+wVXpPjopoZtumkULBuxIm PhFxiwRKayPYdy4ZDaRVPtxTZu7D3kBbfgWMA8NQQ92nhroSIcv5W4UI/NfGrw== 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 4Xt6PL0D0Cz1Rd1; Tue, 19 Nov 2024 14:31:18 +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 4AJEVHVB040782; Tue, 19 Nov 2024 14:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVHGC040779; Tue, 19 Nov 2024 14:31:17 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:17 GMT Message-Id: <202411191431.4AJEVHGC040779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1fce096e2a0d - stable/14 - nvmecontrol tests: Fix nvmecontrol usage in a couple of tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1fce096e2a0d27d53962938c4cc09448d681c079 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1fce096e2a0d27d53962938c4cc09448d681c079 commit 1fce096e2a0d27d53962938c4cc09448d681c079 Author: Mark Johnston AuthorDate: 2024-11-09 19:59:46 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:06 +0000 nvmecontrol tests: Fix nvmecontrol usage in a couple of tests nvmecontrol {admin,io}-passthru's -r option doesn't take an argument, so the tests which added one failed because they tried to open /dev/0. MFC after: 1 week (cherry picked from commit f7c45c012201aff52a83c45c1ba516a855b11ed9) --- sbin/nvmecontrol/tests/basic.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbin/nvmecontrol/tests/basic.sh b/sbin/nvmecontrol/tests/basic.sh index f4a6b9504a3e..83b74721c66b 100755 --- a/sbin/nvmecontrol/tests/basic.sh +++ b/sbin/nvmecontrol/tests/basic.sh @@ -94,11 +94,11 @@ admin_passthru_head() admin_passthru_body() { if [ -c "${TEST_DEV_PATH}" ] ; then - atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -o not-empty -e empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} else - atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol admin-passthru --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} fi - atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r 0 ${TEST_DEV} + atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol admin-passthru ${INV_OPT} --opcode=06 --data-len=4096 --cdw10=1 -r ${TEST_DEV} } atf_test_case devlist @@ -142,11 +142,11 @@ io_passthru_head() io_passthru_body() { if [ -c "${TEST_DEV_PATH}" ] ; then - atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -o not-empty -e empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} else - atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -s not-exit:0 -o empty -e not-empty nvmecontrol io-passthru --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} fi - atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r 0 nvme0 ${TEST_DEV} + atf_check -s not-exit:0 -o ignore -e match:"${INV_OPT_MSG}" nvmecontrol io-passthru ${INV_OPT} --opcode=02 --data-len=4096 --cdw10=0 --cdw11=0 --cdw12=0x70000 -r nvme0 ${TEST_DEV} } atf_test_case logpage From nobody Tue Nov 19 14:31:19 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PM3lkfz5f5X6; Tue, 19 Nov 2024 14:31:19 +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 4Xt6PM1jTsz436r; Tue, 19 Nov 2024 14:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026679; 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=RWJzV2N86RkVbbUlEKm+TPIW5ifXcRy+31AerWpUmHE=; b=TCX9fdl51BmydykWbJJLM5r/nraroO4Ka1kOpkk+aMjtE/Df5RAknnNBuVfcYNsG7A8516 +tN0TvvhjrsQdWOL2NwMaA4ANJwVylpOdchaYEcijVPdNKvjQ7RiEaBtHCHaTZsTvIP2JP UjIJdlBpmt9unVHrg5wIMFIouAFbCiyNfcd6/LhlwBi2LtMHfbuu41wSERYiK7H2Vow92Q kMhb3QKm8rsCdkYjt9cqY+r9Kg3+XIKDRNx19T6l5Aj5ZlKHVdUOlYP3ZDndhsGwybcQMQ Cm7XrfjOU42AtE1vIcGjdWMZUPgMeCrtnfH0KlU5ADet16swIEaaP8Fj8Hd0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026679; 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=RWJzV2N86RkVbbUlEKm+TPIW5ifXcRy+31AerWpUmHE=; b=EY1rErY3E17I7M6w05sfCHrJMbr7PjXaCfizOT80ke5Ngz3TNPFVlDtmoPyPiaWLnGta4v oaB11yEPLDRHHxnJj+ISJTrVuAzh2mTi6SUrGF8q9OgAyzav3N383g1zCWctobs9pTlsbN XZgQ/Hx6FqUi7RJt3/Y1CPGbysAklQ/lt9rMZEyXxKSQXgntbIM8FKJtE1mwan7ACdhDe5 icCjgs+b07PcrX5YtysdJQ8PIvuqfWuXKOCB3ltW5ryXD894xPQ1T1rDY3Ycevgu+daM/3 CQfhmZmgb174yYgnxJPeBuIzuxRkynG83Z/cEQVMXiaHEED2IGqh1aEp69o8AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026679; a=rsa-sha256; cv=none; b=WP+o/jK0FjOcVliP3zqeCeBO7R6mw1xo+STu+DHkmixCzXuAw+7LIrc6bOHytfs0ZQuPlZ LCMcUbTOHNZwhhR0rAHG0bFYbzux77SUyrFSX7ZRzV9/konbF6Vnd96AEQzlKjlJDSe46Z mPNRwRJGqih4Cv2y1GRQ8kXSbN7wjRmW3Y3Q2JtrcNy9kkRHNogSQXl+Vf+63q394L+CWX Vvxh6V/u85dy8dqfD6CrjAW3c+IBdR6V+aQNdUJYAl3HGDib4HMMYJ4lhZVfSTsNYJrPo7 Iu6IDOhrXAOoAyJ7sSRfI9I38CQPA5yUxlPP+RV4El4L0ezTIifk2Lyt0W8yKg== 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 4Xt6PM10NSzDdC; Tue, 19 Nov 2024 14:31:19 +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 4AJEVJug040821; Tue, 19 Nov 2024 14:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVJ65040818; Tue, 19 Nov 2024 14:31:19 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:19 GMT Message-Id: <202411191431.4AJEVJ65040818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b837ead1d46f - stable/14 - tftpd: Address flaky tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b837ead1d46ff7ae8f715b18277929d8579496c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b837ead1d46ff7ae8f715b18277929d8579496c7 commit b837ead1d46ff7ae8f715b18277929d8579496c7 Author: Mark Johnston AuthorDate: 2024-11-03 14:43:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:06 +0000 tftpd: Address flaky tests The tftpd tests all follow the same pattern: 1. open a UDP socket, 2. fork a child to exec tftpd, which subsequently handles requests on the socket, 3. use a client socket to send some message to the tftpd daemon. However, tftpd's first action is to mark its socket as non-blocking and then read a request from it. If no data is present in the socket, tftpd exits immediately with an error. So, there is a race; we often see tftpd test timeouts when running tests in parallel. These timeouts also arise periodically in CI runs. One solution is to restructure each test to create the server socket, then write the request to the client socket, then fork tftpd. This closes the race. However, this involves a lot of churn. This patch fixes the problem a different way, by adding a new -b flag to tftpd which makes it block to read the initial request. Each test is modified to use -b, closing the race. Reviewed by: imp, asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47404 (cherry picked from commit 79c342aaf86feb4efbd15383f54e4fe7bdc9da7b) --- libexec/tftpd/tests/functional.c | 2 ++ libexec/tftpd/tftpd.8 | 14 ++++++++++++-- libexec/tftpd/tftpd.c | 19 +++++++++++-------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index 32e5f85cf421..3194f266faa5 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -324,6 +324,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) { int client_s, server_s, pid, argv_idx; char execname[] = "/usr/libexec/tftpd"; + char b_flag_str[] = "-b"; char s_flag_str[] = "-s"; char w_flag_str[] = "-w"; char pwd[MAXPATHLEN]; @@ -383,6 +384,7 @@ setup(struct sockaddr_storage *to, uint16_t idx) bzero(argv, sizeof(argv)); argv[0] = execname; argv_idx = 1; + argv[argv_idx++] = b_flag_str; if (w_flag) argv[argv_idx++] = w_flag_str; if (s_flag) diff --git a/libexec/tftpd/tftpd.8 b/libexec/tftpd/tftpd.8 index 24a743a92e14..1cbbe6975944 100644 --- a/libexec/tftpd/tftpd.8 +++ b/libexec/tftpd/tftpd.8 @@ -27,7 +27,7 @@ .\" .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" -.Dd May 8, 2024 +.Dd November 3, 2024 .Dt TFTPD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd Internet Trivial File Transfer Protocol server .Sh SYNOPSIS .Nm tftpd -.Op Fl CcdlnoSw +.Op Fl bCcdlnoSw .Op Fl F Ar strftime-format .Op Fl s Ar directory .Op Fl U Ar umask @@ -121,6 +121,16 @@ option is specified. .Pp The options are: .Bl -tag -width Ds +.It Fl b +By default, +.Nm +expects an initial message to be available on its input socket. +If no data is available, the server exits immediately. +If +.Fl b +is specified, +.Nm +will block waiting for the initial message. .It Fl c Changes the default root directory of a connecting host via .Xr chroot 2 diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index cef8d0278a55..81bc79fc2c12 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -133,15 +133,18 @@ main(int argc, char *argv[]) struct passwd *nobody; const char *chuser = "nobody"; char recvbuffer[MAXPKTSIZE]; - int allow_ro = 1, allow_wo = 1, on = 1; + int allow_ro = 1, allow_wo = 1, block = 0, on = 1; pid_t pid; tzset(); /* syslog in localtime */ acting_as_client = 0; tftp_openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); - while ((ch = getopt(argc, argv, "cCd::F:lnoOp:s:Su:U:wW")) != -1) { + while ((ch = getopt(argc, argv, "bcCd::F:lnoOp:s:Su:U:wW")) != -1) { switch (ch) { + case 'b': + block = 1; + break; case 'c': ipchroot = 1; break; @@ -225,14 +228,9 @@ main(int argc, char *argv[]) umask(mask); - if (ioctl(0, FIONBIO, &on) < 0) { - tftp_log(LOG_ERR, "ioctl(FIONBIO): %s", strerror(errno)); - exit(1); - } - /* Find out who we are talking to and what we are going to do */ peerlen = sizeof(peer_sock); - n = recvfrom(0, recvbuffer, MAXPKTSIZE, 0, + n = recvfrom(0, recvbuffer, MAXPKTSIZE, block ? 0 : MSG_DONTWAIT, (struct sockaddr *)&peer_sock, &peerlen); if (n < 0) { tftp_log(LOG_ERR, "recvfrom: %s", strerror(errno)); @@ -246,6 +244,11 @@ main(int argc, char *argv[]) exit(1); } + if (ioctl(0, FIONBIO, &on) < 0) { + tftp_log(LOG_ERR, "ioctl(FIONBIO): %s", strerror(errno)); + exit(1); + } + /* * Now that we have read the message out of the UDP * socket, we fork and exit. Thus, inetd will go back From nobody Tue Nov 19 14:31:20 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PN5kNWz5f4qx; Tue, 19 Nov 2024 14:31:20 +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 4Xt6PN2tB2z42t4; Tue, 19 Nov 2024 14:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026680; 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=1UfRqYl/3ROvVWhfjSxAKBGNQdfNp5/puJWw5Y+TwXI=; b=WgEvgvZp6z2e3xDPlm98V74zNenJWEUsNJURWmJ7U7xPN66tUBdX43Oa6aOxeR1NoGisYD y3DkDd7pzlYtqHKyjThBjBGDffBkcLPDnsySK1jee2GEdiMKjwnuno13R5lvYRhKZwHCRe YjWbnG85sj30pQFMRmpOMdoUmnIIw0kXOVt/Vzz/16Y/Q/pQtYywLeZtTMZTAUcZLN9rfy 5yuy31iTHxSj6RLdW1ZPEgsOUmSLFj7ZU/JXQwzOuwb7QUgUDoZjPbM/1PTKxrqMB4NBVX 7VBJHuppby5zYmGLDnBc/aT7YyFWuqcmb0v5VEzD+Cl7449xPmdgVx6lkPjC7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026680; 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=1UfRqYl/3ROvVWhfjSxAKBGNQdfNp5/puJWw5Y+TwXI=; b=vRY7POgZ1QgKHz6lgXPKW150uM1rEU6Uo2IeqBRh3EaAvtBYRsslgF2iz0KWIXclOJG/ja tveKbkrOZVqKnbduABiE/tppPM9CSP1N+UYDyQdTT1yjXtqiBpUnoqAnivQ2PN29ggk8Dh AiWhrL4gMXklsGbeHTam2R2erYtMJ1apd36Jg6IJlBTHz9/x4/ZRgfAJIf3aN7xXA+8cdM R0uNfe31wnwOywI5tQncnD/El4xU1mBVK6pDOYVLohUA8dvVYczX1LCNSYEfkDwFGvChkg jv0ICgNFGbBX8YJjIp6uZC2f5Q+j9bn3jf/OuPOTZ/dmABfpNr416muog/BP9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026680; a=rsa-sha256; cv=none; b=Q5iiObGOfk0LC1iWPcomsekL5+yMEl3RxLP3ZfQD/hLu+4m26uyH39fsk4UA0W78Y2P0AU 8YyhCI2sehIgv9L0nOw1XOMVgmIHiDZweT7jUD2tgMlaf/5sPi2bZzMWcU1U7pfWUJThNc DgGQWaNWIMAg4T8hBQvP1eqIPogJwzU27kBQma1tON4+8IWSIOZ1OIf5s5Hs1HUu9Z6w4p MyY4j5rc5aARimIIsKt3//w6iPtuz3mhff0j0L5zcy0XdW7LT0dJMlgKZQsbFnjQcYd+4F IsMBPNfd+375dYBWiztr3tgF1WcxNFRA9pu9G0QBT25/cGWwY0JM88D/ATE/Eg== 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 4Xt6PN21h4z1SYG; Tue, 19 Nov 2024 14:31:20 +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 4AJEVKJT040881; Tue, 19 Nov 2024 14:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVKCG040878; Tue, 19 Nov 2024 14:31:20 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:20 GMT Message-Id: <202411191431.4AJEVKCG040878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9623b69b1dc3 - stable/14 - file: The f_ops table pointer can be a pointer to const List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9623b69b1dc3040f532ff1731a577b63afec9b10 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9623b69b1dc3040f532ff1731a577b63afec9b10 commit 9623b69b1dc3040f532ff1731a577b63afec9b10 Author: Mark Johnston AuthorDate: 2024-11-04 19:38:33 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:07 +0000 file: The f_ops table pointer can be a pointer to const No functional change intended. MFC after: 2 weeks (cherry picked from commit c477d8974374402a16a42f5d62fbda19070a12a3) --- sys/sys/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/file.h b/sys/sys/file.h index bfc2c6ab4652..c1439b9bbaac 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -188,7 +188,7 @@ struct file { volatile u_int f_flag; /* see fcntl.h */ volatile u_int f_count; /* reference count */ void *f_data; /* file descriptor specific data */ - struct fileops *f_ops; /* File operations */ + const struct fileops *f_ops; /* File operations */ struct vnode *f_vnode; /* NULL or applicable vnode */ struct ucred *f_cred; /* associated credentials. */ short f_type; /* descriptor type */ From nobody Tue Nov 19 14:31:21 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PP57wRz5f5LY; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PP3Pk9z42lx; Tue, 19 Nov 2024 14:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026681; 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=zkScUdjlDNAjs1171B6J1LTRyqboE2ommXm8OOIK87I=; b=OUDLNlKNFL0Yk02BLSNARWzKqx+pfaONGooPjTpcZ7o+v3uV5Mp31GSJsQ3Xg3S/hy3okh rZcEbXF1Rdpv/Ka0T5Zfa2sqhUAavUobQDWs3z4Mr9kTrnwQefWoQE+bngMTVMiAqcMn6z LULYrM+d4ZhLgxQCEkX2je3xuIPKRLuvIoOqkqn8INxuUCdLnkUxORGeqkb3O0bu0HKBo4 u5DETO94EnBiVotXRVzXvRvmSe/nzQHQEju2n127lyNvLkUW/nos9Ol40hM37DEiQzZilI GgCeimxXYjIE2xV01kj0iFGXCkQCtDbR9riFtGdWIv6LVcmMR1KqvrXLVumxAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026681; 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=zkScUdjlDNAjs1171B6J1LTRyqboE2ommXm8OOIK87I=; b=ICm5wLnP3AOqeRzC4MDpmKoRDm+rmqxvHUe8rtSzezSvpfDEkwzxqX3oQOlrpWOjhhuLtT cnx7qKvGrvm1ZB5d0HiL7MZ+v5g5Xn6uCdsFVzpLvO+wUTlC1kerS26HGGSt105J0EjI6R OsBBU5XL542ISBHGw0+G+/z6htOM5fFRRqRiGxH8nfTz44fHBzq3/+/klAgDEaiU0Rsnng rSmvCftxKKKd4E5+YFgDyp1IEKHUPUEBrYgf32zEJtUm9hl1eohfhkZKanb14qqiSMshUl qvUfZgT3GT2QbpqbGIqAts+fUZmJLVmCyGXWe9H4enaAA40D/Vvyvi0uBj5giA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026681; a=rsa-sha256; cv=none; b=cZexN2BXZdjcbWU6imyff/hQ8ZcWoEObabbHKZgB5oO+dFGdhxNEOvzv2n/NdDi9wlubn4 n7iLmE/0UjdTj7PhZgulPDxRR2hxTXdDHJmHk/wG+wL13LoRG6H+S2qBp2nKaK1xyhHxK8 BUU5meBzV3RbFBL7HNjjpCMYGkkia8iLJKn7UGcsR3jO1+Aub3QCn2X7oUK+XTMwOxUsYe LAr+suOxgjg2CqporV6o+BxoU8B/qLm8rRMnD9E4byQo0XGAUt5dZR8hkJ5vQ/xu70CrPm 9SUs6uHKymE/RRi6GkCF7DSH4YKN7BJPHTMUwTSLozBExThwzretG/yX4csqMQ== 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 4Xt6PP31Sgz1Rq6; Tue, 19 Nov 2024 14:31:21 +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 4AJEVLg9040935; Tue, 19 Nov 2024 14:31:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVLsT040932; Tue, 19 Nov 2024 14:31:21 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:21 GMT Message-Id: <202411191431.4AJEVLsT040932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b9f9be5d92a3 - stable/14 - sleepqueue: Fix the comment for sleepq_switch() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 commit b9f9be5d92a345a52e1dedffb5fdd2e7b6bbc2e2 Author: Mark Johnston AuthorDate: 2024-11-12 01:57:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:07 +0000 sleepqueue: Fix the comment for sleepq_switch() The comment from mi_switch() applies here. PR: 279708 Fixes: 686bcb5c14ab ("schedlock 4/4") MFC after: 1 week (cherry picked from commit 1030ee9128373e7819e5d4a45475ad8cda24fec9) --- sys/kern/subr_sleepqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index bbbf753e3df0..ef921df3b64e 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -539,7 +539,8 @@ sleepq_catch_signals(const void *wchan, int pri) /* * Switches to another thread if we are still asleep on a sleep queue. - * Returns with thread lock. + * + * The thread lock is required on entry and is no longer held on return. */ static void sleepq_switch(const void *wchan, int pri) From nobody Tue Nov 19 14:31:22 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PQ6XPlz5f5BX; Tue, 19 Nov 2024 14:31:22 +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 4Xt6PQ4PR9z439J; Tue, 19 Nov 2024 14:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; 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=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=Z7UPTSxwi3AJ1tqwsPaW1mIkjpznl130v3yikcTOXTEX5DefwddQawiu7+DfMgjDwUQCuE tFhRkvM7dymleV/D/kSEfjxfT+DR1JvNh8VjaECBduh1kHQBZc4fTgccLDtw3CstVOw6oN ii1I86qVQ+sKIlEYNFFhpE+CPIaABlshxRaGs6UoLJgMlRLXDxRHQFeQyGCuVrfBr/ywk4 bg6zfl39a2wGrwRaFj7gbfudmjYCdfR+OKOjMrYGdajNQXPdnX5qTWSt8qMMDoQPQ5/Xes Fm8JaxFqsC9VGF0+WZXoJvQkRAzPx0mxydvgr71m1cy95P2azkvHm15DAx1auA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; 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=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=hQLWZQlbl1VggAb4EOjx7h7T7o8En1BIuXqw7/NVouY5dF/t6s4XVi1xRTLNYN4zpEHE69 XIArwCUlWddfTGRURof0+vr8ycsfDXj39SYrJvtDkyZtrBFgTuhZqaEZsyTsTlAEEvPG4b psvwjNXx3n7FUoZFmhwLFfy7jZY2AiJIVUE/k0h36pZo10W4o0ESAfL4w/FMf2G0x2e9BK stwHoKThSC3eRyUZNQHy92AJ9xe5owrleDp2oQj1RH7xkK2WdKa3F5YEFtSOLE4tQHJhyd x7NemWFmCgyEhGHUXLEFu3UPuIIyVDkb42z5e1zSIgHfYf0D+roX9tV3+77ylA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026682; a=rsa-sha256; cv=none; b=skNiGd9Z+7i/sisn8s1ojbHRq0Ao0JNruHmnTB0SToSO8aVn7z9HfiJHmiT1ieqgJfbDle xhLJUXchO0TZiCqMgfBNwEhiTklsyWOeUSUXCEjg0nt8w9+YyD0ma8po+W/c4NXizse7af hP2AZgjNJN2SMOAeVx6+W/ZhSwoUWju4t9wPiua4AFoxXGs5IhwSXUt4CDWqh3dL3XorQe rX5W8g6aUTPsiob8av/IrC9mSPFAxlmd+VTHz/pdqN+LAO1wsB1S/81kq2k4lbFjgGHQ/8 axfKwTjAlW2P2fCXYlvn2+rXTJePicb09Tfe40iTossmJCHUeF850bq7ifvJGQ== 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 4Xt6PQ3dRMz1Rd2; Tue, 19 Nov 2024 14:31:22 +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 4AJEVMg2040995; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVMtu040992; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:22 GMT Message-Id: <202411191431.4AJEVMtu040992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 476d590738cf - stable/14 - busdma_bounce: Replace a SYSINIT with static initializations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 476d590738cf6cbecb9d2f62ec962d49d02ec96c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=476d590738cf6cbecb9d2f62ec962d49d02ec96c commit 476d590738cf6cbecb9d2f62ec962d49d02ec96c Author: Mark Johnston AuthorDate: 2024-11-12 01:57:35 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:21 +0000 busdma_bounce: Replace a SYSINIT with static initializations No functional change intended. MFC after: 1 week (cherry picked from commit 195402c5c5b7b3236c0680f06b60b7f9465982c8) --- sys/kern/subr_busdma_bounce.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c index f5f27dae9b05..134bc6a5eb68 100644 --- a/sys/kern/subr_busdma_bounce.c +++ b/sys/kern/subr_busdma_bounce.c @@ -85,11 +85,14 @@ struct bounce_zone { }; static struct mtx bounce_lock; +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); static int total_bpages; static int busdma_zonecount; -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = + STAILQ_HEAD_INITIALIZER(bounce_zone_list); +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); @@ -128,17 +131,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) return (0); } -static void -init_bounce_pages(void *dummy __unused) -{ - - total_bpages = 0; - STAILQ_INIT(&bounce_zone_list); - STAILQ_INIT(&bounce_map_callbacklist); - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); -} -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); - static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) { From nobody Tue Nov 19 14:31:26 2024 X-Original-To: dev-commits-src-branches@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 4Xt6PV2Hm8z5f5Bd; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PV1YJpz439t; Tue, 19 Nov 2024 14:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026686; 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=NM7RXfE4VuwfOUrwjneeSjhRbtvMnzQleR6r3tCFWZQ=; b=i3Q2O9BxFuOO6VavRE3ArkPe1LbFXYs8y8SdwD0u12gBQaLzub+t8FVyOBLj8m8k0FWsNh V75B8WIVXXsWa82ADAuBtZb2aXrnDGS1z9/C6+0s56oQTPTKo3bZv6MSkXoC9jQ1Fyb2oU lURKr8mD4PoolXaAx3y5iiFvRCcvbC4UN4HRyKhx7Gp67BM0yoev1CF4Ii/dW7mOtmAH22 qed308Oc8kep/yTk3U1TZqMKY3rLygN8Nxf3zrhCXIkzTFXM7btaiHdZK3GSie5zxvw4in V+/L+KQSikAd2KW6jieGO5r58JmzeM1TjhW0xoCYOZmgjILSLPFnxbPjvMfyMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026686; 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=NM7RXfE4VuwfOUrwjneeSjhRbtvMnzQleR6r3tCFWZQ=; b=sOZjD36OUGFwh6jrd6NF2xoun5A+ley4x0rTWholRG7YxLgTCVW8cwEaove7Jnlfox95xN 8Srlhny+/faKs+86jZhpM3edzf90TA8c6IrlUXkNbMDGn997NTChFzejfIXWEKgw5Fkeyt ikbpMokfjO+LDUuMbwivBkTeHFe3iL8+wy2yNNQApEb50nPKWCe8EiImMzPZ3F3MRRK/dZ Uc84FyXbyQI06GhnMitCnv54SDAxZETJj61hXXajecNsDlvb4Vc1T2qkBi1OsJjf1NBpnC z6JtGmtfGd3PYfs5AdJOf/+4a5SBRGVN8U21yy7ZHvhNelKd9svkrs7Bq4t6Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026686; a=rsa-sha256; cv=none; b=GuURO6x3lyeRBMeOmQQnJpO31n2ynYjy6PgglT87jfX1umiwndnY9ULQUIcXm4VcvzoWRA hUoa0VCuon0kJCfvbjxgxy5yxvMUQs8VMygDz2Fk9XBcCxMOKQW0j/Qvxd1uQfEuxdY0dV Nw3N8yr7T0kHzXE6O+kHSqaVnMoQQwIaU5ywbVHJ61HT9sZ29g6BTiQC61S9SdFiSndS/q IqfgupTOPU3K+oMulWYiGR6KJIK0dn/r3qQfwVS9YwksUq+6+itEq9ABs20Q3Q7Xbl+QeX e+or6nl630ZQhj1AuJqrqsOCCxg+tgzgPnyZdukQXp3y0xYLMOItfMM7qH1qDA== 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 4Xt6PV17nPzDZt; Tue, 19 Nov 2024 14:31:26 +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 4AJEVQio041155; Tue, 19 Nov 2024 14:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVQ7c041152; Tue, 19 Nov 2024 14:31:26 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:26 GMT Message-Id: <202411191431.4AJEVQ7c041152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5544391d8724 - stable/13 - sleepqueue: Fix the comment for sleepq_switch() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5544391d872495b5517ac16ce9a46027925efc1a Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5544391d872495b5517ac16ce9a46027925efc1a commit 5544391d872495b5517ac16ce9a46027925efc1a Author: Mark Johnston AuthorDate: 2024-11-12 01:57:24 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:15 +0000 sleepqueue: Fix the comment for sleepq_switch() The comment from mi_switch() applies here. PR: 279708 Fixes: 686bcb5c14ab ("schedlock 4/4") MFC after: 1 week (cherry picked from commit 1030ee9128373e7819e5d4a45475ad8cda24fec9) --- sys/kern/subr_sleepqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index d5308b1e929a..727e13891f98 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -539,7 +539,8 @@ sleepq_catch_signals(const void *wchan, int pri) /* * Switches to another thread if we are still asleep on a sleep queue. - * Returns with thread lock. + * + * The thread lock is required on entry and is no longer held on return. */ static void sleepq_switch(const void *wchan, int pri) From nobody Tue Nov 19 17:53:46 2024 X-Original-To: dev-commits-src-branches@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 4XtBty3vLmz5fGTS; Tue, 19 Nov 2024 17:53:46 +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 4XtBty3PNqz4Syg; Tue, 19 Nov 2024 17:53:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038826; 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=k9Jk6Tlyw1h7O3OWo255yD0kZdtocB+P4qkygCFlEgE=; b=dOprB8YcOcPAZ9S6H3rlJiJJFRBG0Pp3/570l/yxeDHLBG+aPjQbGPJM0c8Mx9f4Bg/P29 HQS34/f+Dl4N6OBnkJthMoZurAaQt6GkTZ8D91u6ILGEjCGF4JLRMX9oWa1ggcYmvoDguX nYnDcXCqnVHSN2VBJAsBbRhjz/Vo+kA1sNaoa03r31Qa9g5Zg4GQ6vVUd+mLf5nUGd9+Jq pBdIxMG9tXskNvWUXe35T2w6GS6rZxN5jV56nvD39doNvSQCyWtVjSNyRs2JLaJxw89vKB 95LkNXYZkTNWhZX3e/lT04rgORf1vDRsEg4sFLywO61sS694uZr78jpMzDQKHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732038826; 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=k9Jk6Tlyw1h7O3OWo255yD0kZdtocB+P4qkygCFlEgE=; b=YAdvEQU5RHLeNTSzUXwLfvdlQfbD0pmWRtKKWmLXBB+hR54BEB4hS3N5712vlhf/zIy7r7 Yn3tVhIgwSAHkPiYOmXCDOX0jCcLQXAy/pz/b1Sw1EpfoWM5jZ+KmRel+kRHBNc+Nef3SU NUKUmyT9y/r58B5UmJyTHxcBqgE1L/YHzh3f5082ds9VhCN0feSkNHsnT+p6GsMNZC1eE0 8md/STfTIEceEvHzK78mVa0I5UqwKBxULxb1E/A4FrXVXa0YXGHX5Ciye8i6VoPZmjBP6H IUAsmgES052B9kMNIaToFKP9b07ov+iIBjX+eGs9VCGrhmMrvbM2ZL6zBK6EPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732038826; a=rsa-sha256; cv=none; b=lyALc/fV9uj8FCYXd75uLIOhxl1UR6dh8egctogasoj+ED1JS5ARCEOfWOPUshT6TEGuGT dnWSALNZTcZW+9k0CRYacC+D2cmOhTmoz3kr65r1wdOx0iB9iLzgkAcaUpdnFUyIHDwE3J s0/lMY2L8AuUdjaAf/6013TIVpceA60ayJuWWKXWQOVYfn+dZVilwy19yoPAZHH5+AoBId EFDa4uTkO1tgjq7ygtLBhiTqByuXZqbJq3NAoCh1mzmN7SpCxOzBXw8wwPJCI0cqtZ0Gw0 /GaIOF+p/QnSIukfM/KCbPhHnWJne75aGY3Gp5D87wYBVDR/FiYn/aQom+RvjA== 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 4XtBty2sygzKgB; Tue, 19 Nov 2024 17:53:46 +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 4AJHrkqq019124; Tue, 19 Nov 2024 17:53:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJHrkae019121; Tue, 19 Nov 2024 17:53:46 GMT (envelope-from git) Date: Tue, 19 Nov 2024 17:53:46 GMT Message-Id: <202411191753.4AJHrkae019121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 80b9b4dacd65 - releng/14.2 - gpiospi: Fix module dependencies. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 80b9b4dacd6524ada5919f8af62a18719ebe62ed Auto-Submitted: auto-generated The branch releng/14.2 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=80b9b4dacd6524ada5919f8af62a18719ebe62ed commit 80b9b4dacd6524ada5919f8af62a18719ebe62ed Author: Dag-Erling Smørgrav AuthorDate: 2024-11-15 05:53:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-11-19 17:53:16 +0000 gpiospi: Fix module dependencies. Approved by: re (cperciva) MFC after: 3 days Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D47570 (cherry picked from commit 79af8f72b3aff993703778423e83320df0953a37) (cherry picked from commit 3bcbd391dd7e1376ab7ad37e94f5b746abfc0591) --- sys/dev/gpio/gpiospi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpiospi.c b/sys/dev/gpio/gpiospi.c index 15517f74f0b3..682ee5e0c176 100644 --- a/sys/dev/gpio/gpiospi.c +++ b/sys/dev/gpio/gpiospi.c @@ -396,5 +396,5 @@ static driver_t gpio_spi_driver = { DRIVER_MODULE(gpiospi, gpiobus, gpio_spi_driver, 0, 0); DRIVER_MODULE(spibus, gpiospi, spibus_driver, 0, 0); -MODULE_DEPEND(spi, gpiospi, 1, 1, 1); -MODULE_DEPEND(gpiobus, gpiospi, 1, 1, 1); +MODULE_DEPEND(gpiospi, spibus, 1, 1, 1); +MODULE_DEPEND(gpiospi, gpiobus, 1, 1, 1); From nobody Tue Nov 19 21:17:02 2024 X-Original-To: dev-commits-src-branches@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 4XtHPV2MDCz5fS5S; Tue, 19 Nov 2024 21:17:02 +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 4XtHPV1pdGz4lMx; Tue, 19 Nov 2024 21:17:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051022; 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=mQ63KrFnvAdniICqLd1Yxok8nkTofd9GEp46m0k4lds=; b=IEuJp8M31YSWLXuXJyel71p0ZIku7rHX5aLGrzcicpMo0wN/0QAD1DLSXhYJgeC0nJJwv/ dXJBnC4bIV3sy2VzgRYijAjYeLPv5mWrUcQzkOR7Ee6JWHEz6wQ6AXjH3TMyiETeS4y/FU Nh3G/FKHqulSlAKrSeId1t5nV5SHAcRqg55WihxBhUotYMOJPwaFkmN7GuZloLwVUvJnVK FtYqHCMCHvxRnxpIyTnzjI403aIvXMICXiGcNNJPJ/m+HTqtQrKVn7RSN5hIrz4InjVv3j uYPIjfMS0hNJOQV6typRWVbrCcB/koPN6O1IoLTBaB7sQWhavPwpg3OW0sn/7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051022; 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=mQ63KrFnvAdniICqLd1Yxok8nkTofd9GEp46m0k4lds=; b=U8i2WY1VH871GKFoo7bLsZSSxB9jVQ1+/Agb0QoifwKJHCS9qWU66l3uMhxelzNCbshB5u W2P16ewR+Yz7lx5nEmJTAd/X7kzKZytZNYFeYlxnXK50Iv2A8uBHP1uu4pV+7ZpdTouo9K GVDvVZRX3A2/9A0BCxIrNL7saOjc4w8OAlVH3yIK4SJomFpYpozruTVUN699q5ut7LurgK TTwBNu7ZizNnUYui/+rcc5gtiyXnCiXCMeMtJqgsVUqQTizgCclBo0uJt1/qLSOAGO2+VA yNoIyn5qWOfB5J5la19jPt01Wc/ZFp+Uh04azC1ZZGRuxUBWiiqO3ikLJmtsyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051022; a=rsa-sha256; cv=none; b=K6htUnjuEt3qRbJGvE1RbX1MfidUepAUw+qNZtQac0YvcRIN9qQOwle6fBzc52/Iq5uNEs UCpl3+yJCKSzG+RW4uv7i8LAgNzau199JMIyMOXbyBJfoYC4oja1euOr1XNDAUFl4Irx7w xAYzl3UL2cCqY5yz7VndE0xwHxgEEiBBYXpYT/DIvqgA7lLx9h8WT5IOu/wR/UT3D3tFGx KGaULpG+brt0VcNM2XUK6XEBYC+AOA3DquApyqBpJq4X819DVrRr323Sb537w4hc3LdY27 l2Hzg/b2owZ+L5kPLBcoC+k1tXg1OLPLo475IUzn63KMzdnkKkLiNFqLQX+u4Q== 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 4XtHPV1GlxzR9F; Tue, 19 Nov 2024 21:17:02 +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 4AJLH2AN092303; Tue, 19 Nov 2024 21:17:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLH2xu092300; Tue, 19 Nov 2024 21:17:02 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:17:02 GMT Message-Id: <202411192117.4AJLH2xu092300@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 114ba4f2cdc7 - stable/13 - bhyve: Initialize stack buffer in pci_ahci List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 commit 114ba4f2cdc7e9da255ddf9d08726006dbfd7e28 Author: Pierre Pronchery AuthorDate: 2024-07-23 14:34:03 +0000 Commit: Ed Maste CommitDate: 2024-11-19 17:38:10 +0000 bhyve: Initialize stack buffer in pci_ahci In the function ahci_handle_dsm_trim, if the call to read_prdt fails, the variable buf[512] is used while it contains uninitialized data. It is easy to make the call to read_prdt fail, for instance if hdr->prdtl == NULL, the function will return without writing anything in buf. In addition, this code could be hardened by checking the value of done before accessing &buf[done]. Reported by: Synacktiv Reviewed by: markj Security: HYP-15 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46090 (cherry picked from commit 71fa171c6480d60f4d9c01dea1c71a7249e7b8ab) (cherry picked from commit babfd2e46762cb835fec66945aa60404f247c521) --- usr.sbin/bhyve/pci_ahci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 8a48eb00e9b0..33ca389944f8 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -781,7 +781,7 @@ ahci_handle_flush(struct ahci_port *p, int slot, uint8_t *cfis) assert(err == 0); } -static inline void +static inline unsigned int read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, unsigned int size) { @@ -808,6 +808,7 @@ read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, to += sublen; prdt++; } + return (size - len); } static void @@ -820,6 +821,7 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done uint32_t len, elen; int err, first, ncq; uint8_t buf[512]; + unsigned int written; first = (done == 0); if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { @@ -831,9 +833,12 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done len *= 512; ncq = 1; } - read_prdt(p, slot, cfis, buf, sizeof(buf)); + written = read_prdt(p, slot, cfis, buf, sizeof(buf)); + memset(buf + written, 0, sizeof(buf) - written); next: + if (done >= sizeof(buf) - 8) + return; entry = &buf[done]; elba = ((uint64_t)entry[5] << 40) | ((uint64_t)entry[4] << 32) | From nobody Tue Nov 19 21:17:03 2024 X-Original-To: dev-commits-src-branches@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 4XtHPW3tHcz5fSNn; Tue, 19 Nov 2024 21:17:03 +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 4XtHPW2PGnz4lY7; Tue, 19 Nov 2024 21:17:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051023; 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=71cYY0Tv9JHtq00uslSTJZZRi2Oe3Zi78Gjau+nONCA=; b=AfDtsBgieJ6hO/5vdAPpXqAYr1mLeVzAzlNjLIQIP7Yszvx6P0qO07vzbCy+pAxssWemPy zJJBKg0GwUnNjRn+/Y8W/yrJjJhYkNmbR021y2sIC633NZMDASJcs+yeQigHPRAXE2TFgp V6j/FttDxKfwQ505tGPgTiyBUG5e0UaAYArNML564qRb/Iri+DBwy3NjM2Zraj86pZG0TO AWKc7ZZPAAEiwkPe84JfroGT+r2wrtespBk1W2K6tc99yS/CgcmKADwVsebNXspE5la6Dk oQpNlv5EarTj4NyJB9lZgTcmYXAJgtjCh+2vVIbK18jazmPxcL+gK8jzjnuOew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732051023; 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=71cYY0Tv9JHtq00uslSTJZZRi2Oe3Zi78Gjau+nONCA=; b=nAYi5HnjM71eKQYPaIjjBa0mmRNWdKf+Hj61W2jjF1cZsQlOYALs2Jzeb9jMsRaRVEIPQX tfxEMqdg/gCErqYXNh08zumtZYVe021Q+fLF09il5sh6ONfY/+EHCsxODF36w3uBH8RcsL fJ42nB7jlklpO12KSOsyrAaozA/hWBawU34qsqaACmcHawPx5fAAFoYGGjfx1SvR4fWp/p coWoivktX8Jn5TA6Y0mHILoqTlYEqPn6xT4nn0cby0KepsZx1Pa3YXqVII+4uLn1z+HqmU P4PR/U6X0Z6CL3mo6byu0sGiL5KTeIIQQLprXKjH/8fJLNxapk8wbFMzk5JCBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732051023; a=rsa-sha256; cv=none; b=elhFZaxUIdsS0t2tZpVjm24qM9lCkAwQwGNTGv9cnx5iU3VmBXkRuYr4XpPfXR6lyoX6ik 5JHZkI3jUleQ/Dl34OD5lmNY7dS1lLx2/as5p6iFwaleFgMci10hnpIqsT3R1dSIv/nTOD qb5I8J5cwryBPLyITx7hM8hAhkwRviFbLWppXeFQpfNZ2rNhu/C6jfmr733fPYOMG3C6Cf nh1+Ypw5cfMh9t/Sts55R550eBC+D0y+ycnynbMho8PEF48Lt9b7nM+C5oDhyZVFXhcGGN Pa9njHik5PzM6RKgT7TF5flJobsD6GA+rzBiTOackrt3WFNWZH3IdmCDsURMVg== 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 4XtHPW20ckzR9G; Tue, 19 Nov 2024 21:17:03 +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 4AJLH3IP092351; Tue, 19 Nov 2024 21:17:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJLH39w092348; Tue, 19 Nov 2024 21:17:03 GMT (envelope-from git) Date: Tue, 19 Nov 2024 21:17:03 GMT Message-Id: <202411192117.4AJLH39w092348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2be68ecff81b - stable/13 - bhyve ahci: Improve robustness of TRIM handling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa commit 2be68ecff81b1cd7268b0d6436f4d6fa206fc2fa Author: John Baldwin AuthorDate: 2024-10-24 14:18:09 +0000 Commit: Ed Maste CommitDate: 2024-11-19 17:38:10 +0000 bhyve ahci: Improve robustness of TRIM handling The previous fix for a stack buffer leak in the ahci device model actually broke the handling of TRIM as one of the checks it added caused TRIM commands to never be completed. This resulted in command timeouts if a guest OS did a 'newfs -E' of an AHCI disk, for example. Also, for the invalid case the previous check was handling, the device model should be failing with an error rather than claiming success. To resolve this, validate the length of a TRIM request and fail with an error if it exceeds the maximum number of supported blocks advertised via IDENTIFY. In addition, if the PRDT does not provide enough data, fail the command with an error rather than performing a partial completion. This is somewhat complicated by the implementation of TRIM in the ahci device model. A single TRIM request can specify multiple LBA ranges. The device model handles this by dispatching blockif_delete() requests one at a time. When a blockif_delete() request completes, the device model locates the TRIM buffer and searches for the next LBA range to handle. Previously, the device model would re-read the trim buffer from guest memory each time. However, this was subject to some unpleasant races if the guest changed the PRDT entries or CFIS while a command was in flight. Instead, read the buffer of trim ranges once and cache it across multipe internal blockif requests. Reviewed by: mav Fixes: 71fa171c6480 bhyve: Initialize stack buffer in pci_ahci Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47224 (cherry picked from commit 8c8ebbb045185396083cd3e4d333fe1851930ee7) (cherry picked from commit 3981cf108773d6b29c8e100bc3b4a105eae681ec) --- usr.sbin/bhyve/pci_ahci.c | 145 ++++++++++++++++++++++++++++++---------------- 1 file changed, 95 insertions(+), 50 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 33ca389944f8..67c13a043e02 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -126,6 +126,7 @@ struct ahci_ioreq { STAILQ_ENTRY(ahci_ioreq) io_flist; TAILQ_ENTRY(ahci_ioreq) io_blist; uint8_t *cfis; + uint8_t *dsm; uint32_t len; uint32_t done; int slot; @@ -213,6 +214,8 @@ struct pci_ahci_softc { }; #define ahci_ctx(sc) ((sc)->asc_pi->pi_vmctx) +static void ahci_handle_next_trim(struct ahci_port *p, int slot, uint8_t *cfis, + uint8_t *buf, uint32_t len, uint32_t done); static void ahci_handle_port(struct ahci_port *p); static inline void lba_to_msf(uint8_t *buf, int lba) @@ -812,18 +815,14 @@ read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, } static void -ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done) +ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis) { - struct ahci_ioreq *aior; - struct blockif_req *breq; - uint8_t *entry; - uint64_t elba; - uint32_t len, elen; - int err, first, ncq; - uint8_t buf[512]; - unsigned int written; + uint32_t len; + int ncq; + uint8_t *buf; + unsigned int nread; - first = (done == 0); + buf = NULL; if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { len = (uint16_t)cfis[13] << 8 | cfis[12]; len *= 512; @@ -833,39 +832,84 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done len *= 512; ncq = 1; } - written = read_prdt(p, slot, cfis, buf, sizeof(buf)); - memset(buf + written, 0, sizeof(buf) - written); -next: - if (done >= sizeof(buf) - 8) - return; - entry = &buf[done]; - elba = ((uint64_t)entry[5] << 40) | - ((uint64_t)entry[4] << 32) | - ((uint64_t)entry[3] << 24) | - ((uint64_t)entry[2] << 16) | - ((uint64_t)entry[1] << 8) | - entry[0]; - elen = (uint16_t)entry[7] << 8 | entry[6]; - done += 8; - if (elen == 0) { - if (done >= len) { - if (ncq) { - if (first) - ahci_write_fis_d2h_ncq(p, slot); - ahci_write_fis_sdb(p, slot, cfis, - ATA_S_READY | ATA_S_DSC); - } else { - ahci_write_fis_d2h(p, slot, cfis, - ATA_S_READY | ATA_S_DSC); - } + /* Support for only a single block is advertised via IDENTIFY. */ + if (len > 512) { + goto invalid_command; + } + + buf = malloc(len); + nread = read_prdt(p, slot, cfis, buf, len); + if (nread != len) { + goto invalid_command; + } + ahci_handle_next_trim(p, slot, cfis, buf, len, 0); + return; + +invalid_command: + free(buf); + if (ncq) { + ahci_write_fis_d2h_ncq(p, slot); + ahci_write_fis_sdb(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + } else { + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + } +} + +static void +ahci_handle_next_trim(struct ahci_port *p, int slot, uint8_t *cfis, + uint8_t *buf, uint32_t len, uint32_t done) +{ + struct ahci_ioreq *aior; + struct blockif_req *breq; + uint8_t *entry; + uint64_t elba; + uint32_t elen; + int err; + bool first, ncq; + + first = (done == 0); + if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { + ncq = false; + } else { /* ATA_SEND_FPDMA_QUEUED */ + ncq = true; + } + + /* Find the next range to TRIM. */ + while (done < len) { + entry = &buf[done]; + elba = ((uint64_t)entry[5] << 40) | + ((uint64_t)entry[4] << 32) | + ((uint64_t)entry[3] << 24) | + ((uint64_t)entry[2] << 16) | + ((uint64_t)entry[1] << 8) | + entry[0]; + elen = (uint16_t)entry[7] << 8 | entry[6]; + done += 8; + if (elen != 0) + break; + } + + /* All remaining ranges were empty. */ + if (done == len) { + free(buf); + if (ncq) { + if (first) + ahci_write_fis_d2h_ncq(p, slot); + ahci_write_fis_sdb(p, slot, cfis, + ATA_S_READY | ATA_S_DSC); + } else { + ahci_write_fis_d2h(p, slot, cfis, + ATA_S_READY | ATA_S_DSC); + } + if (!first) { p->pending &= ~(1 << slot); ahci_check_stopped(p); - if (!first) - ahci_handle_port(p); - return; + ahci_handle_port(p); } - goto next; + return; } /* @@ -878,6 +922,7 @@ next: aior->slot = slot; aior->len = len; aior->done = done; + aior->dsm = buf; aior->more = (len != done); breq = &aior->io_req; @@ -1755,7 +1800,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) case ATA_DATA_SET_MANAGEMENT: if (cfis[11] == 0 && cfis[3] == ATA_DSM_TRIM && cfis[13] == 0 && cfis[12] == 1) { - ahci_handle_dsm_trim(p, slot, cfis, 0); + ahci_handle_dsm_trim(p, slot, cfis); break; } ahci_write_fis_d2h(p, slot, cfis, @@ -1765,7 +1810,7 @@ ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) if ((cfis[13] & 0x1f) == ATA_SFPDMA_DSM && cfis[17] == 0 && cfis[16] == ATA_DSM_TRIM && cfis[11] == 0 && cfis[3] == 1) { - ahci_handle_dsm_trim(p, slot, cfis, 0); + ahci_handle_dsm_trim(p, slot, cfis); break; } ahci_write_fis_d2h(p, slot, cfis, @@ -1903,12 +1948,12 @@ ata_ioreq_cb(struct blockif_req *br, int err) struct ahci_port *p; struct pci_ahci_softc *sc; uint32_t tfd; - uint8_t *cfis; - int slot, ncq, dsm; + uint8_t *cfis, *dsm; + int slot, ncq; DPRINTF("%s %d", __func__, err); - ncq = dsm = 0; + ncq = 0; aior = br->br_param; p = aior->io_pr; cfis = aior->cfis; @@ -1920,10 +1965,8 @@ ata_ioreq_cb(struct blockif_req *br, int err) cfis[2] == ATA_READ_FPDMA_QUEUED || cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; - if (cfis[2] == ATA_DATA_SET_MANAGEMENT || - (cfis[2] == ATA_SEND_FPDMA_QUEUED && - (cfis[13] & 0x1f) == ATA_SFPDMA_DSM)) - dsm = 1; + dsm = aior->dsm; + aior->dsm = NULL; pthread_mutex_lock(&sc->mtx); @@ -1941,8 +1984,9 @@ ata_ioreq_cb(struct blockif_req *br, int err) hdr->prdbc = aior->done; if (!err && aior->more) { - if (dsm) - ahci_handle_dsm_trim(p, slot, cfis, aior->done); + if (dsm != NULL) + ahci_handle_next_trim(p, slot, cfis, dsm, + aior->len, aior->done); else ahci_handle_rw(p, slot, cfis, aior->done); goto out; @@ -1964,6 +2008,7 @@ ata_ioreq_cb(struct blockif_req *br, int err) ahci_check_stopped(p); ahci_handle_port(p); + free(dsm); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit", __func__); From nobody Wed Nov 20 17:17:24 2024 X-Original-To: dev-commits-src-branches@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 4Xtp2X3qqbz5dWND; Wed, 20 Nov 2024 17:17:24 +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 4Xtp2X38mkz4Q5L; Wed, 20 Nov 2024 17:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732123044; 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=8dTprC6kDfeORg1XyThLw7rOOhCFOhKly3P+gqq1EDo=; b=xOqGpMUZBp7EYGYK4TcyPpc9j4VI03lAkbRrG0kjvolSIVcRQKd6zj1M5uOHxBiqfQjxv8 D9MCda1yT9TTlDPfYJQskapvVLlirku0ZZfgi+WQB5v24fs+u7bJFTp88ib3C5xBTLckGo C2VX9ZUBBK8QpcK5Pp97Dq0CvLywvikMKnwoenKO6ttuOuyoxLFP+Blb7sGC1nJMg+dzUO w+on0Vo0aMl6upItB4C1li7RGUjZIF3ELERJGoLzavXVpibfRTmMhdttsxy5wNzxWA5nTt mXlsNPThw3I+ujCktdsOMg3bcrfGz1SUb3+22495nCA9cf/rCh+CgvmiAB1kVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732123044; 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=8dTprC6kDfeORg1XyThLw7rOOhCFOhKly3P+gqq1EDo=; b=PJ/e4p4TSju7IXhlgAt2qWHLbc8Z2qLAjuEWyrZnf+c0SKLmoYSxy7u7ytCDwL5+sJ5YUL yWs/RdaS1PTL7iKfSw9jjY58ui7rl9/clYBUi/ujDuq4Z4Xsv5Mae8vgvHc/WNg5SiXX1b QcD0c0PHzpPzTTbJVJ/m6HdeqkgyoC3442d0J18G2zROfNxWxmgm21yhYa2xHOLCBCn5MQ foOmFekBnB2tj10X6jqoXFhNR4RvuJUi+e5Rt4Rxl+kxF7P5/msovJ78XYWWGnsZnaHiAo vpE7yZvIl8oLQTDwNxirysQkmEoccMJT35S+QqXZGzQ2gTRl88HZ4HgrbEHaBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732123044; a=rsa-sha256; cv=none; b=qAbUcwCmL4k1WlUH/pKOPdZAzP02gPqhlfwb1cT6Z9qaJvdju3pTlX9/AKCYtHHfXQ1QLs 9/gh+IMPD7Ki55fqdis8VXlhs7agNZtt8+caSCPg8re84J+VZd72ol4FHLdXt08HYkDL/k PwNVxPlGrWz/E0IMqRPIrsyAGTLowXQGu5Mg/ecFyqf3IfdEus94a1FuIWqHuEul6pLHIH eRjdMzs4NkPCuXmNlETUTBwHtaaYLH/cOy109GdCCAegIq+8JPIPATLdnEndT1Wm+zQTX8 jtLU3QBPMezkciDHpaVbuUvQs9a6jiXw/sBAuDJN+mZQHvM/D6qS+KQsm3u7Kw== 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 4Xtp2X2XcKz13fZ; Wed, 20 Nov 2024 17:17:24 +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 4AKHHOSA027264; Wed, 20 Nov 2024 17:17:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKHHOnT027261; Wed, 20 Nov 2024 17:17:24 GMT (envelope-from git) Date: Wed, 20 Nov 2024 17:17:24 GMT Message-Id: <202411201717.4AKHHOnT027261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Doug Rabson Subject: git: 4a768794b836 - stable/14 - release: Add missing dependencies in the minimal OCI image List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4a768794b836f781ecf798949b60e5c5d305f136 Auto-Submitted: auto-generated The branch stable/14 has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=4a768794b836f781ecf798949b60e5c5d305f136 commit 4a768794b836f781ecf798949b60e5c5d305f136 Author: Doug Rabson AuthorDate: 2024-11-18 10:05:29 +0000 Commit: Doug Rabson CommitDate: 2024-11-20 17:16:42 +0000 release: Add missing dependencies in the minimal OCI image The pkg-bootstrap binary depends on fetch. Approved by: re Reviewed by: cperciva, emaste, bapt Differential Revision: https://reviews.freebsd.org/D47661 MFC after: 1 day (cherry picked from commit ca1f1d2c9419a5d66929ca6880b69901254645a6) --- release/tools/oci-image-minimal.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/oci-image-minimal.conf b/release/tools/oci-image-minimal.conf index 122da1905436..82e2ce6a1bd3 100644 --- a/release/tools/oci-image-minimal.conf +++ b/release/tools/oci-image-minimal.conf @@ -12,7 +12,10 @@ oci_image_build() { FreeBSD-runtime \ FreeBSD-certctl \ FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-fetch \ FreeBSD-rc \ FreeBSD-pkg-bootstrap \ FreeBSD-mtree From nobody Wed Nov 20 21:41:16 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv16rc3z5dnNm; Wed, 20 Nov 2024 21:41:17 +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 4Xtvv11F94z4vk0; Wed, 20 Nov 2024 21:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138877; 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=GTvGDWRvCUkNsh1kRansgFWkDtOIqe01kgHT8vbVxcg=; b=aBGDDZ841B51TWzI498rvbbIGMfv7Wk8ex0L0AAlkABJvkVQLGAWR/FiieC1q4UnKUTHRx MXVGNxRt8K9AdiUACWVro3V0Dfonv2wtQycUba5jWAQnr91SNzh+T262WoCGeAds58j9GM FJuMvkxJJog+3H6gFMQWMZrbqUhbNH3VZIHUQliJ12iCY7jAljVghvZIzum6Yxh2KjVRcQ oWzdqfT0i9hNARGNKH6LuTZhyKqldXK/rHk4Ya0LDcT9FhC7GZ4OHUCN0syqcsLpqyvQUb gllhgSROGuVEY2Q5RyMbVhbbmBHHyy3kPzEgDiEogmh9ket0qJ41jNnNmb9iuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138877; 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=GTvGDWRvCUkNsh1kRansgFWkDtOIqe01kgHT8vbVxcg=; b=v0tzhJ1xfx+OPZdjfm/peF/ckvW89va1zy7ozJMBb1EzfW/TeOOwewn5ywYcdPFw3KmGDi QUG6he28oaNoDrebFDPM9SCpmRvR8qMYC0l87Nmh0Vl0CV6cLy6EB3uzBmAUf6PLOIEyty cK6ETedN8O7J3DXb88Vmye3UBJlQMGMfun2tQg9nRqE0fVYngNKt8/eEsbifT3EiBm4Tjx CHqBt05AZFT0KJU80nkEeptAayK1MS44vi3q7B1VnRLLcKaQTst0thMP9sUS5UllJWlz5P o/E7C4D9E1KFYaXgH/Rp7oCGTJH83lRjqAZ8S12e+Uj9skeYAv0o+wxfGC5SBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138877; a=rsa-sha256; cv=none; b=cZ61OYPB6nsEKy770PGNTQS7JfGvJY/xpCnxFflB+4/vJYsUFx++1ppXMFv0nr0k1+dpRm TUuVHd5MK8LRKmSyxHz5CIa6n/BUwjPb4joJwngri9QQgaRMWaPXR1HRspFJIJ4KJ/aHOg AJU1yhoET5MUQMsih8nGClJGjGu/OMi3CWvuJGaETmZI1QoDAMC4B0K+Z2eXMQKa3/1cQG 1GHLUPRP2dhKcdZM8qJbG39h76NtGM3VoCLH+OQojrjGJXPyt7hLqVrWdbfNq6rUO1dLeR CRL01DxudXiIGC66za2z0D7F8vs6osvtizID0lT7RklACyPV0k75ibV5IqFm3w== 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 4Xtvv06P0Xz19td; Wed, 20 Nov 2024 21:41:16 +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 4AKLfGi1021992; Wed, 20 Nov 2024 21:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfGoa021989; Wed, 20 Nov 2024 21:41:16 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:16 GMT Message-Id: <202411202141.4AKLfGoa021989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c7aea0912655 - stable/14 - gve: Add DQO RDA support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c7aea091265580ea178df1ee2d26cda3c7aef75b Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c7aea091265580ea178df1ee2d26cda3c7aef75b commit c7aea091265580ea178df1ee2d26cda3c7aef75b Author: Shailend Chand AuthorDate: 2024-11-05 19:38:29 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Add DQO RDA support DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes. One major change with DQO from its predecessor GQI is that it uses dual descriptor rings for both TX and RX queues. The TX path uses a descriptor ring to send descriptors to HW, and receives packet completion events on a TX completion ring. The RX path posts buffers to HW using an RX descriptor ring and receives incoming packets on an RX completion ring. In GQI-QPL, the hardware could not access arbitrary regions of guest memory, which is why there was a pre-negotitated bounce buffer (QPL: Queue Page List). DQO-RDA has no such limitation. "RDA" is in contrast to QPL and stands for "Raw DMA Addressing" which just means that HW does not need a fixed bounce buffer and can DMA arbitrary regions of guest memory. A subsequent patch will introduce the DQO-QPL datapath that uses the same descriptor format as in this patch, but will have a fixed bounce buffer. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46690 (cherry picked from commit d438b4ef0cfc6986b93d0754f49ebf3ead50f269) --- share/man/man4/gve.4 | 53 +++- sys/conf/files | 2 + sys/dev/gve/gve.h | 213 +++++++++++-- sys/dev/gve/gve_adminq.c | 123 +++++++- sys/dev/gve/gve_adminq.h | 55 +++- sys/dev/gve/gve_dqo.h | 306 ++++++++++++++++++ sys/dev/gve/gve_main.c | 67 +++- sys/dev/gve/gve_plat.h | 3 + sys/dev/gve/gve_rx.c | 110 +++++-- sys/dev/gve/gve_rx_dqo.c | 633 +++++++++++++++++++++++++++++++++++++ sys/dev/gve/gve_sysctl.c | 60 +++- sys/dev/gve/gve_tx.c | 139 ++++++--- sys/dev/gve/gve_tx_dqo.c | 793 +++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/gve/gve_utils.c | 46 ++- sys/modules/gve/Makefile | 12 +- 15 files changed, 2471 insertions(+), 144 deletions(-) diff --git a/share/man/man4/gve.4 b/share/man/man4/gve.4 index 7dba99e68773..82db2af548ae 100644 --- a/share/man/man4/gve.4 +++ b/share/man/man4/gve.4 @@ -1,6 +1,6 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" -.\" Copyright (c) 2023 Google LLC +.\" Copyright (c) 2023-2024 Google LLC .\" .\" Redistribution and use in source and binary forms, with or without modification, .\" are permitted provided that the following conditions are met: @@ -26,7 +26,7 @@ .\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.Dd April 26, 2023 +.Dd October 14, 2024 .Dt GVE 4 .Os .Sh NAME @@ -192,16 +192,61 @@ These two messages correspoond to the NIC alerting the driver to link state chan .Pp Apart from these messages, the driver exposes per-queue packet and error counters as sysctl nodes. Global (across queues) counters can be read using -.Xr netstat 8 . +.Xr netstat 1 . +.Sh SYSCTL VARIABLES +.Nm +exposes the following +.Xr sysctl 8 +variables: +.Bl -tag -width indent +.It Va hw.gve.driver_version +The driver version. +This is read-only. +.It Va hw.gve.queue_format +The queue format in use. +This is read-only. +.It Va hw.gve.disable_hw_lro +Setting this boot-time tunable to 1 disables Large Receive Offload (LRO) in the NIC. +The default value is 0, which means hardware LRO is enabled by default. +The software LRO stack in the kernel is always used. +This sysctl variable needs to be set before loading the driver, using +.Xr loader.conf 5 . +.El .Sh LIMITATIONS .Nm does not support the transmission of VLAN-tagged packets. All VLAN-tagged traffic is dropped. +.Sh QUEUE FORMATS +.Nm +features different datapath modes called queue formats: +.Pp +.Bl -bullet -compact +.It +GQI_QPL: "QPL" stands for "Queue Page List" and refers to the fact that +hardware expects a fixed bounce buffer and cannot access arbitrary memory. +GQI is the older descriptor format. +The G in "GQI" refers to an older generation of hardware, and the "QI" +stands for "Queue In-order" referring to the fact that the NIC sends +Tx and Rx completions in the same order as the one in which the corresponding +descriptors were posted by the driver. +.It +DQO_RDA: DQO is the descriptor format required to take full advantage of +next generation VM shapes. +"RDA" stands for "Raw DMA Addressing" and refers to the fact that hardware +can work with DMA-ed packets and does not expect them to be copied into or +out of a fixed bounce buffer. +The D in "DQO" refers to a newer generation of hardware, and the "QO" +stands for "Queue Out-of-order" referring to the fact that the NIC might +send Tx and Rx completions in an order different from the one in which +the corresponding descriptors were posted by the driver. +.El .Sh SUPPORT Please email gvnic-drivers@google.com with the specifics of the issue encountered. .Sh SEE ALSO +.Xr netstat 1 , +.Xr loader.conf 5 , .Xr ifconfig 8 , -.Xr netstat 8 +.Xr sysctl 8 .Sh HISTORY The .Nm diff --git a/sys/conf/files b/sys/conf/files index 3810032f7094..68ca2fe2e6ec 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1737,8 +1737,10 @@ dev/gve/gve_adminq.c optional gve dev/gve/gve_main.c optional gve dev/gve/gve_qpl.c optional gve dev/gve/gve_rx.c optional gve +dev/gve/gve_rx_dqo.c optional gve dev/gve/gve_sysctl.c optional gve dev/gve/gve_tx.c optional gve +dev/gve/gve_tx_dqo.c optional gve dev/gve/gve_utils.c optional gve dev/goldfish/goldfish_rtc.c optional goldfish_rtc fdt dev/gpio/acpi_gpiobus.c optional acpi gpio diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index c446199dff2d..98f1139c6bc2 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -53,6 +53,9 @@ /* Each RX bounce buffer page can fit two packet buffers. */ #define GVE_DEFAULT_RX_BUFFER_OFFSET (PAGE_SIZE / 2) +/* PTYPEs are always 10 bits. */ +#define GVE_NUM_PTYPES 1024 + /* * Number of descriptors per queue page list. * Page count AKA QPL size can be derived by dividing the number of elements in @@ -224,30 +227,61 @@ struct gve_rxq_stats { counter_u64_t rx_frag_copy_cnt; counter_u64_t rx_dropped_pkt_desc_err; counter_u64_t rx_dropped_pkt_mbuf_alloc_fail; + counter_u64_t rx_mbuf_dmamap_err; + counter_u64_t rx_mbuf_mclget_null; }; #define NUM_RX_STATS (sizeof(struct gve_rxq_stats) / sizeof(counter_u64_t)) +struct gve_rx_buf_dqo { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint64_t addr; + bool mapped; + SLIST_ENTRY(gve_rx_buf_dqo) slist_entry; +}; + /* power-of-2 sized receive ring */ struct gve_rx_ring { struct gve_ring_com com; struct gve_dma_handle desc_ring_mem; - struct gve_dma_handle data_ring_mem; - - /* accessed in the receive hot path */ - struct { - struct gve_rx_desc *desc_ring; - union gve_rx_data_slot *data_ring; - struct gve_rx_slot_page_info *page_info; - - struct gve_rx_ctx ctx; - struct lro_ctrl lro; - uint8_t seq_no; /* helps traverse the descriptor ring */ - uint32_t cnt; /* free-running total number of completed packets */ - uint32_t fill_cnt; /* free-running total number of descs and buffs posted */ - uint32_t mask; /* masks the cnt and fill_cnt to the size of the ring */ - struct gve_rxq_stats stats; - } __aligned(CACHE_LINE_SIZE); + uint32_t cnt; /* free-running total number of completed packets */ + uint32_t fill_cnt; /* free-running total number of descs and buffs posted */ + + union { + /* GQI-only fields */ + struct { + struct gve_dma_handle data_ring_mem; + + /* accessed in the GQ receive hot path */ + struct gve_rx_desc *desc_ring; + union gve_rx_data_slot *data_ring; + struct gve_rx_slot_page_info *page_info; + uint32_t mask; /* masks the cnt and fill_cnt to the size of the ring */ + uint8_t seq_no; /* helps traverse the descriptor ring */ + }; + + /* DQO-only fields */ + struct { + struct gve_dma_handle compl_ring_mem; + + struct gve_rx_compl_desc_dqo *compl_ring; + struct gve_rx_desc_dqo *desc_ring; + struct gve_rx_buf_dqo *bufs; /* Parking place for posted buffers */ + bus_dma_tag_t buf_dmatag; /* To dmamap posted mbufs with */ + + uint32_t buf_cnt; /* Size of the bufs array */ + uint32_t mask; /* One less than the sizes of the desc and compl rings */ + uint32_t head; /* The index at which to post the next buffer at */ + uint32_t tail; /* The index at which to receive the next compl at */ + uint8_t cur_gen_bit; /* Gets flipped on every cycle of the compl ring */ + SLIST_HEAD(, gve_rx_buf_dqo) free_bufs; + } dqo; + }; + + struct lro_ctrl lro; + struct gve_rx_ctx ctx; + struct gve_rxq_stats stats; } __aligned(CACHE_LINE_SIZE); @@ -277,11 +311,26 @@ struct gve_txq_stats { counter_u64_t tx_dropped_pkt; counter_u64_t tx_dropped_pkt_nospace_device; counter_u64_t tx_dropped_pkt_nospace_bufring; + counter_u64_t tx_delayed_pkt_nospace_descring; + counter_u64_t tx_delayed_pkt_nospace_compring; + counter_u64_t tx_delayed_pkt_tsoerr; counter_u64_t tx_dropped_pkt_vlan; + counter_u64_t tx_mbuf_collapse; + counter_u64_t tx_mbuf_defrag; + counter_u64_t tx_mbuf_defrag_err; + counter_u64_t tx_mbuf_dmamap_enomem_err; + counter_u64_t tx_mbuf_dmamap_err; }; #define NUM_TX_STATS (sizeof(struct gve_txq_stats) / sizeof(counter_u64_t)) +struct gve_tx_pending_pkt_dqo { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint8_t state; /* the gve_packet_state enum */ + int next; /* To chain the free_pending_pkts lists */ +}; + /* power-of-2 sized transmit ring */ struct gve_tx_ring { struct gve_ring_com com; @@ -290,22 +339,95 @@ struct gve_tx_ring { struct task xmit_task; struct taskqueue *xmit_tq; - /* accessed in the transmit hot path */ - struct { - union gve_tx_desc *desc_ring; - struct gve_tx_buffer_state *info; - struct buf_ring *br; + /* Accessed when writing descriptors */ + struct buf_ring *br; + struct mtx ring_mtx; + + uint32_t req; /* free-running total number of packets written to the nic */ + uint32_t done; /* free-running total number of completed packets */ + + union { + /* GQI specific stuff */ + struct { + union gve_tx_desc *desc_ring; + struct gve_tx_buffer_state *info; + + struct gve_tx_fifo fifo; + + uint32_t mask; /* masks the req and done to the size of the ring */ + }; + + /* DQO specific stuff */ + struct { + struct gve_dma_handle compl_ring_mem; + + /* Accessed when writing descriptors */ + struct { + union gve_tx_desc_dqo *desc_ring; + uint32_t desc_mask; /* masks head and tail to the size of desc_ring */ + uint32_t desc_head; /* last desc read by NIC, cached value of hw_tx_head */ + uint32_t desc_tail; /* last desc written by driver */ + uint32_t last_re_idx; /* desc which last had "report event" set */ + + /* + * The head index of a singly linked list containing pending packet objects + * to park mbufs till the NIC sends completions. Once this list is depleted, + * the "_prd" suffixed producer list, grown by the completion taskqueue, + * is stolen. + */ + int32_t free_pending_pkts_csm; + + bus_dma_tag_t buf_dmatag; /* DMA params for mapping Tx mbufs */ + } __aligned(CACHE_LINE_SIZE); + + /* Accessed when processing completions */ + struct { + struct gve_tx_compl_desc_dqo *compl_ring; + uint32_t compl_mask; /* masks head to the size of compl_ring */ + uint32_t compl_head; /* last completion read by driver */ + uint8_t cur_gen_bit; /* NIC flips a bit on every pass */ + uint32_t hw_tx_head; /* last desc read by NIC */ + + /* + * The completion taskqueue moves pending-packet objects to this + * list after freeing the mbuf. The "_prd" denotes that this is + * a producer list. The trasnmit taskqueue steals this list once + * its consumer list, with the "_csm" suffix, is depleted. + */ + int32_t free_pending_pkts_prd; + } __aligned(CACHE_LINE_SIZE); + + /* Accessed by both the completion and xmit loops */ + struct { + /* completion tags index into this array */ + struct gve_tx_pending_pkt_dqo *pending_pkts; + uint16_t num_pending_pkts; + } __aligned(CACHE_LINE_SIZE); + } dqo; + }; + struct gve_txq_stats stats; +} __aligned(CACHE_LINE_SIZE); - struct gve_tx_fifo fifo; - struct mtx ring_mtx; +enum gve_packet_state { + /* + * Packet does not yet have a dmamap created. + * This should always be zero since state is not explicitly initialized. + */ + GVE_PACKET_STATE_UNALLOCATED, + /* Packet has a dmamap and is in free list, available to be allocated. */ + GVE_PACKET_STATE_FREE, + /* Packet is expecting a regular data completion */ + GVE_PACKET_STATE_PENDING_DATA_COMPL, +}; - uint32_t req; /* free-running total number of packets written to the nic */ - uint32_t done; /* free-running total number of completed packets */ - uint32_t mask; /* masks the req and done to the size of the ring */ - struct gve_txq_stats stats; - } __aligned(CACHE_LINE_SIZE); +struct gve_ptype { + uint8_t l3_type; /* `gve_l3_type` in gve_adminq.h */ + uint8_t l4_type; /* `gve_l4_type` in gve_adminq.h */ +}; -} __aligned(CACHE_LINE_SIZE); +struct gve_ptype_lut { + struct gve_ptype ptypes[GVE_NUM_PTYPES]; +}; struct gve_priv { if_t ifp; @@ -348,6 +470,8 @@ struct gve_priv { struct gve_tx_ring *tx; struct gve_rx_ring *rx; + struct gve_ptype_lut *ptype_lut_dqo; + /* * Admin queue - see gve_adminq.h * Since AQ cmds do not run in steady state, 32 bit counters suffice @@ -370,6 +494,7 @@ struct gve_priv { uint32_t adminq_dcfg_device_resources_cnt; uint32_t adminq_set_driver_parameter_cnt; uint32_t adminq_verify_driver_compatibility_cnt; + uint32_t adminq_get_ptype_map_cnt; uint32_t interface_up_cnt; uint32_t interface_down_cnt; @@ -400,6 +525,12 @@ gve_clear_state_flag(struct gve_priv *priv, int pos) BIT_CLR_ATOMIC(GVE_NUM_STATE_FLAGS, pos, &priv->state_flags); } +static inline bool +gve_is_gqi(struct gve_priv *priv) +{ + return (priv->queue_format == GVE_GQI_QPL_FORMAT); +} + /* Defined in gve_main.c */ void gve_schedule_reset(struct gve_priv *priv); @@ -407,6 +538,7 @@ void gve_schedule_reset(struct gve_priv *priv); uint32_t gve_reg_bar_read_4(struct gve_priv *priv, bus_size_t offset); void gve_reg_bar_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); void gve_db_bar_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); +void gve_db_bar_dqo_write_4(struct gve_priv *priv, bus_size_t offset, uint32_t val); /* QPL (Queue Page List) functions defined in gve_qpl.c */ int gve_alloc_qpls(struct gve_priv *priv); @@ -425,6 +557,14 @@ void gve_qflush(if_t ifp); void gve_xmit_tq(void *arg, int pending); void gve_tx_cleanup_tq(void *arg, int pending); +/* TX functions defined in gve_tx_dqo.c */ +int gve_tx_alloc_ring_dqo(struct gve_priv *priv, int i); +void gve_tx_free_ring_dqo(struct gve_priv *priv, int i); +void gve_clear_tx_ring_dqo(struct gve_priv *priv, int i); +int gve_tx_intr_dqo(void *arg); +int gve_xmit_dqo(struct gve_tx_ring *tx, struct mbuf **mbuf_ptr); +void gve_tx_cleanup_tq_dqo(void *arg, int pending); + /* RX functions defined in gve_rx.c */ int gve_alloc_rx_rings(struct gve_priv *priv); void gve_free_rx_rings(struct gve_priv *priv); @@ -433,6 +573,14 @@ int gve_destroy_rx_rings(struct gve_priv *priv); int gve_rx_intr(void *arg); void gve_rx_cleanup_tq(void *arg, int pending); +/* RX functions defined in gve_rx_dqo.c */ +int gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i); +void gve_rx_free_ring_dqo(struct gve_priv *priv, int i); +void gve_rx_prefill_buffers_dqo(struct gve_rx_ring *rx); +void gve_clear_rx_ring_dqo(struct gve_priv *priv, int i); +int gve_rx_intr_dqo(void *arg); +void gve_rx_cleanup_tq_dqo(void *arg, int pending); + /* DMA functions defined in gve_utils.c */ int gve_dma_alloc_coherent(struct gve_priv *priv, int size, int align, struct gve_dma_handle *dma); @@ -447,7 +595,10 @@ int gve_alloc_irqs(struct gve_priv *priv); void gve_unmask_all_queue_irqs(struct gve_priv *priv); void gve_mask_all_queue_irqs(struct gve_priv *priv); -/* Systcl functions defined in gve_sysctl.c*/ +/* Systcl functions defined in gve_sysctl.c */ +extern bool gve_disable_hw_lro; +extern char gve_queue_format[8]; +extern char gve_version[8]; void gve_setup_sysctl(struct gve_priv *priv); void gve_accum_stats(struct gve_priv *priv, uint64_t *rpackets, uint64_t *rbytes, uint64_t *rx_dropped_pkt, uint64_t *tpackets, diff --git a/sys/dev/gve/gve_adminq.c b/sys/dev/gve/gve_adminq.c index 3c332607ebd4..7865b979888b 100644 --- a/sys/dev/gve/gve_adminq.c +++ b/sys/dev/gve/gve_adminq.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -57,6 +57,7 @@ void gve_parse_device_option(struct gve_priv *priv, struct gve_device_descriptor *device_descriptor, struct gve_device_option *option, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, + struct gve_device_option_dqo_rda **dev_op_dqo_rda, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { uint32_t req_feat_mask = be32toh(option->required_features_mask); @@ -85,6 +86,23 @@ void gve_parse_device_option(struct gve_priv *priv, *dev_op_gqi_qpl = (void *)(option + 1); break; + case GVE_DEV_OPT_ID_DQO_RDA: + if (option_length < sizeof(**dev_op_dqo_rda) || + req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA) { + device_printf(priv->dev, GVE_DEVICE_OPTION_ERROR_FMT, + "DQO RDA", (int)sizeof(**dev_op_dqo_rda), + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA, + option_length, req_feat_mask); + break; + } + + if (option_length > sizeof(**dev_op_dqo_rda)) { + device_printf(priv->dev, GVE_DEVICE_OPTION_TOO_BIG_FMT, + "DQO RDA"); + } + *dev_op_dqo_rda = (void *)(option + 1); + break; + case GVE_DEV_OPT_ID_JUMBO_FRAMES: if (option_length < sizeof(**dev_op_jumbo_frames) || req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES) { @@ -117,6 +135,7 @@ static int gve_process_device_options(struct gve_priv *priv, struct gve_device_descriptor *descriptor, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, + struct gve_device_option_dqo_rda **dev_op_dqo_rda, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { char *desc_end = (char *)descriptor + be16toh(descriptor->total_length); @@ -130,12 +149,12 @@ gve_process_device_options(struct gve_priv *priv, if ((char *)(dev_opt + 1) > desc_end || (char *)(dev_opt + 1) + be16toh(dev_opt->option_length) > desc_end) { device_printf(priv->dev, - "options exceed device_descriptor's total length.\n"); + "options exceed device descriptor's total length.\n"); return (EINVAL); } gve_parse_device_option(priv, descriptor, dev_opt, - dev_op_gqi_qpl, dev_op_jumbo_frames); + dev_op_gqi_qpl, dev_op_dqo_rda, dev_op_jumbo_frames); dev_opt = (void *)((char *)(dev_opt + 1) + be16toh(dev_opt->option_length)); } @@ -221,16 +240,35 @@ gve_adminq_create_rx_queue(struct gve_priv *priv, uint32_t queue_index) cmd.opcode = htobe32(GVE_ADMINQ_CREATE_RX_QUEUE); cmd.create_rx_queue = (struct gve_adminq_create_rx_queue) { .queue_id = htobe32(queue_index), - .index = htobe32(queue_index), .ntfy_id = htobe32(rx->com.ntfy_id), .queue_resources_addr = htobe64(qres_dma->bus_addr), - .rx_desc_ring_addr = htobe64(rx->desc_ring_mem.bus_addr), - .rx_data_ring_addr = htobe64(rx->data_ring_mem.bus_addr), - .queue_page_list_id = htobe32((rx->com.qpl)->id), .rx_ring_size = htobe16(priv->rx_desc_cnt), .packet_buffer_size = htobe16(GVE_DEFAULT_RX_BUFFER_SIZE), }; + if (gve_is_gqi(priv)) { + cmd.create_rx_queue.rx_desc_ring_addr = + htobe64(rx->desc_ring_mem.bus_addr); + cmd.create_rx_queue.rx_data_ring_addr = + htobe64(rx->data_ring_mem.bus_addr); + cmd.create_rx_queue.index = + htobe32(queue_index); + cmd.create_rx_queue.queue_page_list_id = + htobe32((rx->com.qpl)->id); + } else { + cmd.create_rx_queue.queue_page_list_id = + htobe32(GVE_RAW_ADDRESSING_QPL_ID); + cmd.create_rx_queue.rx_desc_ring_addr = + htobe64(rx->dqo.compl_ring_mem.bus_addr); + cmd.create_rx_queue.rx_data_ring_addr = + htobe64(rx->desc_ring_mem.bus_addr); + cmd.create_rx_queue.rx_buff_ring_size = + htobe16(priv->rx_desc_cnt); + cmd.create_rx_queue.enable_rsc = + !!((if_getcapenable(priv->ifp) & IFCAP_LRO) && + !gve_disable_hw_lro); + } + return (gve_adminq_execute_cmd(priv, &cmd)); } @@ -272,11 +310,21 @@ gve_adminq_create_tx_queue(struct gve_priv *priv, uint32_t queue_index) .queue_id = htobe32(queue_index), .queue_resources_addr = htobe64(qres_dma->bus_addr), .tx_ring_addr = htobe64(tx->desc_ring_mem.bus_addr), - .queue_page_list_id = htobe32((tx->com.qpl)->id), .ntfy_id = htobe32(tx->com.ntfy_id), .tx_ring_size = htobe16(priv->tx_desc_cnt), }; + if (gve_is_gqi(priv)) { + cmd.create_tx_queue.queue_page_list_id = + htobe32((tx->com.qpl)->id); + } else { + cmd.create_tx_queue.queue_page_list_id = + htobe32(GVE_RAW_ADDRESSING_QPL_ID); + cmd.create_tx_queue.tx_comp_ring_addr = + htobe64(tx->dqo.compl_ring_mem.bus_addr); + cmd.create_tx_queue.tx_comp_ring_size = + htobe16(priv->tx_desc_cnt); + } return (gve_adminq_execute_cmd(priv, &cmd)); } @@ -338,6 +386,7 @@ gve_adminq_describe_device(struct gve_priv *priv) struct gve_device_descriptor *desc; struct gve_dma_handle desc_mem; struct gve_device_option_gqi_qpl *dev_op_gqi_qpl = NULL; + struct gve_device_option_dqo_rda *dev_op_dqo_rda = NULL; struct gve_device_option_jumbo_frames *dev_op_jumbo_frames = NULL; uint32_t supported_features_mask = 0; int rc; @@ -366,12 +415,24 @@ gve_adminq_describe_device(struct gve_priv *priv) bus_dmamap_sync(desc_mem.tag, desc_mem.map, BUS_DMASYNC_POSTREAD); - rc = gve_process_device_options(priv, desc, &dev_op_gqi_qpl, + rc = gve_process_device_options(priv, desc, + &dev_op_gqi_qpl, &dev_op_dqo_rda, &dev_op_jumbo_frames); if (rc != 0) goto free_device_descriptor; - if (dev_op_gqi_qpl != NULL) { + if (dev_op_dqo_rda != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "DQO RDA"); + priv->queue_format = GVE_DQO_RDA_FORMAT; + supported_features_mask = be32toh( + dev_op_dqo_rda->supported_features_mask); + if (bootverbose) + device_printf(priv->dev, + "Driver is running with DQO RDA queue format.\n"); + } else if (dev_op_gqi_qpl != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "GQI QPL"); priv->queue_format = GVE_GQI_QPL_FORMAT; supported_features_mask = be32toh( dev_op_gqi_qpl->supported_features_mask); @@ -380,7 +441,7 @@ gve_adminq_describe_device(struct gve_priv *priv) "Driver is running with GQI QPL queue format.\n"); } else { device_printf(priv->dev, "No compatible queue formats\n"); - rc = (EINVAL); + rc = EINVAL; goto free_device_descriptor; } @@ -506,6 +567,41 @@ gve_adminq_verify_driver_compatibility(struct gve_priv *priv, return (gve_adminq_execute_cmd(priv, &aq_cmd)); } +int +gve_adminq_get_ptype_map_dqo(struct gve_priv *priv, + struct gve_ptype_lut *ptype_lut_dqo) +{ + struct gve_adminq_command aq_cmd = (struct gve_adminq_command){}; + struct gve_ptype_map *ptype_map; + struct gve_dma_handle dma; + int err = 0; + int i; + + err = gve_dma_alloc_coherent(priv, sizeof(*ptype_map), PAGE_SIZE, &dma); + if (err) + return (err); + ptype_map = dma.cpu_addr; + + aq_cmd.opcode = htobe32(GVE_ADMINQ_GET_PTYPE_MAP); + aq_cmd.get_ptype_map = (struct gve_adminq_get_ptype_map) { + .ptype_map_len = htobe64(sizeof(*ptype_map)), + .ptype_map_addr = htobe64(dma.bus_addr), + }; + + err = gve_adminq_execute_cmd(priv, &aq_cmd); + if (err) + goto err; + + /* Populate ptype_lut_dqo. */ + for (i = 0; i < GVE_NUM_PTYPES; i++) { + ptype_lut_dqo->ptypes[i].l3_type = ptype_map->ptypes[i].l3_type; + ptype_lut_dqo->ptypes[i].l4_type = ptype_map->ptypes[i].l4_type; + } +err: + gve_dma_free_coherent(&dma); + return (err); +} + int gve_adminq_alloc(struct gve_priv *priv) { @@ -543,6 +639,7 @@ gve_adminq_alloc(struct gve_priv *priv) priv->adminq_destroy_rx_queue_cnt = 0; priv->adminq_dcfg_device_resources_cnt = 0; priv->adminq_set_driver_parameter_cnt = 0; + priv->adminq_get_ptype_map_cnt = 0; gve_reg_bar_write_4(priv, GVE_REG_ADMINQ_ADDR, priv->adminq_bus_addr / ADMINQ_SIZE); @@ -772,6 +869,10 @@ gve_adminq_issue_cmd(struct gve_priv *priv, struct gve_adminq_command *cmd_orig) priv->adminq_verify_driver_compatibility_cnt++; break; + case GVE_ADMINQ_GET_PTYPE_MAP: + priv->adminq_get_ptype_map_cnt++; + break; + default: device_printf(priv->dev, "Unknown AQ command opcode %d\n", opcode); } diff --git a/sys/dev/gve/gve_adminq.h b/sys/dev/gve/gve_adminq.h index 5923e5f353d1..b5d512331d42 100644 --- a/sys/dev/gve/gve_adminq.h +++ b/sys/dev/gve/gve_adminq.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-3-Clause * - * Copyright (c) 2023 Google LLC + * Copyright (c) 2023-2024 Google LLC * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -137,9 +137,11 @@ _Static_assert(sizeof(struct gve_device_option_gqi_qpl) == 4, struct gve_device_option_dqo_rda { __be32 supported_features_mask; + __be16 tx_comp_ring_entries; + __be16 rx_buff_ring_entries; }; -_Static_assert(sizeof(struct gve_device_option_dqo_rda) == 4, +_Static_assert(sizeof(struct gve_device_option_dqo_rda) == 8, "gve: bad admin queue struct length"); struct gve_device_option_modify_ring { @@ -196,7 +198,6 @@ enum gve_driver_capability { gve_driver_capability_gqi_rda = 1, gve_driver_capability_dqo_qpl = 2, /* reserved for future use */ gve_driver_capability_dqo_rda = 3, - gve_driver_capability_alt_miss_compl = 4, }; #define GVE_CAP1(a) BIT((int) a) @@ -209,7 +210,9 @@ enum gve_driver_capability { * Only a few bits (as shown in `gve_driver_compatibility`) are currently * defined. The rest are reserved for future use. */ -#define GVE_DRIVER_CAPABILITY_FLAGS1 (GVE_CAP1(gve_driver_capability_gqi_qpl)) +#define GVE_DRIVER_CAPABILITY_FLAGS1 \ + (GVE_CAP1(gve_driver_capability_gqi_qpl) | \ + GVE_CAP1(gve_driver_capability_dqo_rda)) #define GVE_DRIVER_CAPABILITY_FLAGS2 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS3 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS4 0x0 @@ -282,6 +285,8 @@ struct gve_adminq_create_tx_queue { _Static_assert(sizeof(struct gve_adminq_create_tx_queue) == 48, "gve: bad admin queue struct length"); +#define GVE_RAW_ADDRESSING_QPL_ID 0xFFFFFFFF + struct gve_adminq_create_rx_queue { __be32 queue_id; __be32 index; @@ -352,6 +357,23 @@ struct stats { _Static_assert(sizeof(struct stats) == 16, "gve: bad admin queue struct length"); +/* These are control path types for PTYPE which are the same as the data path + * types. + */ +struct gve_ptype_entry { + uint8_t l3_type; + uint8_t l4_type; +}; + +struct gve_ptype_map { + struct gve_ptype_entry ptypes[1 << 10]; /* PTYPES are always 10 bits. */ +}; + +struct gve_adminq_get_ptype_map { + __be64 ptype_map_len; + __be64 ptype_map_addr; +}; + struct gve_adminq_command { __be32 opcode; __be32 status; @@ -368,6 +390,7 @@ struct gve_adminq_command { struct gve_adminq_set_driver_parameter set_driver_param; struct gve_adminq_verify_driver_compatibility verify_driver_compatibility; + struct gve_adminq_get_ptype_map get_ptype_map; uint8_t reserved[56]; }; }; @@ -375,6 +398,24 @@ struct gve_adminq_command { _Static_assert(sizeof(struct gve_adminq_command) == 64, "gve: bad admin queue struct length"); +enum gve_l3_type { + /* Must be zero so zero initialized LUT is unknown. */ + GVE_L3_TYPE_UNKNOWN = 0, + GVE_L3_TYPE_OTHER, + GVE_L3_TYPE_IPV4, + GVE_L3_TYPE_IPV6, +}; + +enum gve_l4_type { + /* Must be zero so zero initialized LUT is unknown. */ + GVE_L4_TYPE_UNKNOWN = 0, + GVE_L4_TYPE_OTHER, + GVE_L4_TYPE_TCP, + GVE_L4_TYPE_UDP, + GVE_L4_TYPE_ICMP, + GVE_L4_TYPE_SCTP, +}; + int gve_adminq_create_rx_queues(struct gve_priv *priv, uint32_t num_queues); int gve_adminq_create_tx_queues(struct gve_priv *priv, uint32_t num_queues); int gve_adminq_destroy_tx_queues(struct gve_priv *priv, uint32_t num_queues); @@ -387,8 +428,10 @@ int gve_adminq_configure_device_resources(struct gve_priv *priv); int gve_adminq_deconfigure_device_resources(struct gve_priv *priv); void gve_release_adminq(struct gve_priv *priv); int gve_adminq_register_page_list(struct gve_priv *priv, - struct gve_queue_page_list *qpl); + struct gve_queue_page_list *qpl); int gve_adminq_unregister_page_list(struct gve_priv *priv, uint32_t page_list_id); int gve_adminq_verify_driver_compatibility(struct gve_priv *priv, - uint64_t driver_info_len, vm_paddr_t driver_info_addr); + uint64_t driver_info_len, vm_paddr_t driver_info_addr); +int gve_adminq_get_ptype_map_dqo(struct gve_priv *priv, + struct gve_ptype_lut *ptype_lut); #endif /* _GVE_AQ_H_ */ diff --git a/sys/dev/gve/gve_dqo.h b/sys/dev/gve/gve_dqo.h new file mode 100644 index 000000000000..5f3f36d2245f --- /dev/null +++ b/sys/dev/gve/gve_dqo.h @@ -0,0 +1,306 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 2024 Google LLC + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* GVE DQO Descriptor formats */ + +#ifndef _GVE_DESC_DQO_H_ +#define _GVE_DESC_DQO_H_ + +#include "gve_plat.h" + +#define GVE_ITR_ENABLE_BIT_DQO BIT(0) +#define GVE_ITR_NO_UPDATE_DQO (3 << 3) +#define GVE_ITR_INTERVAL_DQO_SHIFT 5 +#define GVE_ITR_INTERVAL_DQO_MASK ((1 << 12) - 1) +#define GVE_TX_IRQ_RATELIMIT_US_DQO 50 +#define GVE_RX_IRQ_RATELIMIT_US_DQO 20 + +#define GVE_TX_MAX_HDR_SIZE_DQO 255 +#define GVE_TX_MIN_TSO_MSS_DQO 88 + +/* + * Ringing the doorbell too often can hurt performance. + * + * HW requires this value to be at least 8. + */ +#define GVE_RX_BUF_THRESH_DQO 32 + +/* + * Start dropping RX fragments if at least these many + * buffers cannot be posted to the NIC. + */ +#define GVE_RX_DQO_MIN_PENDING_BUFS 32 + +/* Basic TX descriptor (DTYPE 0x0C) */ +struct gve_tx_pkt_desc_dqo { + __le64 buf_addr; + + /* Must be GVE_TX_PKT_DESC_DTYPE_DQO (0xc) */ + uint8_t dtype:5; + + /* Denotes the last descriptor of a packet. */ + uint8_t end_of_packet:1; + uint8_t checksum_offload_enable:1; + + /* If set, will generate a descriptor completion for this descriptor. */ + uint8_t report_event:1; + uint8_t reserved0; + __le16 reserved1; + + /* The TX completion for this packet will contain this tag. */ + __le16 compl_tag; + uint16_t buf_size:14; + uint16_t reserved2:2; +} __packed; +_Static_assert(sizeof(struct gve_tx_pkt_desc_dqo) == 16, + "gve: bad dqo desc struct length"); + +#define GVE_TX_PKT_DESC_DTYPE_DQO 0xc + +/* + * Maximum number of data descriptors allowed per packet, or per-TSO segment. + */ +#define GVE_TX_MAX_DATA_DESCS_DQO 10 +#define GVE_TX_MAX_BUF_SIZE_DQO ((16 * 1024) - 1) +#define GVE_TSO_MAXSIZE_DQO IP_MAXPACKET + +_Static_assert(GVE_TX_MAX_BUF_SIZE_DQO * GVE_TX_MAX_DATA_DESCS_DQO >= + GVE_TSO_MAXSIZE_DQO, + "gve: bad tso parameters"); + +/* + * "report_event" on TX packet descriptors may only be reported on the last + * descriptor of a TX packet, and they must be spaced apart with at least this + * value. + */ +#define GVE_TX_MIN_RE_INTERVAL 32 + +struct gve_tx_context_cmd_dtype { + uint8_t dtype:5; + uint8_t tso:1; + uint8_t reserved1:2; + uint8_t reserved2; +}; + +_Static_assert(sizeof(struct gve_tx_context_cmd_dtype) == 2, + "gve: bad dqo desc struct length"); + +/* + * TX Native TSO Context DTYPE (0x05) + * + * "flex" fields allow the driver to send additional packet context to HW. + */ +struct gve_tx_tso_context_desc_dqo { + /* The L4 payload bytes that should be segmented. */ + uint32_t tso_total_len:24; + uint32_t flex10:8; + + /* Max segment size in TSO excluding headers. */ + uint16_t mss:14; + uint16_t reserved:2; + + uint8_t header_len; /* Header length to use for TSO offload */ + uint8_t flex11; + struct gve_tx_context_cmd_dtype cmd_dtype; + uint8_t flex0; + uint8_t flex5; + uint8_t flex6; + uint8_t flex7; + uint8_t flex8; + uint8_t flex9; +} __packed; +_Static_assert(sizeof(struct gve_tx_tso_context_desc_dqo) == 16, + "gve: bad dqo desc struct length"); + +#define GVE_TX_TSO_CTX_DESC_DTYPE_DQO 0x5 *** 2433 LINES SKIPPED *** From nobody Wed Nov 20 21:41:17 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv50Lxwz5dnLP; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv20drXz4vY2; Wed, 20 Nov 2024 21:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138878; 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=03Ia9PK4sTptF/fggEma1rC2jDNuAYwIAv3IjvkQ9wA=; b=cv4XOM0cYgQa//EkvfShYVmKKDoyKm4sW9GQWbRv+Cde0iHkkhY9ZM6QxaVm4IbrgnAKEk 8ZdkLiCnTQQowrZHIz188Nvl1zxfzm7hbFy/NkEg/9FIfjra7wOl+mpLe/sN4I9jDCRYmz rgdsykLMiljSRsAQX0nrTqNxGHAjiyIRXgWr+iwmQQOinOYG2X7tZS1Vft9vuLCDSWgEAl qcP3XCbDOhuYy4zEgnofXf2YUZZ2UAC9gbiHa32mhsq2qzKpUuGDlBntyOTGphitk1nidg fCJEk1QUSUdk+zb53JdRhD8aiXdYiYLkqPUnM4nObMoFO+G1YIyzRHiL258abg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138878; 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=03Ia9PK4sTptF/fggEma1rC2jDNuAYwIAv3IjvkQ9wA=; b=mTYrpxwzuZo4KCAjJmLtv6jpHIs2+WubFaCsE3Llv9uzB5XU+UgmNsYnyGXsM5YDig4emj 4kBv2vBhc6lBBP2ukTmIaHNQSMGhrmOExZnnR1QFV3VoMiKJYxQ1sU8rSBmqEWjBGLb6eB gnUFutDg9yHBZea2OT1k7DcXbGkMp0Ds8CLPXiUt6f7ixvJl2QqMlmPLUvB4XzSO99pnpa 8xNeawMolaqemBGCgZK/Jiap1+7TpL7z4/SB6NOlpTKROWFQRNZBLJGPOAHf/7xHX6vfnO YDjW91dKg2leHaCC7YXUpMfz+PDEVnvdgE87d/0GYAVb9z0XUV1NkA+C9omy5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138878; a=rsa-sha256; cv=none; b=mGeVL8KLaeVJpfNbTe7tGBkGKrD41507/XPHKViuWb8hwOcUITUf3+Cv1xMlAbvRJBeHkL O8nw2MVp0A6wIy35hCHqK+8frzw/JE1xPRmhS9HbhwD9dhelCydBbzNPWe/HZZ8XS5YuFv kOGfEhz4b7txNujzaA7QKiLJK5FOE/gtCpPa7O3SapyNHw2oyApze7tA0xXq3jEoc3jA/u TM/ZZOCc+LveaJcJg2Sgyy+ZfuAGMKi0+573zLGIrvbzbH4RH3Pqi0G0d2jjUemEYyX/Nx yAhIM8AnFtwc6u67Yn8Dm7fo2wgPB4L2KDhVZ98UY0+a2a8F8laSPtK1HPTgXg== 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 4Xtvv207L2z19kg; Wed, 20 Nov 2024 21:41:18 +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 4AKLfHr5022034; Wed, 20 Nov 2024 21:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfHVk022031; Wed, 20 Nov 2024 21:41:17 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:17 GMT Message-Id: <202411202141.4AKLfHVk022031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1bda36a393c2 - stable/14 - gve: Add DQO QPL support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1bda36a393c24a05581522a9dc56b4f6f5b53e10 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1bda36a393c24a05581522a9dc56b4f6f5b53e10 commit 1bda36a393c24a05581522a9dc56b4f6f5b53e10 Author: Shailend Chand AuthorDate: 2024-11-05 19:38:30 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Add DQO QPL support DQO is the descriptor format for our next generation virtual NIC. It is necessary to make full use of the hardware bandwidth on many newer GCP VM shapes. This patch extends the previously introduced DQO descriptor format with a "QPL" mode. QPL stands for Queue Page List and refers to the fact that the hardware cannot access arbitrary regions of the host memory and instead expects a fixed bounce buffer comprising of a list of pages. The QPL aspects are similar to the already existing GQI queue queue format: in that the mbufs being input in the Rx path have external storage in the form of vm pages attached to them; and in the Tx path we always copy the mbuf payload into QPL pages. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46691 (cherry picked from commit 2348ac893d10f06d2d84e1e4bd5ca9f1c5da92d8) --- share/man/man4/gve.4 | 2 + sys/dev/gve/gve.h | 101 ++++++++++- sys/dev/gve/gve_adminq.c | 38 +++- sys/dev/gve/gve_adminq.h | 14 +- sys/dev/gve/gve_dqo.h | 17 +- sys/dev/gve/gve_main.c | 20 ++- sys/dev/gve/gve_qpl.c | 32 +++- sys/dev/gve/gve_rx.c | 18 -- sys/dev/gve/gve_rx_dqo.c | 449 +++++++++++++++++++++++++++++++++++++++++++---- sys/dev/gve/gve_sysctl.c | 8 + sys/dev/gve/gve_tx.c | 5 +- sys/dev/gve/gve_tx_dqo.c | 425 ++++++++++++++++++++++++++++++++++++-------- 12 files changed, 983 insertions(+), 146 deletions(-) diff --git a/share/man/man4/gve.4 b/share/man/man4/gve.4 index 82db2af548ae..8c2b3cabbd38 100644 --- a/share/man/man4/gve.4 +++ b/share/man/man4/gve.4 @@ -239,6 +239,8 @@ The D in "DQO" refers to a newer generation of hardware, and the "QO" stands for "Queue Out-of-order" referring to the fact that the NIC might send Tx and Rx completions in an order different from the one in which the corresponding descriptors were posted by the driver. +.It +DQO_QPL: The next generation descriptor format in the "QPL" mode. .El .Sh SUPPORT Please email gvnic-drivers@google.com with the specifics of the issue encountered. diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 98f1139c6bc2..43082d64ba95 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -105,6 +105,7 @@ enum gve_queue_format { GVE_GQI_RDA_FORMAT = 0x1, GVE_GQI_QPL_FORMAT = 0x2, GVE_DQO_RDA_FORMAT = 0x3, + GVE_DQO_QPL_FORMAT = 0x4, }; enum gve_state_flags_bit { @@ -226,6 +227,7 @@ struct gve_rxq_stats { counter_u64_t rx_frag_flip_cnt; counter_u64_t rx_frag_copy_cnt; counter_u64_t rx_dropped_pkt_desc_err; + counter_u64_t rx_dropped_pkt_buf_post_fail; counter_u64_t rx_dropped_pkt_mbuf_alloc_fail; counter_u64_t rx_mbuf_dmamap_err; counter_u64_t rx_mbuf_mclget_null; @@ -233,11 +235,34 @@ struct gve_rxq_stats { #define NUM_RX_STATS (sizeof(struct gve_rxq_stats) / sizeof(counter_u64_t)) +union gve_rx_qpl_buf_id_dqo { + struct { + uint16_t buf_id:11; /* Index into rx->dqo.bufs */ + uint8_t frag_num:5; /* Which frag in the QPL page */ + }; + uint16_t all; +} __packed; +_Static_assert(sizeof(union gve_rx_qpl_buf_id_dqo) == 2, + "gve: bad dqo qpl rx buf id length"); + struct gve_rx_buf_dqo { - struct mbuf *mbuf; - bus_dmamap_t dmamap; - uint64_t addr; - bool mapped; + union { + /* RDA */ + struct { + struct mbuf *mbuf; + bus_dmamap_t dmamap; + uint64_t addr; + bool mapped; + }; + /* QPL */ + struct { + uint8_t num_nic_frags; /* number of pending completions */ + uint8_t next_idx; /* index of the next frag to post */ + /* for chaining rx->dqo.used_bufs */ + STAILQ_ENTRY(gve_rx_buf_dqo) stailq_entry; + }; + }; + /* for chaining rx->dqo.free_bufs */ SLIST_ENTRY(gve_rx_buf_dqo) slist_entry; }; @@ -276,6 +301,13 @@ struct gve_rx_ring { uint32_t tail; /* The index at which to receive the next compl at */ uint8_t cur_gen_bit; /* Gets flipped on every cycle of the compl ring */ SLIST_HEAD(, gve_rx_buf_dqo) free_bufs; + + /* + * Only used in QPL mode. Pages refered to by if_input-ed mbufs + * stay parked here till their wire count comes back to 1. + * Pages are moved here after there aren't any pending completions. + */ + STAILQ_HEAD(, gve_rx_buf_dqo) used_bufs; } dqo; }; @@ -313,6 +345,7 @@ struct gve_txq_stats { counter_u64_t tx_dropped_pkt_nospace_bufring; counter_u64_t tx_delayed_pkt_nospace_descring; counter_u64_t tx_delayed_pkt_nospace_compring; + counter_u64_t tx_delayed_pkt_nospace_qpl_bufs; counter_u64_t tx_delayed_pkt_tsoerr; counter_u64_t tx_dropped_pkt_vlan; counter_u64_t tx_mbuf_collapse; @@ -326,7 +359,19 @@ struct gve_txq_stats { struct gve_tx_pending_pkt_dqo { struct mbuf *mbuf; - bus_dmamap_t dmamap; + union { + /* RDA */ + bus_dmamap_t dmamap; + /* QPL */ + struct { + /* + * A linked list of entries from qpl_bufs that served + * as the bounce buffer for this packet. + */ + int32_t qpl_buf_head; + uint32_t num_qpl_bufs; + }; + }; uint8_t state; /* the gve_packet_state enum */ int next; /* To chain the free_pending_pkts lists */ }; @@ -377,7 +422,20 @@ struct gve_tx_ring { */ int32_t free_pending_pkts_csm; - bus_dma_tag_t buf_dmatag; /* DMA params for mapping Tx mbufs */ + /* + * The head index of a singly linked list representing QPL page fragments + * to copy mbuf payload into for the NIC to see. Once this list is depleted, + * the "_prd" suffixed producer list, grown by the completion taskqueue, + * is stolen. + * + * Only used in QPL mode. int32_t because atomic_swap_16 doesn't exist. + */ + int32_t free_qpl_bufs_csm; + uint32_t qpl_bufs_consumed; /* Allows quickly checking for buf availability */ + uint32_t qpl_bufs_produced_cached; /* Cached value of qpl_bufs_produced */ + + /* DMA params for mapping Tx mbufs. Only used in RDA mode. */ + bus_dma_tag_t buf_dmatag; } __aligned(CACHE_LINE_SIZE); /* Accessed when processing completions */ @@ -395,6 +453,18 @@ struct gve_tx_ring { * its consumer list, with the "_csm" suffix, is depleted. */ int32_t free_pending_pkts_prd; + + /* + * The completion taskqueue moves the QPL pages corresponding to a + * completed packet into this list. It is only used in QPL mode. + * The "_prd" denotes that this is a producer list. The trasnmit + * taskqueue steals this list once its consumer list, with the "_csm" + * suffix, is depleted. + * + * Only used in QPL mode. int32_t because atomic_swap_16 doesn't exist. + */ + int32_t free_qpl_bufs_prd; + uint32_t qpl_bufs_produced; } __aligned(CACHE_LINE_SIZE); /* Accessed by both the completion and xmit loops */ @@ -402,6 +472,16 @@ struct gve_tx_ring { /* completion tags index into this array */ struct gve_tx_pending_pkt_dqo *pending_pkts; uint16_t num_pending_pkts; + + /* + * Represents QPL page fragments. An index into this array + * always represents the same QPL page fragment. The value + * is also an index into this array and servers as a means + * to chain buffers into linked lists whose heads are + * either free_qpl_bufs_prd or free_qpl_bufs_csm or + * qpl_bufs_head. + */ + int32_t *qpl_bufs; } __aligned(CACHE_LINE_SIZE); } dqo; }; @@ -531,6 +611,13 @@ gve_is_gqi(struct gve_priv *priv) return (priv->queue_format == GVE_GQI_QPL_FORMAT); } +static inline bool +gve_is_qpl(struct gve_priv *priv) +{ + return (priv->queue_format == GVE_GQI_QPL_FORMAT || + priv->queue_format == GVE_DQO_QPL_FORMAT); +} + /* Defined in gve_main.c */ void gve_schedule_reset(struct gve_priv *priv); @@ -545,6 +632,7 @@ int gve_alloc_qpls(struct gve_priv *priv); void gve_free_qpls(struct gve_priv *priv); int gve_register_qpls(struct gve_priv *priv); int gve_unregister_qpls(struct gve_priv *priv); +void gve_mextadd_free(struct mbuf *mbuf); /* TX functions defined in gve_tx.c */ int gve_alloc_tx_rings(struct gve_priv *priv); @@ -563,6 +651,7 @@ void gve_tx_free_ring_dqo(struct gve_priv *priv, int i); void gve_clear_tx_ring_dqo(struct gve_priv *priv, int i); int gve_tx_intr_dqo(void *arg); int gve_xmit_dqo(struct gve_tx_ring *tx, struct mbuf **mbuf_ptr); +int gve_xmit_dqo_qpl(struct gve_tx_ring *tx, struct mbuf *mbuf); void gve_tx_cleanup_tq_dqo(void *arg, int pending); /* RX functions defined in gve_rx.c */ diff --git a/sys/dev/gve/gve_adminq.c b/sys/dev/gve/gve_adminq.c index 7865b979888b..dd03f817f45a 100644 --- a/sys/dev/gve/gve_adminq.c +++ b/sys/dev/gve/gve_adminq.c @@ -58,6 +58,7 @@ void gve_parse_device_option(struct gve_priv *priv, struct gve_device_option *option, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, struct gve_device_option_dqo_rda **dev_op_dqo_rda, + struct gve_device_option_dqo_qpl **dev_op_dqo_qpl, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { uint32_t req_feat_mask = be32toh(option->required_features_mask); @@ -103,6 +104,23 @@ void gve_parse_device_option(struct gve_priv *priv, *dev_op_dqo_rda = (void *)(option + 1); break; + case GVE_DEV_OPT_ID_DQO_QPL: + if (option_length < sizeof(**dev_op_dqo_qpl) || + req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL) { + device_printf(priv->dev, GVE_DEVICE_OPTION_ERROR_FMT, + "DQO QPL", (int)sizeof(**dev_op_dqo_qpl), + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL, + option_length, req_feat_mask); + break; + } + + if (option_length > sizeof(**dev_op_dqo_qpl)) { + device_printf(priv->dev, GVE_DEVICE_OPTION_TOO_BIG_FMT, + "DQO QPL"); + } + *dev_op_dqo_qpl = (void *)(option + 1); + break; + case GVE_DEV_OPT_ID_JUMBO_FRAMES: if (option_length < sizeof(**dev_op_jumbo_frames) || req_feat_mask != GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES) { @@ -136,6 +154,7 @@ gve_process_device_options(struct gve_priv *priv, struct gve_device_descriptor *descriptor, struct gve_device_option_gqi_qpl **dev_op_gqi_qpl, struct gve_device_option_dqo_rda **dev_op_dqo_rda, + struct gve_device_option_dqo_qpl **dev_op_dqo_qpl, struct gve_device_option_jumbo_frames **dev_op_jumbo_frames) { char *desc_end = (char *)descriptor + be16toh(descriptor->total_length); @@ -154,7 +173,10 @@ gve_process_device_options(struct gve_priv *priv, } gve_parse_device_option(priv, descriptor, dev_opt, - dev_op_gqi_qpl, dev_op_dqo_rda, dev_op_jumbo_frames); + dev_op_gqi_qpl, + dev_op_dqo_rda, + dev_op_dqo_qpl, + dev_op_jumbo_frames); dev_opt = (void *)((char *)(dev_opt + 1) + be16toh(dev_opt->option_length)); } @@ -387,6 +409,7 @@ gve_adminq_describe_device(struct gve_priv *priv) struct gve_dma_handle desc_mem; struct gve_device_option_gqi_qpl *dev_op_gqi_qpl = NULL; struct gve_device_option_dqo_rda *dev_op_dqo_rda = NULL; + struct gve_device_option_dqo_qpl *dev_op_dqo_qpl = NULL; struct gve_device_option_jumbo_frames *dev_op_jumbo_frames = NULL; uint32_t supported_features_mask = 0; int rc; @@ -416,7 +439,9 @@ gve_adminq_describe_device(struct gve_priv *priv) bus_dmamap_sync(desc_mem.tag, desc_mem.map, BUS_DMASYNC_POSTREAD); rc = gve_process_device_options(priv, desc, - &dev_op_gqi_qpl, &dev_op_dqo_rda, + &dev_op_gqi_qpl, + &dev_op_dqo_rda, + &dev_op_dqo_qpl, &dev_op_jumbo_frames); if (rc != 0) goto free_device_descriptor; @@ -430,6 +455,15 @@ gve_adminq_describe_device(struct gve_priv *priv) if (bootverbose) device_printf(priv->dev, "Driver is running with DQO RDA queue format.\n"); + } else if (dev_op_dqo_qpl != NULL) { + snprintf(gve_queue_format, sizeof(gve_queue_format), + "%s", "DQO QPL"); + priv->queue_format = GVE_DQO_QPL_FORMAT; + supported_features_mask = be32toh( + dev_op_dqo_qpl->supported_features_mask); + if (bootverbose) + device_printf(priv->dev, + "Driver is running with DQO QPL queue format.\n"); } else if (dev_op_gqi_qpl != NULL) { snprintf(gve_queue_format, sizeof(gve_queue_format), "%s", "GQI QPL"); diff --git a/sys/dev/gve/gve_adminq.h b/sys/dev/gve/gve_adminq.h index b5d512331d42..37a7cb3ecbb8 100644 --- a/sys/dev/gve/gve_adminq.h +++ b/sys/dev/gve/gve_adminq.h @@ -144,6 +144,15 @@ struct gve_device_option_dqo_rda { _Static_assert(sizeof(struct gve_device_option_dqo_rda) == 8, "gve: bad admin queue struct length"); +struct gve_device_option_dqo_qpl { + __be32 supported_features_mask; + __be16 tx_comp_ring_entries; + __be16 rx_buff_ring_entries; +}; + +_Static_assert(sizeof(struct gve_device_option_dqo_qpl) == 8, + "gve: bad admin queue struct length"); + struct gve_device_option_modify_ring { __be32 supported_features_mask; __be16 max_rx_ring_size; @@ -168,6 +177,7 @@ enum gve_dev_opt_id { GVE_DEV_OPT_ID_GQI_QPL = 0x3, GVE_DEV_OPT_ID_DQO_RDA = 0x4, GVE_DEV_OPT_ID_MODIFY_RING = 0x6, + GVE_DEV_OPT_ID_DQO_QPL = 0x7, GVE_DEV_OPT_ID_JUMBO_FRAMES = 0x8, }; @@ -182,6 +192,7 @@ enum gve_dev_opt_req_feat_mask { GVE_DEV_OPT_REQ_FEAT_MASK_GQI_RDA = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_GQI_QPL = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_DQO_RDA = 0x0, + GVE_DEV_OPT_REQ_FEAT_MASK_DQO_QPL = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_MODIFY_RING = 0x0, GVE_DEV_OPT_REQ_FEAT_MASK_JUMBO_FRAMES = 0x0, }; @@ -196,7 +207,7 @@ enum gve_sup_feature_mask { enum gve_driver_capability { gve_driver_capability_gqi_qpl = 0, gve_driver_capability_gqi_rda = 1, - gve_driver_capability_dqo_qpl = 2, /* reserved for future use */ + gve_driver_capability_dqo_qpl = 2, gve_driver_capability_dqo_rda = 3, }; @@ -212,6 +223,7 @@ enum gve_driver_capability { */ #define GVE_DRIVER_CAPABILITY_FLAGS1 \ (GVE_CAP1(gve_driver_capability_gqi_qpl) | \ + GVE_CAP1(gve_driver_capability_dqo_qpl) | \ GVE_CAP1(gve_driver_capability_dqo_rda)) #define GVE_DRIVER_CAPABILITY_FLAGS2 0x0 #define GVE_DRIVER_CAPABILITY_FLAGS3 0x0 diff --git a/sys/dev/gve/gve_dqo.h b/sys/dev/gve/gve_dqo.h index 5f3f36d2245f..214138303a77 100644 --- a/sys/dev/gve/gve_dqo.h +++ b/sys/dev/gve/gve_dqo.h @@ -57,7 +57,22 @@ * Start dropping RX fragments if at least these many * buffers cannot be posted to the NIC. */ -#define GVE_RX_DQO_MIN_PENDING_BUFS 32 +#define GVE_RX_DQO_MIN_PENDING_BUFS 128 + +#define GVE_DQ_NUM_FRAGS_IN_PAGE (PAGE_SIZE / GVE_DEFAULT_RX_BUFFER_SIZE) + +/* + * gve_rx_qpl_buf_id_dqo's 11 bit wide buf_id field limits the total + * number of pages per QPL to 2048. + */ +#define GVE_RX_NUM_QPL_PAGES_DQO 2048 + +/* 2K TX buffers for DQO-QPL */ +#define GVE_TX_BUF_SHIFT_DQO 11 +#define GVE_TX_BUF_SIZE_DQO BIT(GVE_TX_BUF_SHIFT_DQO) +#define GVE_TX_BUFS_PER_PAGE_DQO (PAGE_SIZE >> GVE_TX_BUF_SHIFT_DQO) + +#define GVE_TX_NUM_QPL_PAGES_DQO 512 /* Basic TX descriptor (DTYPE 0x0C) */ struct gve_tx_pkt_desc_dqo { diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index 3fa8fec51910..5575c82f0681 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -32,9 +32,9 @@ #include "gve_adminq.h" #include "gve_dqo.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.2.0\n" +#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.0\n" #define GVE_VERSION_MAJOR 1 -#define GVE_VERSION_MINOR 2 +#define GVE_VERSION_MINOR 3 #define GVE_VERSION_SUB 0 #define GVE_DEFAULT_RX_COPYBREAK 256 @@ -125,7 +125,7 @@ gve_up(struct gve_priv *priv) if (if_getcapenable(ifp) & IFCAP_TSO6) if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { err = gve_register_qpls(priv); if (err != 0) goto reset; @@ -177,7 +177,7 @@ gve_down(struct gve_priv *priv) if (gve_destroy_tx_rings(priv) != 0) goto reset; - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { if (gve_unregister_qpls(priv) != 0) goto reset; } @@ -375,13 +375,15 @@ gve_setup_ifnet(device_t dev, struct gve_priv *priv) /* * Set TSO limits, must match the arguments to bus_dma_tag_create - * when creating tx->dqo.buf_dmatag + * when creating tx->dqo.buf_dmatag. Only applies to the RDA mode + * because in QPL we copy the entire pakcet into the bounce buffer + * and thus it does not matter how fragmented the mbuf is. */ - if (!gve_is_gqi(priv)) { - if_sethwtsomax(ifp, GVE_TSO_MAXSIZE_DQO); + if (!gve_is_gqi(priv) && !gve_is_qpl(priv)) { if_sethwtsomaxsegcount(ifp, GVE_TX_MAX_DATA_DESCS_DQO); if_sethwtsomaxsegsize(ifp, GVE_TX_MAX_BUF_SIZE_DQO); } + if_sethwtsomax(ifp, GVE_TSO_MAXSIZE_DQO); #if __FreeBSD_version >= 1400086 if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); @@ -465,7 +467,7 @@ gve_free_rings(struct gve_priv *priv) gve_free_irqs(priv); gve_free_tx_rings(priv); gve_free_rx_rings(priv); - if (gve_is_gqi(priv)) + if (gve_is_qpl(priv)) gve_free_qpls(priv); } @@ -474,7 +476,7 @@ gve_alloc_rings(struct gve_priv *priv) { int err; - if (gve_is_gqi(priv)) { + if (gve_is_qpl(priv)) { err = gve_alloc_qpls(priv); if (err != 0) goto abort; diff --git a/sys/dev/gve/gve_qpl.c b/sys/dev/gve/gve_qpl.c index 9a946a2a2f2d..1fcc2b5365c9 100644 --- a/sys/dev/gve/gve_qpl.c +++ b/sys/dev/gve/gve_qpl.c @@ -32,13 +32,14 @@ #include "gve.h" #include "gve_adminq.h" +#include "gve_dqo.h" static MALLOC_DEFINE(M_GVE_QPL, "gve qpl", "gve qpl allocations"); static uint32_t gve_num_tx_qpls(struct gve_priv *priv) { - if (priv->queue_format != GVE_GQI_QPL_FORMAT) + if (!gve_is_qpl(priv)) return (0); return (priv->tx_cfg.max_queues); @@ -47,7 +48,7 @@ gve_num_tx_qpls(struct gve_priv *priv) static uint32_t gve_num_rx_qpls(struct gve_priv *priv) { - if (priv->queue_format != GVE_GQI_QPL_FORMAT) + if (!gve_is_qpl(priv)) return (0); return (priv->rx_cfg.max_queues); @@ -189,6 +190,7 @@ gve_free_qpls(struct gve_priv *priv) int gve_alloc_qpls(struct gve_priv *priv) { int num_qpls = gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv); + int num_pages; int err; int i; @@ -198,15 +200,19 @@ int gve_alloc_qpls(struct gve_priv *priv) priv->qpls = malloc(num_qpls * sizeof(*priv->qpls), M_GVE_QPL, M_WAITOK | M_ZERO); + num_pages = gve_is_gqi(priv) ? + priv->tx_desc_cnt / GVE_QPL_DIVISOR : + GVE_TX_NUM_QPL_PAGES_DQO; for (i = 0; i < gve_num_tx_qpls(priv); i++) { - err = gve_alloc_qpl(priv, i, priv->tx_desc_cnt / GVE_QPL_DIVISOR, + err = gve_alloc_qpl(priv, i, num_pages, /*single_kva=*/true); if (err != 0) goto abort; } + num_pages = gve_is_gqi(priv) ? priv->rx_desc_cnt : GVE_RX_NUM_QPL_PAGES_DQO; for (; i < num_qpls; i++) { - err = gve_alloc_qpl(priv, i, priv->rx_desc_cnt, /*single_kva=*/false); + err = gve_alloc_qpl(priv, i, num_pages, /*single_kva=*/false); if (err != 0) goto abort; } @@ -283,3 +289,21 @@ gve_unregister_qpls(struct gve_priv *priv) gve_clear_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK); return (0); } + +void +gve_mextadd_free(struct mbuf *mbuf) +{ + vm_page_t page = (vm_page_t)mbuf->m_ext.ext_arg1; + vm_offset_t va = (vm_offset_t)mbuf->m_ext.ext_arg2; + + /* + * Free the page only if this is the last ref. + * The interface might no longer exist by the time + * this callback is called, see gve_free_qpl. + */ + if (__predict_false(vm_page_unwire_noq(page))) { + pmap_qremove(va, 1); + kva_free(va, PAGE_SIZE); + vm_page_free(page); + } +} diff --git a/sys/dev/gve/gve_rx.c b/sys/dev/gve/gve_rx.c index 69bb13fc56c6..35f22f2308f0 100644 --- a/sys/dev/gve/gve_rx.c +++ b/sys/dev/gve/gve_rx.c @@ -409,24 +409,6 @@ gve_set_rss_type(__be16 flag, struct mbuf *mbuf) } } -static void -gve_mextadd_free(struct mbuf *mbuf) -{ - vm_page_t page = (vm_page_t)mbuf->m_ext.ext_arg1; - vm_offset_t va = (vm_offset_t)mbuf->m_ext.ext_arg2; - - /* - * Free the page only if this is the last ref. - * The interface might no longer exist by the time - * this callback is called, see gve_free_qpl. - */ - if (__predict_false(vm_page_unwire_noq(page))) { - pmap_qremove(va, 1); - kva_free(va, PAGE_SIZE); - vm_page_free(page); - } -} - static void gve_rx_flip_buff(struct gve_rx_slot_page_info *page_info, __be64 *slot_addr) { diff --git a/sys/dev/gve/gve_rx_dqo.c b/sys/dev/gve/gve_rx_dqo.c index b391449328e1..6c5d656aaa04 100644 --- a/sys/dev/gve/gve_rx_dqo.c +++ b/sys/dev/gve/gve_rx_dqo.c @@ -38,6 +38,9 @@ gve_free_rx_mbufs_dqo(struct gve_rx_ring *rx) struct gve_rx_buf_dqo *buf; int i; + if (gve_is_qpl(rx->com.priv)) + return; + for (i = 0; i < rx->dqo.buf_cnt; i++) { buf = &rx->dqo.bufs[i]; if (!buf->mbuf) @@ -70,7 +73,7 @@ gve_rx_free_ring_dqo(struct gve_priv *priv, int i) if (rx->dqo.bufs != NULL) { gve_free_rx_mbufs_dqo(rx); - if (rx->dqo.buf_dmatag) { + if (!gve_is_qpl(priv) && rx->dqo.buf_dmatag) { for (j = 0; j < rx->dqo.buf_cnt; j++) if (rx->dqo.bufs[j].mapped) bus_dmamap_destroy(rx->dqo.buf_dmatag, @@ -81,7 +84,7 @@ gve_rx_free_ring_dqo(struct gve_priv *priv, int i) rx->dqo.bufs = NULL; } - if (rx->dqo.buf_dmatag) + if (!gve_is_qpl(priv) && rx->dqo.buf_dmatag) bus_dma_tag_destroy(rx->dqo.buf_dmatag); } @@ -103,6 +106,31 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) rx->dqo.desc_ring = rx->desc_ring_mem.cpu_addr; rx->dqo.mask = priv->rx_desc_cnt - 1; + err = gve_dma_alloc_coherent(priv, + sizeof(struct gve_rx_compl_desc_dqo) * priv->rx_desc_cnt, + CACHE_LINE_SIZE, &rx->dqo.compl_ring_mem); + if (err != 0) { + device_printf(priv->dev, + "Failed to alloc compl ring for rx ring %d", i); + goto abort; + } + rx->dqo.compl_ring = rx->dqo.compl_ring_mem.cpu_addr; + rx->dqo.mask = priv->rx_desc_cnt - 1; + + rx->dqo.buf_cnt = gve_is_qpl(priv) ? GVE_RX_NUM_QPL_PAGES_DQO : + priv->rx_desc_cnt; + rx->dqo.bufs = malloc(rx->dqo.buf_cnt * sizeof(struct gve_rx_buf_dqo), + M_GVE, M_WAITOK | M_ZERO); + + if (gve_is_qpl(priv)) { + rx->com.qpl = &priv->qpls[priv->tx_cfg.max_queues + i]; + if (rx->com.qpl == NULL) { + device_printf(priv->dev, "No QPL left for rx ring %d", i); + return (ENOMEM); + } + return (0); + } + err = bus_dma_tag_create( bus_get_dma_tag(priv->dev), /* parent */ 1, 0, /* alignment, bounds */ @@ -123,9 +151,6 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) goto abort; } - rx->dqo.buf_cnt = priv->rx_desc_cnt; - rx->dqo.bufs = malloc(rx->dqo.buf_cnt * sizeof(struct gve_rx_buf_dqo), - M_GVE, M_WAITOK | M_ZERO); for (j = 0; j < rx->dqo.buf_cnt; j++) { err = bus_dmamap_create(rx->dqo.buf_dmatag, 0, &rx->dqo.bufs[j].dmamap); @@ -138,17 +163,6 @@ gve_rx_alloc_ring_dqo(struct gve_priv *priv, int i) rx->dqo.bufs[j].mapped = true; } - err = gve_dma_alloc_coherent(priv, - sizeof(struct gve_rx_compl_desc_dqo) * priv->rx_desc_cnt, - CACHE_LINE_SIZE, &rx->dqo.compl_ring_mem); - if (err != 0) { - device_printf(priv->dev, - "Failed to alloc compl ring for rx ring %d", i); - goto abort; - } - rx->dqo.compl_ring = rx->dqo.compl_ring_mem.cpu_addr; - rx->dqo.mask = priv->rx_desc_cnt - 1; - return (0); abort: @@ -202,10 +216,36 @@ gve_clear_rx_ring_dqo(struct gve_priv *priv, int i) gve_free_rx_mbufs_dqo(rx); - SLIST_INIT(&rx->dqo.free_bufs); - for (j = 0; j < rx->dqo.buf_cnt; j++) - SLIST_INSERT_HEAD(&rx->dqo.free_bufs, - &rx->dqo.bufs[j], slist_entry); + if (gve_is_qpl(priv)) { + SLIST_INIT(&rx->dqo.free_bufs); + STAILQ_INIT(&rx->dqo.used_bufs); + + for (j = 0; j < rx->dqo.buf_cnt; j++) { + struct gve_rx_buf_dqo *buf = &rx->dqo.bufs[j]; + + vm_page_t page = rx->com.qpl->pages[buf - rx->dqo.bufs]; + u_int ref_count = atomic_load_int(&page->ref_count); + + /* + * An ifconfig down+up might see pages still in flight + * from the previous innings. + */ + if (VPRC_WIRE_COUNT(ref_count) == 1) + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + buf, slist_entry); + else + STAILQ_INSERT_TAIL(&rx->dqo.used_bufs, + buf, stailq_entry); + + buf->num_nic_frags = 0; + buf->next_idx = 0; + } + } else { + SLIST_INIT(&rx->dqo.free_bufs); + for (j = 0; j < rx->dqo.buf_cnt; j++) + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + &rx->dqo.bufs[j], slist_entry); + } } int @@ -223,6 +263,20 @@ gve_rx_intr_dqo(void *arg) return (FILTER_HANDLED); } +static void +gve_rx_advance_head_dqo(struct gve_rx_ring *rx) +{ + rx->dqo.head = (rx->dqo.head + 1) & rx->dqo.mask; + rx->fill_cnt++; /* rx->fill_cnt is just a sysctl counter */ + + if ((rx->dqo.head & (GVE_RX_BUF_THRESH_DQO - 1)) == 0) { + bus_dmamap_sync(rx->desc_ring_mem.tag, rx->desc_ring_mem.map, + BUS_DMASYNC_PREWRITE); + gve_db_bar_dqo_write_4(rx->com.priv, rx->com.db_offset, + rx->dqo.head); + } +} + static void gve_rx_post_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) { @@ -235,15 +289,7 @@ gve_rx_post_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) desc->buf_id = htole16(buf - rx->dqo.bufs); desc->buf_addr = htole64(buf->addr); - rx->dqo.head = (rx->dqo.head + 1) & rx->dqo.mask; - rx->fill_cnt++; /* rx->fill_cnt is just a sysctl counter */ - - if ((rx->dqo.head & (GVE_RX_BUF_THRESH_DQO - 1)) == 0) { - bus_dmamap_sync(rx->desc_ring_mem.tag, rx->desc_ring_mem.map, - BUS_DMASYNC_PREWRITE); - gve_db_bar_dqo_write_4(rx->com.priv, rx->com.db_offset, - rx->dqo.head); - } + gve_rx_advance_head_dqo(rx); } static int @@ -294,6 +340,103 @@ abort_with_buf: return (err); } +static struct gve_dma_handle * +gve_get_page_dma_handle(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf) +{ + return (&(rx->com.qpl->dmas[buf - rx->dqo.bufs])); +} + +static void +gve_rx_post_qpl_buf_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, + uint8_t frag_num) +{ + struct gve_rx_desc_dqo *desc = &rx->dqo.desc_ring[rx->dqo.head]; + union gve_rx_qpl_buf_id_dqo composed_id; + struct gve_dma_handle *page_dma_handle; + + composed_id.buf_id = buf - rx->dqo.bufs; + composed_id.frag_num = frag_num; + desc->buf_id = htole16(composed_id.all); + + page_dma_handle = gve_get_page_dma_handle(rx, buf); + bus_dmamap_sync(page_dma_handle->tag, page_dma_handle->map, + BUS_DMASYNC_PREREAD); + desc->buf_addr = htole64(page_dma_handle->bus_addr + + frag_num * GVE_DEFAULT_RX_BUFFER_SIZE); + + buf->num_nic_frags++; + gve_rx_advance_head_dqo(rx); +} + +static void +gve_rx_maybe_extract_from_used_bufs(struct gve_rx_ring *rx, bool just_one) +{ + struct gve_rx_buf_dqo *hol_blocker = NULL; + struct gve_rx_buf_dqo *buf; + u_int ref_count; + vm_page_t page; + + while (true) { + buf = STAILQ_FIRST(&rx->dqo.used_bufs); + if (__predict_false(buf == NULL)) + break; + + page = rx->com.qpl->pages[buf - rx->dqo.bufs]; + ref_count = atomic_load_int(&page->ref_count); + + if (VPRC_WIRE_COUNT(ref_count) != 1) { + /* Account for one head-of-line blocker */ + if (hol_blocker != NULL) + break; + hol_blocker = buf; + STAILQ_REMOVE_HEAD(&rx->dqo.used_bufs, + stailq_entry); + continue; + } + + STAILQ_REMOVE_HEAD(&rx->dqo.used_bufs, + stailq_entry); + SLIST_INSERT_HEAD(&rx->dqo.free_bufs, + buf, slist_entry); + if (just_one) + break; + } + + if (hol_blocker != NULL) + STAILQ_INSERT_HEAD(&rx->dqo.used_bufs, + hol_blocker, stailq_entry); +} + +static int +gve_rx_post_new_dqo_qpl_buf(struct gve_rx_ring *rx) +{ + struct gve_rx_buf_dqo *buf; + + buf = SLIST_FIRST(&rx->dqo.free_bufs); + if (__predict_false(buf == NULL)) { + gve_rx_maybe_extract_from_used_bufs(rx, /*just_one=*/true); + buf = SLIST_FIRST(&rx->dqo.free_bufs); + if (__predict_false(buf == NULL)) + return (ENOBUFS); + } + + gve_rx_post_qpl_buf_dqo(rx, buf, buf->next_idx); + if (buf->next_idx == GVE_DQ_NUM_FRAGS_IN_PAGE - 1) + buf->next_idx = 0; + else + buf->next_idx++; + + /* + * We have posted all the frags in this buf to the NIC. + * - buf will enter used_bufs once the last completion arrives. + * - It will renter free_bufs in gve_rx_maybe_extract_from_used_bufs + * when its wire count drops back to 1. + */ + if (buf->next_idx == 0) + SLIST_REMOVE_HEAD(&rx->dqo.free_bufs, slist_entry); + return (0); +} + static void gve_rx_post_buffers_dqo(struct gve_rx_ring *rx, int how) { @@ -306,7 +449,10 @@ gve_rx_post_buffers_dqo(struct gve_rx_ring *rx, int how) num_to_post = rx->dqo.mask - num_pending_bufs; for (i = 0; i < num_to_post; i++) { - err = gve_rx_post_new_mbuf_dqo(rx, how); + if (gve_is_qpl(rx->com.priv)) + err = gve_rx_post_new_dqo_qpl_buf(rx); + else + err = gve_rx_post_new_mbuf_dqo(rx, how); if (err) break; } @@ -427,7 +573,7 @@ gve_rx_input_mbuf_dqo(struct gve_rx_ring *rx, } static int -gve_rx_copybreak_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, +gve_rx_copybreak_dqo(struct gve_rx_ring *rx, void *va, struct gve_rx_compl_desc_dqo *compl_desc, uint16_t frag_len) { struct mbuf *mbuf; @@ -440,14 +586,13 @@ gve_rx_copybreak_dqo(struct gve_rx_ring *rx, struct gve_rx_buf_dqo *buf, counter_u64_add_protected(rx->stats.rx_copybreak_cnt, 1); counter_exit(); - m_copyback(mbuf, 0, frag_len, mtod(buf->mbuf, char*)); + m_copyback(mbuf, 0, frag_len, va); mbuf->m_len = frag_len; rx->ctx.mbuf_head = mbuf; rx->ctx.mbuf_tail = mbuf; rx->ctx.total_size += frag_len; - gve_rx_post_buf_dqo(rx, buf); gve_rx_input_mbuf_dqo(rx, compl_desc); return (0); } @@ -495,10 +640,12 @@ gve_rx_dqo(struct gve_priv *priv, struct gve_rx_ring *rx, frag_len = compl_desc->packet_len; if (frag_len <= priv->rx_copybreak && !ctx->mbuf_head && is_last_frag) { - err = gve_rx_copybreak_dqo(rx, buf, compl_desc, frag_len); + err = gve_rx_copybreak_dqo(rx, mtod(buf->mbuf, char*), + compl_desc, frag_len); if (__predict_false(err != 0)) goto drop_frag; (*work_done)++; + gve_rx_post_buf_dqo(rx, buf); return; } @@ -579,6 +726,233 @@ drop_frag_clear_ctx: rx->ctx = (struct gve_rx_ctx){}; } +static void * +gve_get_cpu_addr_for_qpl_buf(struct gve_rx_ring *rx, + struct gve_rx_buf_dqo *buf, uint8_t buf_frag_num) +{ + int page_idx = buf - rx->dqo.bufs; + void *va = rx->com.qpl->dmas[page_idx].cpu_addr; + + va = (char *)va + (buf_frag_num * GVE_DEFAULT_RX_BUFFER_SIZE); + return (va); +} + +static int +gve_rx_add_clmbuf_to_ctx(struct gve_rx_ring *rx, + struct gve_rx_ctx *ctx, struct gve_rx_buf_dqo *buf, + uint8_t buf_frag_num, uint16_t frag_len) +{ + void *va = gve_get_cpu_addr_for_qpl_buf(rx, buf, buf_frag_num); + struct mbuf *mbuf; + + if (ctx->mbuf_tail == NULL) { + mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); + if (mbuf == NULL) + return (ENOMEM); + ctx->mbuf_head = mbuf; + ctx->mbuf_tail = mbuf; + } else { + mbuf = m_getcl(M_NOWAIT, MT_DATA, 0); + if (mbuf == NULL) + return (ENOMEM); + ctx->mbuf_tail->m_next = mbuf; + ctx->mbuf_tail = mbuf; + } + + mbuf->m_len = frag_len; + ctx->total_size += frag_len; + + m_copyback(mbuf, 0, frag_len, va); + counter_enter(); + counter_u64_add_protected(rx->stats.rx_frag_copy_cnt, 1); + counter_exit(); + return (0); +} + +static int +gve_rx_add_extmbuf_to_ctx(struct gve_rx_ring *rx, + struct gve_rx_ctx *ctx, struct gve_rx_buf_dqo *buf, + uint8_t buf_frag_num, uint16_t frag_len) +{ + struct mbuf *mbuf; + void *page_addr; + vm_page_t page; + int page_idx; + void *va; *** 765 LINES SKIPPED *** From nobody Wed Nov 20 21:41:20 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv50c96z5dnJX; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv43tJTz4vtq; Wed, 20 Nov 2024 21:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138880; 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=rn+X7PwaU7KeyHmz2NcEr+X6ajAfKAx2mgaXLfN5vGE=; b=FBudMDGTu8LRc1Wud0S8PWoHOez74iBMxpY5wfUCrymUGtnWrJqIMbtPaUnc8oTUXK/vLo xVW3Pecz2lUw5dF9gbegp3mDuROSXJKMjCsKGL6M3Hy0JXo44Q/KdrtiGDLtgnu5TvoyWs HfRbT17umbyAKqL/zzri3qswwUIF8UFhvqQ3nbm9UMRPvUJyNQx7kTz/4hlsj7OtdS5tDc cw52aX0GrZ1XtJbtPOUjbkAyFykRz4GDvze5/hCnCZMjNUWMIX5YaRRQX/37Dx/LDOPUpi bSDy3MTlN2jS4cm0Bj2JHnz2SjhoE6MudaJEp3RoHMFbTxfaNg6cXxNgdlNM3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138880; 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=rn+X7PwaU7KeyHmz2NcEr+X6ajAfKAx2mgaXLfN5vGE=; b=IYzrLSyCZfjipcDzDCvo/b9JUbatZNw16UhZQjwDDkqrQMUOlZTqC63W4PDhTv9qBBxmQm kAbTAMlnvaLFsNEILOPM2tww2dJutZ9CEdJdTPrxmp8UgTMBuA6J+3IVECiim16JEsOa3W NLvpYT6mecvNcdFH9CG1JpUSvy4rXouSiSFxRAY+mD/vJmKFKWXT2y5jppfoKgssEkhA0r hCf+LjKbI0sBZRHOlenb6LBSjlp1RKOZdUMhFbVz5DFj3pE4RrgJSy7bakbKt1xwoxpbE4 2LvAznDZIMp4KGn+C7Abyv3Px3CJKlqtLQJeuYiLAJHzi4pMK+Bvik5LnDT/YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138880; a=rsa-sha256; cv=none; b=FfL4HeQgd50mfklelqmiCuQpjYhqT6vIdKzYJXL6AbdHkUG2JIhMOCIHLiB5iAPkSFLXJU MzgOo2idHwUbu6BJAy3XlfcxqKGIZ00uJvcoVHhuloIbr15ovp3mMbsms5VTjjwOXDQpE9 BYln+YTkxcNiOc4YA9+mKds8EIy0pzLkn0pQ3qKeyhScL2Nbczogc7/DRldieT1lEYJHQ7 ej3I6nCAAi3wfSn6PFQFENB8EUDRVEj54cxLixZY0rYjB+yzSJYToedIfhWpX+6Tz5E26i sO+2GEYfhCs5TX/lebSdLeqDtiQQsv0vCi896gg1VNvFSOCXOC7/1tG03NwClw== 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 4Xtvv41v1zz19rG; Wed, 20 Nov 2024 21:41:20 +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 4AKLfKYD022128; Wed, 20 Nov 2024 21:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfK72022123; Wed, 20 Nov 2024 21:41:20 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:20 GMT Message-Id: <202411202141.4AKLfK72022123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 30d40692531d - stable/14 - pf: Add a TCP rdr test on IPv6 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 30d40692531dd79a74ed5e356e68063caeb8803f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=30d40692531dd79a74ed5e356e68063caeb8803f commit 30d40692531dd79a74ed5e356e68063caeb8803f Author: Tom Jones AuthorDate: 2023-10-06 13:19:31 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 pf: Add a TCP rdr test on IPv6 Reviewed by: kp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42105 (cherry picked from commit b9870ba93ea90a12f5a5727c80f7958b17f9afcc) --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/rdr.sh | 127 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 085cdf043606..cc61a48f80ea 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -28,6 +28,7 @@ ATF_TESTS_SH+= altq \ pfsync \ prio \ proxy \ + rdr \ ridentifier \ route_to \ rtable \ diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh new file mode 100644 index 000000000000..efa3750e8f42 --- /dev/null +++ b/tests/sys/netpfil/pf/rdr.sh @@ -0,0 +1,127 @@ +# +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright © 2023 Tom Jones +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "tcp_v6" "cleanup" +tcp_v6_head() +{ + atf_set descr 'TCP rdr with IPv6' + atf_set require.user root + atf_set require.progs scapy python3 +} + +# +# Test that rdr works for TCP with IPv6. +# +# a <-----> b <-----> c +# +# Test configures three jails (a, b and c) and connects them together with b as +# a router between a and c. +# +# TCP traffic to b on port 80 is redirected to c on port 8000 +# +# Test for incorrect checksums after the rewrite by looking at a packet capture (see bug 210860) +# +tcp_v6_body() +{ + pft_init + + j="rdr:tcp_v6" + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + echo $epair_one + echo $epair_two + + vnet_mkjail ${j}a ${epair_one}b + vnet_mkjail ${j}b ${epair_one}a ${epair_two}a + vnet_mkjail ${j}c ${epair_two}b + + # configure addresses for b + jexec ${j}b ifconfig lo0 up + jexec ${j}b ifconfig ${epair_one}a inet6 2001:db8:a::1/64 up no_dad + jexec ${j}b ifconfig ${epair_two}a inet6 2001:db8:b::1/64 up no_dad + + # configure addresses for a + jexec ${j}a ifconfig lo0 up + jexec ${j}a ifconfig ${epair_one}b inet6 2001:db8:a::2/64 up no_dad + + # configure addresses for c + jexec ${j}c ifconfig lo0 up + jexec ${j}c ifconfig ${epair_two}b inet6 2001:db8:b::2/64 up no_dad + + # enable forwarding in the b jail + jexec ${j}b sysctl net.inet6.ip6.forwarding=1 + + # add routes so a and c can find each other + jexec ${j}a route add -inet6 2001:db8:b::0/64 2001:db8:a::1 + jexec ${j}c route add -inet6 2001:db8:a::0/64 2001:db8:b::1 + + jexec ${j}b pfctl -e + + pft_set_rules ${j}b \ + "rdr on ${epair_one}a proto tcp from any to any port 80 -> 2001:db8:b::2 port 8000" + + # Check that a can reach c over the router + atf_check -s exit:0 -o ignore \ + jexec ${j}a ping -6 -c 1 2001:db8:b::2 + + # capture packets on c so we can look for incorrect checksums + jexec ${j}c tcpdump --immediate-mode -w ${j}.pcap tcp and port 8000 & + tcpdumppid=$! + + # start a web server and give it a second to start + jexec ${j}c python3 -m http.server & + sleep 1 + + # http directly from a to c -> a ---> b + atf_check -s exit:0 -o ignore \ + jexec ${j}a fetch -T 1 -o /dev/null -q "http://[2001:db8:b::2]:8000" + + # http from a to b with a redirect -> a ---> b + atf_check -s exit:0 -o ignore \ + jexec ${j}a fetch -T 1 -o /dev/null -q "http://[2001:db8:a::1]:80" + + # ask tcpdump to stop so we can check the packet capture + jexec ${j}c kill -s SIGINT $tcpdumppid + + # Check for 'incorrect' in packet capture, this should tell us if + # checksums are bad with rdr rules + count=$(jexec ${j}c tcpdump -vvvv -r ${j}.pcap | grep incorrect | wc -l) + atf_check_equal " 0" "$count" +} + +tcp_v6_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "tcp_v6" +} From nobody Wed Nov 20 21:41:19 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv50TKWz5dn7H; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv31cKVz4vpD; Wed, 20 Nov 2024 21:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138879; 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=oUHydZZ7kDAzaqe7/Dy4PWUNzldW39Y/aIj+upo7QSg=; b=GS5yV3iozCnSFBgrkAI5Q3dF/sIaejX25K6OMKCqJ39xyEKthAGddRXErg1AqJbWMhbBYQ WyJMSJBzfZ3YUst+Dg6Je+8W5/XjV0pg4zREIxJOHJNEt3MM7kTcN3VW2QReVjJqVu4HWv CNed5pOEKLk/B72As4XwWZzAX9K8vzYYMkOVRP/70EoDC2FX8k+qU4iifPT+4E+gjv1fUH oAE6gkHmvHdKQCNHuZkQowvQcG+q7O2+3Jq6hi/9CPKrNMdsrL4dNusOs5GZZ/gqK43Iz3 ikC3+OFFm1X2P6rNj7XBHb0p75WdFWhZPo/TZCpFUnWxRZMKxJkhBLnTO/OojQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138879; 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=oUHydZZ7kDAzaqe7/Dy4PWUNzldW39Y/aIj+upo7QSg=; b=D2mWH+bg6Ve+1gw9mqpvtU3wXSlYivaTfePoGAxxGFk8ESq4QGoCSgQgKbHD2WgCmxpjjp DIKA1+V2srZj+milCblItH2GkC5om97z6RESdjXLFlAZFNnAT4qYNITpwYOytQih3ETBQv xwKeqxcOVDiUXZIAhMSW+aSmCI0SwhpI0KLB0aH/roMvz7FWifPjXGCOZZpqc7Mo+jGWq7 3yVgn464M6UTQw9in2JNMddN9jkAkIeq3h9lg4WgcA8BQtCosAjWlJvFzC19//owTE2lPH T1ZHhON3x/28m47+3RM8x3GLjjfuD7FW8s+6k4/RAe+GRfVaBH3GpgdeWTbayg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138879; a=rsa-sha256; cv=none; b=sEd0y/Wl7N57uBg1SYnjll8C7goRVJQt1vviLE8ViwMNfWVIG51Hx2zK3zI6SEiYfztRFH wgft7MW55dGdPsSYwso5HqRJN+bi/Q7Zlb6w285y2GmPK1A+6Jt+pJFlx6RBY2pvyyA2vP IzkX1zYU7/PI/QBrh7X35JSN9iPHOrthf3z2TdhXdKD5bpegh9TkgKUIDRTVU1rR0r0BDZ idSvyfXC/RgQTaC0CaQJuz5m2g1RtIJW1TrH1/qIxUXWyNpw/WJrEKBRLRqGkuhDyOb/2F SKGfXvlaVQ5rmXhtmou3qjjw/R9t8SS4GoXxqmFQGH/MRRSjfTfUIZcoWP6sFA== 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 4Xtvv315Ryz1B99; Wed, 20 Nov 2024 21:41:19 +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 4AKLfJRd022073; Wed, 20 Nov 2024 21:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfJ6D022070; Wed, 20 Nov 2024 21:41:19 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:19 GMT Message-Id: <202411202141.4AKLfJ6D022070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3afdae488574 - stable/14 - gve: Fix TX livelock List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 commit 3afdae4885743a2ed5cec3f08d8d8ec9e9376b59 Author: Shailend Chand AuthorDate: 2024-11-05 19:38:31 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:08 +0000 gve: Fix TX livelock Before this change the transmit taskqueue would enqueue itself when it cannot find space on the NIC ring with the hope that eventually space would be made. This results in the following livelock that only occurs after passing ~200Gbps of TCP traffic for many hours: 100% CPU ┌───────────┐wait on ┌──────────┐ ┌───────────┐ │user thread│ cpu │gve xmit │wait on │gve cleanup│ │with mbuf ├────────►│taskqueue ├────────►│taskqueue │ │uma lock │ │ │ NIC ring│ │ └───────────┘ └──────────┘ space └─────┬─────┘ ▲ │ │ wait on mbuf uma lock │ └───────────────────────────────────────────┘ Further details about the livelock are available on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281560. After this change, the transmit taskqueue no longer spins till there is room on the NIC ring. It instead stops itself and lets the completion-processing taskqueue wake it up. Since I'm touching the trasnmit taskqueue I've also corrected the name of a counter and also fixed a bug where EINVAL mbufs were not being freed and were instead living forever on the bufring. Signed-off-by: Shailend Chand Reviewed-by: markj MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47138 (cherry picked from commit 40097cd67c0d52e2b288e8555b12faf02768d89c) --- sys/dev/gve/gve.h | 3 +- sys/dev/gve/gve_main.c | 4 +- sys/dev/gve/gve_sysctl.c | 6 +-- sys/dev/gve/gve_tx.c | 98 ++++++++++++++++++++++++++++++++++++++---------- sys/dev/gve/gve_tx_dqo.c | 10 +++++ 5 files changed, 95 insertions(+), 26 deletions(-) diff --git a/sys/dev/gve/gve.h b/sys/dev/gve/gve.h index 43082d64ba95..92ab6838d5bb 100644 --- a/sys/dev/gve/gve.h +++ b/sys/dev/gve/gve.h @@ -341,7 +341,7 @@ struct gve_txq_stats { counter_u64_t tpackets; counter_u64_t tso_packet_cnt; counter_u64_t tx_dropped_pkt; - counter_u64_t tx_dropped_pkt_nospace_device; + counter_u64_t tx_delayed_pkt_nospace_device; counter_u64_t tx_dropped_pkt_nospace_bufring; counter_u64_t tx_delayed_pkt_nospace_descring; counter_u64_t tx_delayed_pkt_nospace_compring; @@ -383,6 +383,7 @@ struct gve_tx_ring { struct task xmit_task; struct taskqueue *xmit_tq; + bool stopped; /* Accessed when writing descriptors */ struct buf_ring *br; diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index 5575c82f0681..e40f77b08e85 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -32,10 +32,10 @@ #include "gve_adminq.h" #include "gve_dqo.h" -#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.0\n" +#define GVE_DRIVER_VERSION "GVE-FBSD-1.3.1\n" #define GVE_VERSION_MAJOR 1 #define GVE_VERSION_MINOR 3 -#define GVE_VERSION_SUB 0 +#define GVE_VERSION_SUB 1 #define GVE_DEFAULT_RX_COPYBREAK 256 diff --git a/sys/dev/gve/gve_sysctl.c b/sys/dev/gve/gve_sysctl.c index b9f2eefa5bb0..7a091d9caa43 100644 --- a/sys/dev/gve/gve_sysctl.c +++ b/sys/dev/gve/gve_sysctl.c @@ -140,9 +140,9 @@ gve_setup_txq_sysctl(struct sysctl_ctx_list *ctx, "tx_bytes", CTLFLAG_RD, &stats->tbytes, "Bytes transmitted"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, - "tx_dropped_pkt_nospace_device", CTLFLAG_RD, - &stats->tx_dropped_pkt_nospace_device, - "Packets dropped due to no space in device"); + "tx_delayed_pkt_nospace_device", CTLFLAG_RD, + &stats->tx_delayed_pkt_nospace_device, + "Packets delayed due to no space in device"); SYSCTL_ADD_COUNTER_U64(ctx, tx_list, OID_AUTO, "tx_dropped_pkt_nospace_bufring", CTLFLAG_RD, &stats->tx_dropped_pkt_nospace_bufring, diff --git a/sys/dev/gve/gve_tx.c b/sys/dev/gve/gve_tx.c index 60a54878b685..e7e10e526cb9 100644 --- a/sys/dev/gve/gve_tx.c +++ b/sys/dev/gve/gve_tx.c @@ -246,6 +246,8 @@ gve_start_tx_ring(struct gve_priv *priv, int i, struct gve_tx_ring *tx = &priv->tx[i]; struct gve_ring_com *com = &tx->com; + atomic_store_bool(&tx->stopped, false); + NET_TASK_INIT(&com->cleanup_task, 0, cleanup, tx); com->cleanup_tq = taskqueue_create_fast("gve tx", M_WAITOK, taskqueue_thread_enqueue, &com->cleanup_tq); @@ -427,6 +429,11 @@ gve_tx_cleanup_tq(void *arg, int pending) gve_db_bar_write_4(priv, tx->com.irq_db_offset, GVE_IRQ_MASK); taskqueue_enqueue(tx->com.cleanup_tq, &tx->com.cleanup_task); } + + if (atomic_load_bool(&tx->stopped) && space_freed) { + atomic_store_bool(&tx->stopped, false); + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + } } static void @@ -671,8 +678,7 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf) bytes_required = gve_fifo_bytes_required(tx, first_seg_len, pkt_len); if (__predict_false(!gve_can_tx(tx, bytes_required))) { counter_enter(); - counter_u64_add_protected(tx->stats.tx_dropped_pkt_nospace_device, 1); - counter_u64_add_protected(tx->stats.tx_dropped_pkt, 1); + counter_u64_add_protected(tx->stats.tx_delayed_pkt_nospace_device, 1); counter_exit(); return (ENOBUFS); } @@ -733,6 +739,59 @@ gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf) return (0); } +static int +gve_xmit_mbuf(struct gve_tx_ring *tx, + struct mbuf **mbuf) +{ + if (gve_is_gqi(tx->com.priv)) + return (gve_xmit(tx, *mbuf)); + + if (gve_is_qpl(tx->com.priv)) + return (gve_xmit_dqo_qpl(tx, *mbuf)); + + /* + * gve_xmit_dqo might attempt to defrag the mbuf chain. + * The reference is passed in so that in the case of + * errors, the new mbuf chain is what's put back on the br. + */ + return (gve_xmit_dqo(tx, mbuf)); +} + +/* + * Has the side-effect of stopping the xmit queue by setting tx->stopped + */ +static int +gve_xmit_retry_enobuf_mbuf(struct gve_tx_ring *tx, + struct mbuf **mbuf) +{ + int err; + + atomic_store_bool(&tx->stopped, true); + + /* + * Room made in the queue BEFORE the barrier will be seen by the + * gve_xmit_mbuf retry below. + * + * If room is made in the queue AFTER the barrier, the cleanup tq + * iteration creating the room will either see a tx->stopped value + * of 0 or the 1 we just wrote: + * + * If it sees a 1, then it would enqueue the xmit tq. Enqueue + * implies a retry on the waiting pkt. + * + * If it sees a 0, then that implies a previous iteration overwrote + * our 1, and that iteration would enqueue the xmit tq. Enqueue + * implies a retry on the waiting pkt. + */ + atomic_thread_fence_seq_cst(); + + err = gve_xmit_mbuf(tx, mbuf); + if (err == 0) + atomic_store_bool(&tx->stopped, false); + + return (err); +} + static void gve_xmit_br(struct gve_tx_ring *tx) { @@ -743,24 +802,23 @@ gve_xmit_br(struct gve_tx_ring *tx) while ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0 && (mbuf = drbr_peek(ifp, tx->br)) != NULL) { + err = gve_xmit_mbuf(tx, &mbuf); - if (gve_is_gqi(priv)) - err = gve_xmit(tx, mbuf); - else { - /* - * gve_xmit_dqo might attempt to defrag the mbuf chain. - * The reference is passed in so that in the case of - * errors, the new mbuf chain is what's put back on the br. - */ - if (gve_is_qpl(priv)) - err = gve_xmit_dqo_qpl(tx, mbuf); - else - err = gve_xmit_dqo(tx, &mbuf); - } + /* + * We need to stop this taskqueue when we can't xmit the pkt due + * to lack of space in the NIC ring (ENOBUFS). The retry exists + * to guard against a TOCTTOU bug that could end up freezing the + * queue forever. + */ + if (__predict_false(mbuf != NULL && err == ENOBUFS)) + err = gve_xmit_retry_enobuf_mbuf(tx, &mbuf); if (__predict_false(err != 0 && mbuf != NULL)) { - drbr_putback(ifp, tx->br, mbuf); - taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + if (err == EINVAL) { + drbr_advance(ifp, tx->br); + m_freem(mbuf); + } else + drbr_putback(ifp, tx->br, mbuf); break; } @@ -827,7 +885,8 @@ gve_xmit_ifp(if_t ifp, struct mbuf *mbuf) is_br_empty = drbr_empty(ifp, tx->br); err = drbr_enqueue(ifp, tx->br, mbuf); if (__predict_false(err != 0)) { - taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + if (!atomic_load_bool(&tx->stopped)) + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); counter_enter(); counter_u64_add_protected(tx->stats.tx_dropped_pkt_nospace_bufring, 1); counter_u64_add_protected(tx->stats.tx_dropped_pkt, 1); @@ -842,9 +901,8 @@ gve_xmit_ifp(if_t ifp, struct mbuf *mbuf) if (is_br_empty && (GVE_RING_TRYLOCK(tx) != 0)) { gve_xmit_br(tx); GVE_RING_UNLOCK(tx); - } else { + } else if (!atomic_load_bool(&tx->stopped)) taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); - } return (0); } diff --git a/sys/dev/gve/gve_tx_dqo.c b/sys/dev/gve/gve_tx_dqo.c index 323c032a3e65..fab2d6d0f613 100644 --- a/sys/dev/gve/gve_tx_dqo.c +++ b/sys/dev/gve/gve_tx_dqo.c @@ -1052,6 +1052,16 @@ gve_tx_cleanup_dqo(struct gve_priv *priv, struct gve_tx_ring *tx, int budget) work_done++; } + /* + * Waking the xmit taskqueue has to occur after room has been made in + * the queue. + */ + atomic_thread_fence_seq_cst(); + if (atomic_load_bool(&tx->stopped) && work_done) { + atomic_store_bool(&tx->stopped, false); + taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task); + } + tx->done += work_done; /* tx->done is just a sysctl counter */ counter_enter(); counter_u64_add_protected(tx->stats.tbytes, bytes_done); From nobody Wed Nov 20 21:41:22 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv667tzz5dnRk; Wed, 20 Nov 2024 21:41:22 +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 4Xtvv642Qlz4vpP; Wed, 20 Nov 2024 21:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138882; 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=DjiJE0x1LB+UsUVDdNXX8g+O92AKlitPZ1vgDPoZLP0=; b=ATi7gNNS0xY+BI1jQaoPVb07mlLCsknAi/d7ldvuhIT+z9HKQUdInkeDsUFvcTMEki4bSi aoReduPQz4d2o0hs6RvJRHzjYhfq3NTaEEuaXpDrs6ExEOlvdqxR/EW6ey1KxIG91a3blk dsh8Kw6bXrOJoz/nGrMOd7e1l8ak75xZ2fuwgJTz7iytvc2KwYK1KMi5NBZtfmbtvsI+qH vo39QSBaNP4v7gzmNjjOmwHTSJ6NmCe4jfQuD/NODjQdADCFG+Sc49FIflZKMZ6WfLSJEH YfmkpBNrom0NvDxqiY/e+orepyQrYuYaBJlBhEL/JW7tp2cy3XEMSzezk6c5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138882; 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=DjiJE0x1LB+UsUVDdNXX8g+O92AKlitPZ1vgDPoZLP0=; b=C46lnWyuj9jEIBaBjFRgGbTl4vfWiIo2q47ZjNnpPJohU0w/749JKvl0YNhT1eRRhjmhXD o1iRKxuZcs7d8WBPt2t3bqyfpAHpoG3fmD37O0HVBlShvtEHmvlHI+oZdHLH/wnGpmyJ9V sMc2y0x5mYxttOZuV/aTT+zWY9Q2fdWkgMcAgIymKDrSsT0JNhrc9IBDVc1qO/0P/2AOh7 ZL2zRpvyu+n000Xzg6Ja1aoOG7MU+YIz11u40kEJVArn9UUkeX+Z+PdW8Jndf1Pstgzoqf 1XizjawQFH/XL7Sxk2SWsraeZ15BnrYW2KJ2OBev7D/CjZHU5TUCVCKz/PRd9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138882; a=rsa-sha256; cv=none; b=MVaGbU4XIZqZ/XiFCMbPhuQqynuzqVMpDa/p6o5xICMfrufLMvJ5oRQxZKtjgIZjxzLIJQ Cxt305DeCgSDI66bKfgrxo+e8trpx4zzHs1QBHqDLdzPSUyP8bwSroQbj0b5w1kQaF0slW cpekMtjoj3LW4zBULnigh4csYlCD/uRD5eQQ9iAS8+IFx4iIAvJnnAQ9e0wXirUHMt7jQL 4ofs7p20Rw3yxrL2uepvc534d4Y9Xm++OfGmeAxFjVuGwsmWkvwk/rovrpYkjZ0IZQwyES 5q2rv9epv3vs/v2c0Yrckh28wEZTW0or0IEhsTcb+SVVf39HhftRHCryfpy8iw== 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 4Xtvv632sSz19kh; Wed, 20 Nov 2024 21:41:22 +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 4AKLfM5v022259; Wed, 20 Nov 2024 21:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfMtj022256; Wed, 20 Nov 2024 21:41:22 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:22 GMT Message-Id: <202411202141.4AKLfMtj022256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 08d0ebe560a8 - stable/14 - pf: Let rdr rules modify the src port if doing so would avoid a conflict List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 08d0ebe560a89db189c36dcba270de33fb2c0965 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=08d0ebe560a89db189c36dcba270de33fb2c0965 commit 08d0ebe560a89db189c36dcba270de33fb2c0965 Author: Mark Johnston AuthorDate: 2024-08-19 14:08:44 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Let rdr rules modify the src port if doing so would avoid a conflict If NAT rules cause inbound connections to different external IPs to be mapped to the same internal IP, and some application uses the same source port for multiple such connections, rdr translation may result in conflicts that cause some of the connections to be dropped. Address this by letting rdr rules detect state conflicts and modulate the source port to avoid them. Reviewed by: kp, allanjude MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D44488 (cherry picked from commit 9897a66923a3e79c22fcbd4bc80afae9eb9f277c) --- share/man/man5/pf.conf.5 | 9 +++- sys/netpfil/pf/pf_lb.c | 70 ++++++++++++++++++++++--- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/rdr-srcport.py | 20 ++++++++ tests/sys/netpfil/pf/rdr.sh | 100 ++++++++++++++++++++++++++++++++++++ 5 files changed, 191 insertions(+), 9 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 7e2db95fd961..d9e9127f8a84 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 17, 2023 +.Dd June 24, 2024 .Dt PF.CONF 5 .Os .Sh NAME @@ -1403,9 +1403,14 @@ or .Xr udp 4 connections; implicitly in the case of .Ar nat -rules and explicitly in the case of +rules and both implicitly and explicitly in the case of .Ar rdr rules. +A +.Ar rdr +rule may cause the source port to be modified if doing so avoids a conflict +with an existing connection. +A random source port in the range 50001-65535 is chosen in this case. Port numbers are never translated with a .Ar binat rule. diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 06c82569ad6c..7524bf138e6d 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -600,7 +600,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, { struct pf_krule *r = NULL; struct pf_addr *naddr; - uint16_t *nport; + uint16_t *nportp; uint16_t low, high; PF_RULES_RASSERT(); @@ -643,9 +643,8 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, return (NULL); } - /* XXX We only modify one side for now. */ naddr = &(*nkp)->addr[1]; - nport = &(*nkp)->port[1]; + nportp = &(*nkp)->port[1]; switch (r->action) { case PF_NAT: @@ -658,7 +657,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } if (r->rpool.mape.offset > 0) { if (pf_get_mape_sport(pd->af, pd->proto, r, saddr, - sport, daddr, dport, naddr, nport, sn)) { + sport, daddr, dport, naddr, nportp, sn)) { DPFPRINTF(PF_DEBUG_MISC, ("pf: MAP-E port allocation (%u/%u/%u)" " failed\n", @@ -668,7 +667,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, goto notrans; } } else if (pf_get_sport(pd->af, pd->proto, r, saddr, sport, - daddr, dport, naddr, nport, low, high, sn)) { + daddr, dport, naddr, nportp, low, high, sn)) { DPFPRINTF(PF_DEBUG_MISC, ("pf: NAT proxy port allocation (%u-%u) failed\n", r->rpool.proxy_port[0], r->rpool.proxy_port[1])); @@ -742,6 +741,9 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } break; case PF_RDR: { + struct pf_state_key_cmp key; + uint16_t cut, low, high, nport; + if (pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn)) goto notrans; if ((r->rpool.opts & PF_POOL_TYPEMASK) == PF_POOL_BITMASK) @@ -762,9 +764,63 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, /* Wrap around if necessary. */ if (tmp_nport > 65535) tmp_nport -= 65535; - *nport = htons((uint16_t)tmp_nport); + nport = htons((uint16_t)tmp_nport); } else if (r->rpool.proxy_port[0]) - *nport = htons(r->rpool.proxy_port[0]); + nport = htons(r->rpool.proxy_port[0]); + else + nport = dport; + + /* + * Update the destination port. + */ + *nportp = nport; + + /* + * Do we have a source port conflict in the stack state? Try to + * modulate the source port if so. Note that this is racy since + * the state lookup may not find any matches here but will once + * pf_create_state() actually instantiates the state. + */ + bzero(&key, sizeof(key)); + key.af = pd->af; + key.proto = pd->proto; + key.port[0] = sport; + PF_ACPY(&key.addr[0], saddr, key.af); + key.port[1] = nport; + PF_ACPY(&key.addr[1], naddr, key.af); + + if (!pf_find_state_all_exists(&key, PF_OUT)) + break; + + low = 50001; /* XXX-MJ PF_NAT_PROXY_PORT_LOW/HIGH */ + high = 65535; + cut = arc4random() % (1 + high - low) + low; + for (uint32_t tmp = cut; + tmp <= high && tmp <= UINT16_MAX; tmp++) { + key.port[0] = htons(tmp); + if (!pf_find_state_all_exists(&key, PF_OUT)) { + /* Update the source port. */ + (*nkp)->port[0] = htons(tmp); + goto out; + } + } + for (uint32_t tmp = cut - 1; tmp >= low; tmp--) { + key.port[0] = htons(tmp); + if (!pf_find_state_all_exists(&key, PF_OUT)) { + /* Update the source port. */ + (*nkp)->port[0] = htons(tmp); + goto out; + } + } + + DPFPRINTF(PF_DEBUG_MISC, + ("pf: RDR source port allocation failed\n")); + if (0) { +out: + DPFPRINTF(PF_DEBUG_MISC, + ("pf: RDR source port allocation %u->%u\n", + ntohs(sport), ntohs((*nkp)->port[0]))); + } break; } default: diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index cc61a48f80ea..dc77fd67b2c6 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -64,6 +64,7 @@ ${PACKAGE}FILES+= CVE-2019-5597.py \ frag-overreplace.py \ pfsync_defer.py \ pft_ether.py \ + rdr-srcport.py \ utils.subr ${PACKAGE}FILESMODE_CVE-2019-5597.py= 0555 diff --git a/tests/sys/netpfil/pf/rdr-srcport.py b/tests/sys/netpfil/pf/rdr-srcport.py new file mode 100644 index 000000000000..633580582711 --- /dev/null +++ b/tests/sys/netpfil/pf/rdr-srcport.py @@ -0,0 +1,20 @@ +# +# A helper script which accepts TCP connections and writes the remote port +# number to the stream. +# + +import socket + +def main(): + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + s.bind(('0.0.0.0', 8888)) + s.listen(5) + + while True: + cs, addr = s.accept() + cs.sendall(str(addr[1]).encode()) + cs.close() + +if __name__ == '__main__': + main() diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index 5e60b97c653b..07aca78cc650 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -121,7 +121,107 @@ tcp_v6_cleanup() pft_cleanup } + +atf_test_case "srcport" "cleanup" +srcport_head() +{ + atf_set descr 'TCP rdr srcport modulation' + atf_set require.user root + atf_set require.progs python3 + atf_set timeout 9999 +} + +# +# Test that rdr works for multiple TCP with same srcip and srcport. +# +# Four jails, a, b, c, d, are used: +# - jail d runs a server on port 8888, +# - jail a makes connections to the server, routed through jails b and c, +# - jail b uses NAT to rewrite source addresses and ports to the same 2-tuple, +# avoiding the need to use SO_REUSEADDR in jail a, +# - jail c uses a redirect rule to map the destination address to the same +# address and port, resulting in a NAT state conflict. +# +# In this case, the rdr rule should also rewrite the source port (again) to +# resolve the state conflict. +# +srcport_body() +{ + pft_init + + j="rdr:srcport" + epair1=$(vnet_mkepair) + epair2=$(vnet_mkepair) + epair3=$(vnet_mkepair) + + echo $epair_one + echo $epair_two + + vnet_mkjail ${j}a ${epair1}a + vnet_mkjail ${j}b ${epair1}b ${epair2}a + vnet_mkjail ${j}c ${epair2}b ${epair3}a + vnet_mkjail ${j}d ${epair3}b + + # configure addresses for a + jexec ${j}a ifconfig lo0 up + jexec ${j}a ifconfig ${epair1}a inet 198.51.100.50/24 up + jexec ${j}a ifconfig ${epair1}a inet alias 198.51.100.51/24 + jexec ${j}a ifconfig ${epair1}a inet alias 198.51.100.52/24 + + # configure addresses for b + jexec ${j}b ifconfig lo0 up + jexec ${j}b ifconfig ${epair1}b inet 198.51.100.1/24 up + jexec ${j}b ifconfig ${epair2}a inet 198.51.101.2/24 up + + # configure addresses for c + jexec ${j}c ifconfig lo0 up + jexec ${j}c ifconfig ${epair2}b inet 198.51.101.3/24 up + jexec ${j}c ifconfig ${epair2}b inet alias 198.51.101.4/24 + jexec ${j}c ifconfig ${epair2}b inet alias 198.51.101.5/24 + jexec ${j}c ifconfig ${epair3}a inet 203.0.113.1/24 up + + # configure addresses for d + jexec ${j}d ifconfig lo0 up + jexec ${j}d ifconfig ${epair3}b inet 203.0.113.50/24 up + + jexec ${j}b sysctl net.inet.ip.forwarding=1 + jexec ${j}c sysctl net.inet.ip.forwarding=1 + jexec ${j}b pfctl -e + jexec ${j}c pfctl -e + + pft_set_rules ${j}b \ + "set debug misc" \ + "nat on ${epair2}a inet from 198.51.100.0/24 to any -> ${epair2}a static-port" + + pft_set_rules ${j}c \ + "set debug misc" \ + "rdr on ${epair2}b proto tcp from any to ${epair2}b port 7777 -> 203.0.113.50 port 8888" + + jexec ${j}a route add default 198.51.100.1 + jexec ${j}c route add 198.51.100.0/24 198.51.101.2 + jexec ${j}d route add 198.51.101.0/24 203.0.113.1 + + jexec ${j}d python3 $(atf_get_srcdir)/rdr-srcport.py & + sleep 1 + + echo a | jexec ${j}a nc -w 3 -s 198.51.100.50 -p 1234 198.51.101.3 7777 > port1 + + jexec ${j}a nc -s 198.51.100.51 -p 1234 198.51.101.4 7777 > port2 & + jexec ${j}a nc -s 198.51.100.52 -p 1234 198.51.101.5 7777 > port3 & + sleep 1 + + atf_check -o inline:"1234" cat port1 + atf_check -o match:"[0-9]+" -o not-inline:"1234" cat port2 + atf_check -o match:"[0-9]+" -o not-inline:"1234" cat port3 +} + +srcport_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "tcp_v6" + atf_add_test_case "srcport" } From nobody Wed Nov 20 21:41:21 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv54Mgxz5dnJc; Wed, 20 Nov 2024 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xtvv52z4Fz4vtr; Wed, 20 Nov 2024 21:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138881; 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=dcx1zLqHp4sF4940tlsbyJw7Cxxki97/hVHeOCNGYAA=; b=TjJMHhf0qHqvSR79TKVHnisjtsa7YyCo7JrWey/5hLBH/FalSY7Ke9bx1IMneei+0NtidN roavP6JqdAdRDEQwmx2/VMoMBmHYAbZvG+u7WDwhQZEWUI0r3c72nv/bEEqas8tdXQm/pu XeILAvHDo5s98fpS1jAhDUWoN77tZD2hdown10HkI/Grmwn/QEVBpoUFrEzGQK4FLl5e62 BX68yywn35vDJw9DJLIoNM5WzWcfxTfgWLjg25+2M+7e523K0CSbrv7sdmvDyeSKrQR3ob 1sEXLLLh03amjJ0ICp7XNPpqf69e36B291chsuaVTixRn5FghGSb1plnnBt9AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138881; 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=dcx1zLqHp4sF4940tlsbyJw7Cxxki97/hVHeOCNGYAA=; b=Fx3NCx5J3/qNQ5WAvCev4kiNeLbZ3wKYUfLl/6TfPpe3REx+VJGV41/uXVjnm0AEy3x7m8 IFS9xNdyGEVmwnt4umwMNzzzq1EtzG38BfbjyrhGHHMgeW7OdHWHY05q95HiLwJPK7hGnV bRryWRiGNX2HNdI1/FiYIfixsbXtIY3JgRLMCg3Mpy/gnVNIiUXkyM0rqu1ykk1anyGYyO +YBID+qNx96ko83REMJWTO21GTpdH94Qnilw14bCY0eIRkt4HhX3rIZxnVITN1ItEeleeS 18gAOtRWqNpEszwuF5WAKFGsGcZqTNjxZ6FC5Ucw/mSnfgN96wv5hg4I4AgRYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138881; a=rsa-sha256; cv=none; b=n84SNKCKzifjiMkeqAPaCV7V6QTkfllv6LMoDT/nFLqQ2xi2pme8dsRJfc5fmeFi1d1obX eaws5A4QtDyWB5t8T3vIS6hTvpCciqcJTpRIAtbk+4iRLHrVLbjIeN/7OrpgfA3gK8FCp8 Pabb4dqJPsy6AoIMz7gEQJnElTHQm8aVeEKV29SWizl3yyKHj3EGATt62jvnLF0pPaH8Jb gZciJhnKzM8Wxk8db18z4bAk5eR9vI0Brt3AnpcxN2z9CLoaPySmQH7rsug5XcP8ISqkoA 9AkHY75L3atm8EizjoI0ygoCOGFXilSUHBrr4Fp/+OethJI0TxIqEZl121b/xQ== 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 4Xtvv52TxJz19bJ; Wed, 20 Nov 2024 21:41:21 +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 4AKLfL9u022179; Wed, 20 Nov 2024 21:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfLJG022174; Wed, 20 Nov 2024 21:41:21 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:21 GMT Message-Id: <202411202141.4AKLfLJG022174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f5b3ce0d75f0 - stable/14 - pf: Correct SPDX identifier List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 commit f5b3ce0d75f0493f6bbf4d38ad45abef23196ea4 Author: Tom Jones AuthorDate: 2024-02-23 15:58:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Correct SPDX identifier Pointed out by: Mike Karels (cherry picked from commit 3db693f7da8a1aaf0a8887e7791ebb5d67c7a2d9) --- tests/sys/netpfil/pf/rdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index efa3750e8f42..5e60b97c653b 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -1,6 +1,6 @@ # # -# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# SPDX-License-Identifier: BSD-2-Clause # # Copyright © 2023 Tom Jones # From nobody Wed Nov 20 21:41:23 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv75rgDz5dnRl; Wed, 20 Nov 2024 21:41:23 +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 4Xtvv74sprz4vmf; Wed, 20 Nov 2024 21:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138883; 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=cE2QgcN9wm2D/RD+tZ4tIiYHnF5hxFR/lr8sEAaKEOs=; b=Wzj2KQ3dNEUP9auD5IhIOFadkW0G8OClAFaFKd9BjGWXICKyhwguqhKYfh9+kWzPMIHisF B0vs2exv+G++xAqO+tR/nWqacLy9lo5Fo/NrG6/GubdTzwb/I2UmohRq7TPb9LGUTM1QzG PGTgXueIqS9x/C1V/TJXAOXvTtFE89s+ZHa2mhCwCYl1t92+xyCO9m9bIRhYrwTUb4L2vv YNlH6SNiHz2aC0Vm7mmKduS876pc3OCR9ICFqqkyPSAMAXU2bnehRJrPDY04uzsy4zKBqQ IRUTimQtJgBMH4cZCeK2o/mJvAy4UbBneKeIO3+bi9bk2ww1tlKksIy4rKl6pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138883; 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=cE2QgcN9wm2D/RD+tZ4tIiYHnF5hxFR/lr8sEAaKEOs=; b=ruw5JdvWi19w7vbo7B92PKhSUaGlbA/efRv1yxpVVfH/yG38DkF7KRAdBYep2W5Mm7hvlo EyN37CmBs84jh1/VUXUMdOPL9GS4LBdC5dB9jsgszOC7+Q4VmmcbT7cj2x0sg7OBC9LCd5 QAobi2k9uPUqLV8KqCNtziquekr1jhI/idDf3FK1JoH3aKxCPCP0jPx0oKu5rydTzJ4eL6 Ps6poMK4Eds+QF7QVHatMboaGdIeYIUICwiKQ7JSnnJjMgHGpr6Ff6k13oNqXBPBK1cYM5 9/cyrWv7rMpwQG+QuyQJ4xJKhJXFptVj1chSXv8/JnH1EguLw9FP3+vFSEPI5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138883; a=rsa-sha256; cv=none; b=edRW/onxbTcsSxi7Q7lWSbGNQuo4Zw9bSQuScXoo17cij83OktrgjmapNpF+/27HefRBpD 8/FNyK/opu92V0RbkATWe3/K3Q5Rf7ytpXQAAOBrs/KWTosWH1Q048DIOuK+QAW/UJkn6g gTHw8EIA0fjWU4cQ3E0XaLhgYz2Y8m9Spl1H51wtOvS606GcwQiWz6BZj3yXXYtUw9EOoa 0NpR343Rj8ED23JSgy6jwfZzvYAIx3di7iNOz15zkmDXH2jrjZTiJAeBQYWyjh8wKtGg42 GC2+66S0zSNiavy7JMkE3OXcyejuDwufLVOeyeudQ9ExAY1EPs2tOmwOkJATQw== 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 4Xtvv74Tzvz19nw; Wed, 20 Nov 2024 21:41:23 +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 4AKLfNw5022301; Wed, 20 Nov 2024 21:41:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfNoJ022298; Wed, 20 Nov 2024 21:41:23 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:23 GMT Message-Id: <202411202141.4AKLfNoJ022298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5df40377e7b0 - stable/14 - pf: Make pf_get_translation() more expressive List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5df40377e7b01c8fe7f5e36ffeb825514cf42072 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5df40377e7b01c8fe7f5e36ffeb825514cf42072 commit 5df40377e7b01c8fe7f5e36ffeb825514cf42072 Author: Mark Johnston AuthorDate: 2024-08-19 14:14:30 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Make pf_get_translation() more expressive Currently pf_get_translation() returns a pointer to a matching nat/rdr/binat rule, or NULL if no rule was matched or an error occurred while applying the translation. That is, we don't distinguish between errors and the lack of a matching rule. This, if an error (e.g., a memory allocation failure or a state conflict) occurs, we simply handle the packet as if no translation rule was present. This is not desireable. Make pf_get_translation() return the matching rule as an out-param and instead return a reason code which indicates whether there was no translation rule, or there was a translation rule and we failed to apply it, or there was a translation rule and we applied it successfully. Reviewed by: kp, allanjude MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D45672 (cherry picked from commit 7e65cfc9bbe5a9d735ef38f7ed49965b234b8a20) --- sys/net/pfvar.h | 5 +++-- sys/netpfil/pf/pf.c | 18 ++++++++++++---- sys/netpfil/pf/pf_lb.c | 57 +++++++++++++++++++++++++++++++++----------------- 3 files changed, 55 insertions(+), 25 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 290f339e7d00..465e47b940b3 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2510,11 +2510,12 @@ u_short pf_map_addr(u_int8_t, struct pf_krule *, struct pf_addr *, struct pf_addr *, struct pfi_kkif **nkif, struct pf_addr *, struct pf_ksrc_node **); -struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, +u_short pf_get_translation(struct pf_pdesc *, struct mbuf *, int, struct pfi_kkif *, struct pf_ksrc_node **, struct pf_state_key **, struct pf_state_key **, struct pf_addr *, struct pf_addr *, - uint16_t, uint16_t, struct pf_kanchor_stackframe *); + uint16_t, uint16_t, struct pf_kanchor_stackframe *, + struct pf_krule **); struct pf_state_key *pf_state_key_setup(struct pf_pdesc *, struct mbuf *, int, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d6541bc6627b..4fd884852d90 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4641,7 +4641,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, struct pf_ksrc_node *nsn = NULL; struct tcphdr *th = &pd->hdr.tcp; struct pf_state_key *sk = NULL, *nk = NULL; - u_short reason; + u_short reason, transerror; int rewrite = 0, hdrlen = 0; int tag = -1; int asd = 0; @@ -4654,6 +4654,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, PF_RULES_RASSERT(); + SLIST_INIT(&match_rules); + if (inp != NULL) { INP_LOCK_ASSERT(inp); pd->lookup.uid = inp->inp_cred->cr_uid; @@ -4722,8 +4724,17 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, r = TAILQ_FIRST(pf_main_ruleset.rules[PF_RULESET_FILTER].active.ptr); /* check packet for BINAT/NAT/RDR */ - if ((nr = pf_get_translation(pd, m, off, kif, &nsn, &sk, - &nk, saddr, daddr, sport, dport, anchor_stack)) != NULL) { + transerror = pf_get_translation(pd, m, off, kif, &nsn, &sk, + &nk, saddr, daddr, sport, dport, anchor_stack, &nr); + switch (transerror) { + default: + /* A translation error occurred. */ + REASON_SET(&reason, transerror); + goto cleanup; + case PFRES_MAX: + /* No match. */ + break; + case PFRES_MATCH: KASSERT(sk != NULL, ("%s: null sk", __func__)); KASSERT(nk != NULL, ("%s: null nk", __func__)); @@ -4872,7 +4883,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pd->nat_rule = nr; } - SLIST_INIT(&match_rules); while (r != NULL) { pf_counter_u64_add(&r->evaluations, 1); if (pfi_kkif_match(r->kif, kif) == r->ifnot) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 7524bf138e6d..6b0b95e9ce01 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -591,22 +591,26 @@ done: return (reason); } -struct pf_krule * +u_short pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, struct pfi_kkif *kif, struct pf_ksrc_node **sn, struct pf_state_key **skp, struct pf_state_key **nkp, struct pf_addr *saddr, struct pf_addr *daddr, - uint16_t sport, uint16_t dport, struct pf_kanchor_stackframe *anchor_stack) + uint16_t sport, uint16_t dport, struct pf_kanchor_stackframe *anchor_stack, + struct pf_krule **rp) { struct pf_krule *r = NULL; struct pf_addr *naddr; uint16_t *nportp; uint16_t low, high; + u_short reason; PF_RULES_RASSERT(); KASSERT(*skp == NULL, ("*skp not NULL")); KASSERT(*nkp == NULL, ("*nkp not NULL")); + *rp = NULL; + if (pd->dir == PF_OUT) { r = pf_match_translation(pd, m, off, kif, saddr, sport, daddr, dport, PF_RULESET_BINAT, anchor_stack); @@ -624,23 +628,23 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } if (r == NULL) - return (NULL); + return (PFRES_MAX); switch (r->action) { case PF_NONAT: case PF_NOBINAT: case PF_NORDR: - return (NULL); + return (PFRES_MAX); } *skp = pf_state_key_setup(pd, m, off, saddr, daddr, sport, dport); if (*skp == NULL) - return (NULL); + return (PFRES_MEMORY); *nkp = pf_state_key_clone(*skp); if (*nkp == NULL) { uma_zfree(V_pf_state_key_z, *skp); *skp = NULL; - return (NULL); + return (PFRES_MEMORY); } naddr = &(*nkp)->addr[1]; @@ -664,6 +668,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, r->rpool.mape.offset, r->rpool.mape.psidlen, r->rpool.mape.psid)); + reason = PFRES_MAPFAILED; goto notrans; } } else if (pf_get_sport(pd->af, pd->proto, r, saddr, sport, @@ -671,6 +676,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, DPFPRINTF(PF_DEBUG_MISC, ("pf: NAT proxy port allocation (%u-%u) failed\n", r->rpool.proxy_port[0], r->rpool.proxy_port[1])); + reason = PFRES_MAPFAILED; goto notrans; } break; @@ -682,8 +688,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #ifdef INET case AF_INET: if (r->rpool.cur->addr.p.dyn-> - pfid_acnt4 < 1) + pfid_acnt4 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->rpool.cur->addr.p.dyn-> pfid_addr4, @@ -694,8 +702,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #ifdef INET6 case AF_INET6: if (r->rpool.cur->addr.p.dyn-> - pfid_acnt6 < 1) + pfid_acnt6 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->rpool.cur->addr.p.dyn-> pfid_addr6, @@ -715,8 +725,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (pd->af) { #ifdef INET case AF_INET: - if (r->src.addr.p.dyn-> pfid_acnt4 < 1) + if (r->src.addr.p.dyn->pfid_acnt4 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->src.addr.p.dyn->pfid_addr4, &r->src.addr.p.dyn->pfid_mask4, @@ -725,8 +737,10 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, #endif /* INET */ #ifdef INET6 case AF_INET6: - if (r->src.addr.p.dyn->pfid_acnt6 < 1) + if (r->src.addr.p.dyn->pfid_acnt6 < 1) { + reason = PFRES_MAPFAILED; goto notrans; + } PF_POOLMASK(naddr, &r->src.addr.p.dyn->pfid_addr6, &r->src.addr.p.dyn->pfid_mask6, @@ -744,7 +758,8 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, struct pf_state_key_cmp key; uint16_t cut, low, high, nport; - if (pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn)) + reason = pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn); + if (reason != 0) goto notrans; if ((r->rpool.opts & PF_POOL_TYPEMASK) == PF_POOL_BITMASK) PF_POOLMASK(naddr, naddr, &r->rpool.cur->addr.v.a.mask, @@ -815,12 +830,13 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, DPFPRINTF(PF_DEBUG_MISC, ("pf: RDR source port allocation failed\n")); - if (0) { + reason = PFRES_MAPFAILED; + goto notrans; + out: - DPFPRINTF(PF_DEBUG_MISC, - ("pf: RDR source port allocation %u->%u\n", - ntohs(sport), ntohs((*nkp)->port[0]))); - } + DPFPRINTF(PF_DEBUG_MISC, + ("pf: RDR source port allocation %u->%u\n", + ntohs(sport), ntohs((*nkp)->port[0]))); break; } default: @@ -828,14 +844,17 @@ out: } /* Return success only if translation really happened. */ - if (bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) - return (r); + if (bcmp(*skp, *nkp, sizeof(struct pf_state_key_cmp))) { + *rp = r; + return (PFRES_MATCH); + } + reason = PFRES_MAX; notrans: uma_zfree(V_pf_state_key_z, *nkp); uma_zfree(V_pf_state_key_z, *skp); *skp = *nkp = NULL; *sn = NULL; - return (NULL); + return (reason); } From nobody Wed Nov 20 21:41:24 2024 X-Original-To: dev-commits-src-branches@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 4Xtvv90mNQz5dnRm; Wed, 20 Nov 2024 21:41:25 +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 4Xtvv86CyMz4vqw; Wed, 20 Nov 2024 21:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138884; 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=x6m60nzs1+9mC5UVglduqx8fFCDDzoN9NTKG1pWd4Ow=; b=xFgDp3/i9LVXPFC+FvwM+ZVsC4z9vz+GdcscpTMagbiIyidNUit91QuFjtnV4H0kn0cjum qbpIxgGncu9LcojaF0Fx62exkq2fA+wXyQGgv0ZYrTIxA4KEMyvV3N6Na2EgbBxWyhH09f XIrVmSnrYkCysyDSG0t0wMr3gZ/ODaNgEZ5sMXUgWZXtNjimGR2KCSydYEZoLSVeZQcyx7 GmZlpJbVWOJWvJ0nFSQUABNHs0FfAgprcN/YBA3mwbAmAZRG34XrZhr/1WmrkOS9MVs2KK uZtsGnZiv6jsofcuk/19/aG2MdU4sHkVozRDZUFRK6muGL4x64vRHfTnUxyzWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732138884; 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=x6m60nzs1+9mC5UVglduqx8fFCDDzoN9NTKG1pWd4Ow=; b=bLXmk0d3iYiweitdFm6edWqLraSzv5dmv/sOS5wMWE5OZATVm6Dyqu0QYUeIRpKuVFPYhJ TC4Wj0DNJ8SzmmMLvsNq6haceApASjFF0qOxGFYZtOO75s8IYBeRvvJ+iAzu70tLlN3byF IsydhgTQ8Ddtr85/Rn+Nl5+kY2uQ+Zd59CebEhAjgi3x5Sw9gKYPqtweTeUzSd68DJbFmI KtzczKGRa0zIOUFeRLGcOiLLrCrs2ZV7b47fju2desoP1L0gZvwcoJlO+9AA8Dyv0ek85y AOxKnxZzpm2gRBYVuk43Y01VZT7kFf4GY2aPlAT3wCijgqCgoT4DwBExkZHAUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732138884; a=rsa-sha256; cv=none; b=yLPh/P0xlnSyI4vTbbL9vCHS695lx1K+PC2UYCqX+U42lm4fciau5qLYgVzze35qLnHOet TUAxW9GwxqhlvtPaUBUX6b2MhKzCsi1+W9WuMQw1Enz8Ce0Umpx3Pirab62QMMp58W/Xvq xb50EL0fMh813vq9bcIe+rbQqxZ/AdCULpj1TJ6AUqRwfPOR3FJnhV+1ps9tyt+gxVpqrK ikTStjmERn7/ysRt7btMWERBF7nP5/F7hiw2LAOG7IP5rTVtRjsy2OWYbN13O18uketgKx i3K3dfM88IsV/rsLOLCxS43dW9/wyR53/SEBPCUe0YhnlOBoY/aZwQRoszmjqg== 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 4Xtvv85D7nz1B6d; Wed, 20 Nov 2024 21:41:24 +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 4AKLfOkj022356; Wed, 20 Nov 2024 21:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKLfOJe022352; Wed, 20 Nov 2024 21:41:24 GMT (envelope-from git) Date: Wed, 20 Nov 2024 21:41:24 GMT Message-Id: <202411202141.4AKLfOJe022352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f4f4c52c0f46 - stable/14 - pf: Let pf_state_insert() handle redirect state conflicts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f4f4c52c0f46531082925aded23510f9adeb6fff Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f4c52c0f46531082925aded23510f9adeb6fff commit f4f4c52c0f46531082925aded23510f9adeb6fff Author: Mark Johnston AuthorDate: 2024-09-10 14:34:45 +0000 Commit: Mark Johnston CommitDate: 2024-11-20 21:41:09 +0000 pf: Let pf_state_insert() handle redirect state conflicts When handling a redirect state conflict, pf_get_translation() tries modifying the source port to avoid it. If it fails to find a free port, the translation is aborted. Instead, if we fail to find a free source port, simply press on with the original source port and let pf_state_insert() handle the conflict as it pleases, rather than second-guessing what it will do. In particular, pf_state_insert() has special handling for TCP connections in a terminal state, and might succeed despite a state conflict. Reviewed by: kp MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D46612 (cherry picked from commit 9569fddd8d0e48211e67fdc63dd72eba83883525) --- sys/netpfil/pf/pf_lb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 6b0b95e9ce01..3f5b3f90a4e4 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -370,7 +370,7 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, struct pf_addr *naddr, struct pfi_kkif **nkif, struct pf_addr *init_addr, struct pf_ksrc_node **sn) { - u_short reason = 0; + u_short reason = PFRES_MATCH; struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; struct pf_srchash *sh = NULL; @@ -828,10 +828,15 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, } } + /* + * We failed to find a match. Push on ahead anyway, let + * pf_state_insert() be the arbiter of whether the state + * conflict is tolerable. In particular, with TCP connections + * the state may be reused if the TCP state is terminal. + */ DPFPRINTF(PF_DEBUG_MISC, ("pf: RDR source port allocation failed\n")); - reason = PFRES_MAPFAILED; - goto notrans; + break; out: DPFPRINTF(PF_DEBUG_MISC, From nobody Thu Nov 21 00:05:27 2024 X-Original-To: dev-commits-src-branches@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 4Xtz5N2ltCz5dwSp; Thu, 21 Nov 2024 00:05:28 +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 4Xtz5N0n8Nz4Dkc; Thu, 21 Nov 2024 00:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147528; 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=wzDZ5wsTivtafmLsM67gD6BDOUM0cjuONpOyyBwdFRI=; b=ErMpjylADYx8wHba+mI+f/wSAhraryAxvyXPm2PGNvyUssFNL2zYcZqrY3rj9mRl8F5AEl G+YU/uTwe/BVTGtht6329Y/oLv265g52c8a5bO74hkW6XJ8WmCcumPOdQ578bYCEOfUZZI qPtkXO9I2Vk/22aJnmfgmB17A6CEEedKKMnLuyc6/BUaskuzMEbcfZrCUjUWZJI3O9gmI9 oYlbJmO5qR85MMKsRjcERZScGsLmgEcVD5uNUJLRf9G4B0QxfyL81QFSqIeAQmMUpFVK9x tRTAjJiPlHrcVdQBphOkUBwls+EsjXL+EJM02vfcOZ55gUkf0n4vnkwf8gmv4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147528; 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=wzDZ5wsTivtafmLsM67gD6BDOUM0cjuONpOyyBwdFRI=; b=qtDAm9MH+PWGzrFGAnXxON8wYVDFNX9mzIPOALaZ7yedtHFuDU8vb6FtINP+IyehDFP0Hb R0SyBEI5f38tvCN2HqOwxJAZ/wGkwxyshINuzdXX3gpokBrbU5DZGtd15lo4j2WJ4oTWho u5Pzc4rgthJ/yRyWYUgEEapqm6QPnBR5ytqgXndmuYX1kMTVt1XlAh6E/mTqKcz23Pr+jM 1BzPnOdX/9Z7Qi2LWnj6xTxbd2eieq0GaKQ1mqWFYXPvrBbdeIS1ET9tfsN9xjDqBq6DjC smVlXAYdWgaT8wWQnb/rWVB83O3BKjfCpnbKNPLthVkxgnnLV0X+ijtTPXyYMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147528; a=rsa-sha256; cv=none; b=VYOxGjXc6pXCmdluaETKxsRs368hI3M6GfhqxH1bKdy82o4TUGPQNCcSiXBGHWwXcck+kZ Q7AoedgbkiavIOFZhXI5bwE96+64mP4B4ftSq2ZTr2Km6Q87A4lCYHIHTwyDpGmnxFh1HO 6mWfnFb0lwa3d/jfnjtk68wnWrNa3IVBQk6lEByUMmpKDbYtcx1DiFUdV/XVaSu57z1A+R q6FAdFEQMqCjKJXD05Nfjr0sJj+Wr/ZEGewFzFMLDX/sLMfVZvbCyxM89dYV/VEubjUNbd 8SC/QDAADpn0oykR5A6BOpTv9lN5jVlU/nxzPz18YRbp/WTeMQLZvtQoAhf9kA== 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 4Xtz5N0PjdzGYF; Thu, 21 Nov 2024 00:05:28 +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 4AL05RrL087652; Thu, 21 Nov 2024 00:05:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05RjE087649; Thu, 21 Nov 2024 00:05:27 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:27 GMT Message-Id: <202411210005.4AL05RjE087649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7d0c12e1f907 - stable/14 - bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7d0c12e1f907ddf9be6668449a966703c0f781d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7d0c12e1f907ddf9be6668449a966703c0f781d1 commit 7d0c12e1f907ddf9be6668449a966703c0f781d1 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:57 +0000 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit 5399052c63a7a3d2f54615d31bfd092ab887a600) --- usr.sbin/bsdinstall/scripts/wlanconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..728833f8d4a0 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -55,7 +55,8 @@ country_set() "$WLAN_IFACE" "$ifconfig_args" error_str="${error_str#ifconfig: }" # Restart wpa_supplicant(8) (should not fail). - [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \ + [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \ + f_eval_catch -d wlanconfig wpa_supplicant \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then From nobody Thu Nov 21 00:05:26 2024 X-Original-To: dev-commits-src-branches@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 4Xtz5M0xDNz5dwJH; Thu, 21 Nov 2024 00:05:27 +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 4Xtz5M0FTLz4DTZ; Thu, 21 Nov 2024 00:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147527; 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=ySko/hqykwmMp1Q3TDY4LCZ5TnHgPX27dDFlUmUKMlc=; b=KBgGFjwha7xOCqokZ8e5bqb+B9DFVABWp+Oc7wCATmKNnJQ3u/BY979U3rews3rCRMPseV y29XU7qFBD5pdlbnzhHKItV4xGChZxx6Pl83YP6qBhHWuB7rHvUx8UGyh6W1xOqpZ4Hv1B qgdA8ObNUrDjuafE+UkpR/sForASi4MZ3ir3kEv17tPlfB8EMJc1xrjqtzHm95xp8EosLA Ny4OxmsaIkbO8vtLOmBm/98AemKZbq8pbgYAF0WZPDjlZfYcvjo0f21NQaDbiASvjwGsdQ cejHVHBySwNASf5WwNKKVrLh3KRqle36uNVbio7Xud7Uq/em7eTQoqfqSS4oTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147527; 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=ySko/hqykwmMp1Q3TDY4LCZ5TnHgPX27dDFlUmUKMlc=; b=LadW2ltJZ4ukqm44G5B35/Um7Qv2CstaafAWcRnLWZBOSPg3WbF5hfYAVpAdkMzWhJOysY QbkeAr8TdGaqB/x5inj/cI3Xam2KtOlf67Gve3B37LA/peSogwD8qHQVsc33wB2hLwX+p7 raYiVlaXYX+sx//7DKcrg22QL9L7zDPLnCugr2MeylwUG2dkG/zhuMCuhXrqgcToMSnNDl VAJtjffD2P0asT4ciqPDxBQSM0Ad3MGJjpHJFPvFM3DsrBt6G5EnETXgxThEM54kx6Njv/ kCO8A3SVEDGC8ZrNfyeuxWM6mNyV1sobp5Cybf+N8SfYRqUqrxd9jxUpAvA45A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147527; a=rsa-sha256; cv=none; b=cUn7BDf+04mMHhLZvgJFNxgQR7HQgDr9YxqPHkp6qLDXKRx+qYBnyURo/KeiUKAAlOmVUs bAxfTx5hDT8/R7F5uNv5UNEHjXsr4mgd9gjWZyTfLuCHMnUOjtCfJPrGyEG9sPVRrN3ICT N2qowtvXkLkpw6BGN1+p10PS77Vf181rvePCZd8KFAVXnZevjgIEZcjZ5Q2EuMShlQgjYa EcwNu1Yd0OEw/SqqiBmfJ+Y0HGemPT6Cmf/2y7/p/uR4Vq64wU2G443PEC9ytnPi3QlwI6 eTgwsH8DgHy4S8V8t1BaeQHOXnWvDcGBqwD272pmdiGJx481A41DB73Cg5ydMw== 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 4Xtz5L6kg4zGYD; Thu, 21 Nov 2024 00:05:26 +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 4AL05QU9087598; Thu, 21 Nov 2024 00:05:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05QQY087595; Thu, 21 Nov 2024 00:05:26 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:26 GMT Message-Id: <202411210005.4AL05QQY087595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: b62012538e96 - stable/14 - release: install wireless firmware onto disc1 and dvd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b62012538e967b22736e8c2214b222f21146bddc Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b62012538e967b22736e8c2214b222f21146bddc commit b62012538e967b22736e8c2214b222f21146bddc Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:51:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:56 +0000 release: install wireless firmware onto disc1 and dvd Wireless driver firmware is no longer added to the src tree. In order to have wireless support in the installer for the new drivers we install the firmware packages onto disc1 (and memstick) and dvd if built on FreeBSD and NOPKG is not defined (to not break cross-builds from Linux or OSX and to allow people to opt-out). Sponsored by: The FreeBSD Foundation Submitted by: cperciva (the orig. commands and where to place them) Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D47407 (cherry picked from commit 7e2996c1f5b4e684cae40c2418b68061df9997d9) --- release/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/release/Makefile b/release/Makefile index 3d96880d1661..c5970b184b96 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if ${.MAKE.OS} == "FreeBSD" +# For installing packages into the release media. +.if defined(NO_ROOT) +PKG_ENV+= INSTALL_AS_USER=yes +PKG_ARGS+= -o METALOG=METALOG +.endif +PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install +.endif + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif @@ -186,6 +197,10 @@ disc1: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -256,6 +271,10 @@ dvd: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf From nobody Thu Nov 21 00:05:29 2024 X-Original-To: dev-commits-src-branches@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 4Xtz5P46bKz5dw44; Thu, 21 Nov 2024 00:05:29 +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 4Xtz5P2dF6z4DXF; Thu, 21 Nov 2024 00:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147529; 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=OsZU/oSvIJjPFScRjAUDfEJvF5CsT52NYTVzyItALds=; b=ua7dER6CE2O3b3X0ocN9g8OcZMYO5j1az3s86BUO7RQBQTvUz1qvg9gYoKT7SLRORMd8NY adA7+PlB4ikGLsETIol+WD+p2tDxuifv58tsBALQ4k5NzWE5AkrHOuNT+WtJN/M+rFULeW QsI/ffh5jI02sIWCKAtreYH0RADxRxZ725+6skHXPTcY1n9PyhloKo62fzLIJx9/s9pFNX 8TG3hloe+v6XaCplSlqjYgqQaTgkRF/fbQ1/Sv9SQ3BzdnZ3kbC8GCqxZUmeBUZC3oQGzc gbL7+mMH07Cb8AjboN1ypqhFncE5HF5zCkhAd68Sc+cQ3xDxCCpxuBPJa0/sEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732147529; 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=OsZU/oSvIJjPFScRjAUDfEJvF5CsT52NYTVzyItALds=; b=v8FC4UQ+M+bLVdbI7tOt4nsAIr4a4DGxJXAsSazOVW5LsFAGF83dwrCPIw6aknlRIVhUqA 8PpICGkyi9hfPBTsRGL4Q169Wje29PMYm7ONNCsIpHyDLu6ESyylZVKO0mJBN3z+VDWlWu xu6ZB2U0esNXD6+llXpm1LS/xxlPR8EsldhDLUURdvXnE3xScpubsRi412nTgcfPYIZtED hCFT2RSixNUB1Qpe4HIWVsxrPigAtR3r4TO0hApdvNgP9LgPgalo2bWnB+gENIMZJk8IG/ PCcu5lHyuBls9CO0kMr5Z8EV04PSUQyEiZOT9eEHNL0E6dss1QOYuUTUQrlBBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732147529; a=rsa-sha256; cv=none; b=rGsyoIKO1VVIOF1P6mi6DIrM5A5wHFCOyt7RInWQNOOLvW1T+jaFBqP2ibAzICD9NmAm3I uE/nTUrdUsopuFDXuRft7RbKfJuybAoK52GmwFai3ELaUEcRkkGYGxtYzdCZhf58cSIJRe avowF9btJC/9jxsLbz5NPIvgh+asV7yPFPfPCCdMsEBDn3is0XKDNeYVh5/VijIqe/AJPa oC7pAplocnfBXUdGY5i2co3WT2zVsB52SQrfDo6huBiw1Q/DlyV0K8GGAMT6arAoEUlNoP GLcjwF5ervPW3+pjQv1BHsX+9oG2jF0n8PUYguDSxYxE5wLIx4zjcGBlQAVuvg== 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 4Xtz5P1R1PzG60; Thu, 21 Nov 2024 00:05:29 +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 4AL05TgI087700; Thu, 21 Nov 2024 00:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL05Tjg087697; Thu, 21 Nov 2024 00:05:29 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:05:29 GMT Message-Id: <202411210005.4AL05Tjg087697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 15f6edf20e4e - stable/14 - bsdinstall: add menu to install firmware List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15f6edf20e4e1542f2385a9cbd6e996e23252858 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=15f6edf20e4e1542f2385a9cbd6e996e23252858 commit 15f6edf20e4e1542f2385a9cbd6e996e23252858 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 00:04:57 +0000 bsdinstall: add menu to install firmware Add a menu to the installer to run fwget(8) inside the newly installed system to install firmware known to be needed. This requires working netowrking. This is needed at least for wireless currently for when we entirely stop shipping new firmware in src.git to have working networking on the installed system (we already do need this for at least rtw89). Sponsored by: The FreeBSD Foundation Tested with: 4 different iwlwifi chipsets in a system (earlier version) Suggested improvments by: jrtc27 Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit bbe2a1da2df639c616869aa838244c8094779bd4) --- usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/firmware | 125 +++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c8bf143322ae..50c8948a7989 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,6 +1,10 @@ .\"- .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Björn Zeeb +.\" under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 18, 2023 +.Dd November 4, 2024 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -240,6 +244,12 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . +.It Cm firmware +executes +.Xr fwget 8 +inside the +.Ev BSDINSTALL_CHROOT +to install any needed and available firmware for the new system. .It Cm rootpass Interactively invokes .Xr passwd 1 @@ -323,6 +333,13 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_FIRMWARE +If not empty, the +.Cm auto +target +will not invoke the +.Cm firmware +target. .It Ev BSDINSTALL_SKIP_HARDENING If not empty, the .Cm auto diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 2d226f418783..cbe190d85f12 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ docsinstall \ entropy \ fetchmissingdists \ + firmware \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index fd5b634696ae..6a89b3dfdd81 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -364,6 +364,7 @@ fi [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware [ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \ --title "Add User Accounts" --yesno \ diff --git a/usr.sbin/bsdinstall/scripts/firmware b/usr.sbin/bsdinstall/scripts/firmware new file mode 100644 index 000000000000..a563f0e578e4 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/firmware @@ -0,0 +1,125 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +msg_freebsd_firmware_installation="$OSNAME Firmware Installation" +msg_freebsd_installer="$OSNAME Installer" +msg_firmware_menu_text="This menu allows you to install firmware packages for your system" +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +hline_ok="Press OK to continue" + +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_firmware_menu_text" + local hline + local check_list= # Empty; filled below + local fwlist _fw + + fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n` + case "${fwlist}" in + "") # No firmware to install + # Print a dialog with OK and a 3 line timeout bar. + local height width rows msg + + msg="No firmware to install, continuing..." + hline="$hline_ok" + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$msg\" \ + \"-\" \ + \"n\" \ + \"-\" \ + \"\$hline\" + + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ + --hline "${hline}" \ + --nocancel --pause "${msg}" $height $width 5 + f_dialog_menutag_store -s "" + return $DIALOG_OK + ;; + *) + local desc status height width rows selected retval + hline="$hline_arrows_space_tab_enter" + + for _fw in ${fwlist}; do + desc="${_fw}" + f_shell_escape "$desc" desc + # install each firmware package by default. + check_list="$check_list + '$_fw' '$desc' 'on' + " + done + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --separate-output \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + retval=$? + f_dialog_menutag_store -s "$selected" + return $retval + ;; + esac +} + +# Initialize +f_dialog_title "$msg_freebsd_firmware_installation" +f_dialog_backtitle "$msg_freebsd_installer" + +# Gather the firmware files and present them to the user +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Nothing to install? +if [ "${selected}" == "" ]; then + exit 0 +fi + +f_mustberoot_init + +# pkg(8) needs name servers (unless we could use a local repo in the future). +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ + --infobox "Installing firmware. This may take a moment." 0 0 + +# Install each of the selected firmware packages +for fw in ${selected}; do + # We install one at a time in case one is not avail. + # pkg-install.8 needs an option to skip unavail. + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw} +done + +# end From nobody Thu Nov 21 00:46:46 2024 X-Original-To: dev-commits-src-branches@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 4Xv0124y4dz5dy8b; Thu, 21 Nov 2024 00:46:46 +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 4Xv01240lrz4K41; Thu, 21 Nov 2024 00:46:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150006; 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=sodQmHETNl67IZZoqkuIQICo5/JGKkKN3+ZkFbEVYCs=; b=NcmUIoeLAYFiop2Szt5bBh1cJkP15AP+qY878o2iup8URKJR0vDvn1PoSL0iZPfCUt66ly jSJGRPqKyWWQaNKHgVOyAzDJ5/XpQfHBmsQMv/Pl0/g2RVHz57/qodS2jnIla5RJBcP3uZ 6JA1DAkhPNZSXQALMthSXoBsJvg6YaVsMgNKHD0u8yam6b88BofCZDQlkhFSMHts986OYz u63Jrqh3FjI2JQ7HCiBQknF9So6U8qFhLhKp9LnkuGkOTi4LqYrzBrsFLLUGKRABxIl7e3 +xJfFYtB+88lPLVZGc35PEGacrZL4+Ylku3YyracTD80Y05yWpD38lzSiSQC3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150006; 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=sodQmHETNl67IZZoqkuIQICo5/JGKkKN3+ZkFbEVYCs=; b=XrxXNXPKDLuZn4fiOlk+NcJLzJ6SMIHSzvw/9zZ2+3gI53F+SZHrppex3Sn/aAGiK65VCS YCa2O+lGoQtLSGmyqqxUNfsLBbw0/vGZDYYbyefHhfJYBe5da+Gd+i7zPG62poPuh1UrJH wSHdy3ss5i9b500OlCpOeKx0sk2Fd/wtblKdR5XzpzdPIkLCuDB77YnZbGEQEM2Epi1BTa lFC8xLDQ/yyuoDT8DqrfFa5/kUzx4hPi1aL6TsJ1d9PWPOEaOJd6mYhJCN8cuc7dhSocPU PVbnEYW/Zs4jut3ZgdHcwRSjbnVjK0oawtdp1fUpoR6qstlqY3cyvbaTs8KtLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732150006; a=rsa-sha256; cv=none; b=OgENqxSOvKV5JSV0nrg7Us6RlPnWd8GUyjrb005IQeiVTLobHuSyhUNH7x4Crz+qqCmL1V CmZJ901rPsqlYjeaQQO1xeutOhRSxvopA3vRwk9YPQasAhdfZG8ujuq8xH/y9knQogeoBf XZgRAPiQmtLpaHg52HWJOdtjhABqyumkopYrAM14wZkKGo4P/TFDfizBX7oLegRUs9qXAl hOusbTru1heKpV1dEISiHD6qqsL7bjjRWeoqZwy/kiLunLazBsR5uxu+cbiVsbujXV0KXh MsGpnvg/m9Zf8ekfQd9QlLKlV2qNUguimiiz17ZfxGSiHPoJl08uhYUFaSObNg== 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 4Xv0123Bt9zH5D; Thu, 21 Nov 2024 00:46:46 +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 4AL0kkC3061818; Thu, 21 Nov 2024 00:46:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0kkka061815; Thu, 21 Nov 2024 00:46:46 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:46:46 GMT Message-Id: <202411210046.4AL0kkka061815@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 098ed26bf456 - stable/14 - libc: indicate existing functions that are POSIX 2024 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 098ed26bf4564362c4478b8c92b11ab9ca074da1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=098ed26bf4564362c4478b8c92b11ab9ca074da1 commit 098ed26bf4564362c4478b8c92b11ab9ca074da1 Author: Ed Maste AuthorDate: 2024-11-14 19:30:54 +0000 Commit: Ed Maste CommitDate: 2024-11-21 00:45:07 +0000 libc: indicate existing functions that are POSIX 2024 Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47581 (cherry picked from commit dfa0ac74c2fbc1cde3e8cdb1ab9fe5cbb90a9b16) --- lib/libc/stdio/mktemp.3 | 5 ++++- lib/libc/stdio/printf.3 | 6 ++++++ lib/libc/stdlib/getenv.3 | 3 ++- lib/libc/stdlib/reallocarray.3 | 4 ++++ lib/libc/string/memmem.3 | 6 +++--- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index cfb6f79be251..5b0547c89fcd 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -277,7 +277,10 @@ function is expected to conform to and is not specified by .St -p1003.1-2008 . The -.Fn mkostemp , +.Fn mkostemp +function conforms to +.St -p1003.1-2024 . +The .Fn mkstemps , .Fn mkostemps and diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index a7b0c7399e2e..af1dcf90b4f9 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -830,6 +830,12 @@ and .Fn vdprintf conform to .St -p1003.1-2008 . +The functions +.Fn asprintf +and +.Fn vasprintf +conform to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn asprintf diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index df5c1e59074a..bea6ca42699f 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -220,7 +220,8 @@ functions conforms to .St -p1003.1-2001 . The .Fn secure_getenv -function is expected to be glibc-compatible. +function conforms to +.St -p1003.1-2024 . .Sh HISTORY The functions .Fn setenv diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3 index d92be7d3f66b..80035c67a497 100644 --- a/lib/libc/stdlib/reallocarray.3 +++ b/lib/libc/stdlib/reallocarray.3 @@ -131,6 +131,10 @@ if ((newp = reallocarray(p, num, size)) == NULL) { .Ed .Sh SEE ALSO .Xr realloc 3 +.Sh STANDARDS +.Fn reallocarray +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn reallocarray diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index 5d8bcc84e31f..e301a0bd1e0f 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -67,10 +67,10 @@ is returned. .Xr memchr 3 , .Xr strchr 3 , .Xr strstr 3 -.Sh CONFORMING TO +.Sh STANDARDS .Fn memmem -started as a GNU extension but is now available in at least -the GNU, musl, bionic, OpenBSD, NetBSD, macOS, and illumos C runtime libraries. +conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn memmem From nobody Thu Nov 21 00:46:47 2024 X-Original-To: dev-commits-src-branches@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 4Xv0135bv4z5dyK7; Thu, 21 Nov 2024 00:46:47 +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 4Xv0134dCKz4K42; Thu, 21 Nov 2024 00:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150007; 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=lAZPKPbeMNl4RD03u6qbJYsbSzrajZTIZpiG+ieq/iQ=; b=r5lW3+iZdm6bR7O+Xy7MtrBSeTkyZktGz9+ebbPN3n/YVlVit6SqErVMrGpq/3RmPkuo5N qRG+YUp+4Es6Jda62vL6HwILyuUBKMJ9KwvnNTwSIZyyc7NCe/juoi0d+CYa+yqLXJ1b0B 637U4KaLQDUJeSx7sdIj/ruvQ/3FqIwZ1RJK04ygf5bVfnTcUs7H0GPir7mcO0G3UubDjU Cb1yaiTz/EipZeSsjWaRnCKaubKqmYNMbN83jzwVgFagLJmUH/+imLgxR0H/LNi8z9znzO wU+obyu+NBoM0knIeEx+BPk+58Uha428KLfqDyXi0H2WBpa2jBeEib+de5qYhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732150007; 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=lAZPKPbeMNl4RD03u6qbJYsbSzrajZTIZpiG+ieq/iQ=; b=glX291c6Is7kwqBoxscx584slVcE7RG3ubNduScsWewN9d6lGc2niKdL8gvaqKJM5f2ITo /PRz4JmMBEQrVMU1jgahlwwVcrIAjz/vmEWE58qdUF64J4gzNKAdmMDP17qJhn7fuqVSS3 ZsveGFcmPV6Mit0oYUdB2uGXOZ/8NwilmuxtOLwC1BbcmDM6ImVdgEWNBQOMcKo4hrTj0G XarAkQBgHRcOAJ6IYW2fifNZEr3Qnc/kTv6i+RwvpURx0Ts6vvTICXpjWdi2mx9gS8E6RC ZBZY5F1WTVuivJx86ppKU7CIWTk+xreNEtouFqVi+vmEmv8+II9hzkPi0zKC3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732150007; a=rsa-sha256; cv=none; b=UdF0MpnYCGwiFpH01Jf1a6F7I1YHRJ+OIfcVRlz6aRgCM2+HgRJ00NIYjK+q9XWmpS3dHi 76FxS89IZ51xIZgph2iUR8iIXN4DLXzW3E+uDMDG/cHy9Q7FMD5P0E69PO+gVF12YrySPZ 9eudNLKlA79Cy54DJTKnIqproeCmVV22XbmyytU/iNkHpTgFMEUbB5YzJ+ir+Iewms8nmu vg07Ku6JlGNGGVJJA06NvBH7BCb2iRnnT1Dvh82ecn3OxHPoCAkRsc8iDU7mNnHXVA+Tah twjXRpTaEoreAVv0EyKTb43+hOYHv3hu/ZveskikWpwqfLLf5t4yUO8IUNFLng== 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 4Xv0134DTWzHDS; Thu, 21 Nov 2024 00:46:47 +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 4AL0klhU061882; Thu, 21 Nov 2024 00:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL0klci061879; Thu, 21 Nov 2024 00:46:47 GMT (envelope-from git) Date: Thu, 21 Nov 2024 00:46:47 GMT Message-Id: <202411210046.4AL0klci061879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2e8ab3d4e9b9 - stable/14 - fork: Document _Fork (and fork) as POSIX 2024 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 commit 2e8ab3d4e9b98e648c086aee3685f1b5ba433d90 Author: Ed Maste AuthorDate: 2024-11-15 14:22:54 +0000 Commit: Ed Maste CommitDate: 2024-11-21 00:45:07 +0000 fork: Document _Fork (and fork) as POSIX 2024 Also remove some information from HISTORY that is no longer needed (and could be confusing), now that _Fork is part of a standard. Reported by: kib Reviewed by: imp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47588 (cherry picked from commit 566c039d1e7555343fcf6439a10e56f5a632c0fe) --- lib/libc/sys/fork.2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index a3af078b3d69..dcc3d4d017c1 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -252,18 +252,18 @@ There is insufficient swap space for the new process. .Xr vfork 2 , .Xr wait 2 , .Xr pthread_atfork 3 +.Sh STANDARDS +The +.Fn fork +and +.Fn _Fork +functions conform to +.St -p1003.1-2024 . .Sh HISTORY The .Fn fork function appeared in .At v1 . -.Pp -The -.Fn _Fork -function was defined by Austin Group together with the removal -of a requirement that the -.Fn fork -implementation must be async-signal safe. The .Fn _Fork function appeared in From nobody Thu Nov 21 05:52:08 2024 X-Original-To: dev-commits-src-branches@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 4Xv6nP02RKz5fHBY; Thu, 21 Nov 2024 05:52:09 +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 4Xv6nN6gKDz4qQq; Thu, 21 Nov 2024 05:52:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168328; 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=fes70WqxV2iIozuhm3KxoX/U/vx9SAMLGphPSdE9lWg=; b=TGgUBZ/TvBpcX2VzHPsOzGnzhQt05QUrqEqFcbxJIK5zAfRhrWRqK76+CINVqVtxLSL4oy iwucXaUWLrGJFtWk6ylp61hdfJ8uUlXCAfcem18+TDlcr+7fRRTyIsNISmGnVAOf1vHBHO qLe5MXP3WoQBNXfzij5RUOo9Tmmt2K3GEDYZtdhFPvcv4AU3npXp0TdPZIdNkGWeefIJ80 VssTOUoE/tKOSlWk27N/PA7ndGKyB+tcAh2TyhvqMuoVs+uaHEAK0Q/k6kgWddMxpFND/7 KrCzFiToW1dpg7megi9yeYN65J8kdY26tNCcVQ02KhTZhr2TiQHwaanmKpFh4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168328; 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=fes70WqxV2iIozuhm3KxoX/U/vx9SAMLGphPSdE9lWg=; b=hw+OBLW7MM8u2eJ3psZPE56hB9erJT62ASDKDuNJOGidIdJ/pQp8GnLpArtUmVAge+Wu51 69176CsXSM7eBwBYCuky3t1lh8uC1OMZxElA332LjtfXDgGmhcfO69W1bnF/osJFvBUPXE W50/mBhGOxzQS3eA2d6hPvnmhZWNd/Ovmc0LJbWB+5idBDmMR8wjQiIQH15fHPCJRWLENu 0jKBlWVjbb74v30BA+21qUktsidN43gNA/zx6ZLjq+mjIko6X7BphK6w2V8anH4ZhyfHeX 1BFKS6AGBlmQ2f9knOCJIM1eQN5RS/M7xIhLc0aFTE0r2nc6s6GrzdHbYRTaQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168328; a=rsa-sha256; cv=none; b=v3XAD2SrM6/NnIlao4xQDRhgC+Jt2dveKLLtvEZNdA6H+aOeaUdy1lZxLfvWXrMF7ggBZM QVK14FUQ9HUOuptWwIqnYrUhJnVbtPg7R9h4ycu0n8uolSLwkJ7jrXXugjEG2hFbXXaQ9E 2q0jS7StL6Be2/5LDQ7CqrBGnIugjQHBMcY7N9QiJXuvjdk/oOMRYKCS1kb+S3w13I7OnZ l5+eXqf1wwU55GyaDevU345iCa2hCKpgVLeYJIYn4gmZrIKTffVe8HYUocaqqZeRIIrb5r EyFdb9xzLEuek0Fs3SVDHTTY9lvSt/YmvCQ6/ziFuBFR3ZFy4zBQgdqCHck3WA== 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 4Xv6nN6H9mzR8C; Thu, 21 Nov 2024 05:52:08 +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 4AL5q8rt037120; Thu, 21 Nov 2024 05:52:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5q8VR037101; Thu, 21 Nov 2024 05:52:08 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:52:08 GMT Message-Id: <202411210552.4AL5q8VR037101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: c66d2795bdb5 - stable/14 - e1000: Improve igb(4) SFP support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c66d2795bdb5368045fd2f946038d5196b0f8817 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c66d2795bdb5368045fd2f946038d5196b0f8817 commit c66d2795bdb5368045fd2f946038d5196b0f8817 Author: Kevin Bowling AuthorDate: 2024-11-07 06:02:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:51:50 +0000 e1000: Improve igb(4) SFP support * Adds support for SFPs that are not correctly coded as an SFP transceiver. i.e. Coherent-Finisar FCLF8522P2BTL. * Configures multi-rate SFPs i.e. Coherent-Finisar FCLF8522P2BTL as SGMII so they can do 10/100/1000 auto-negotiation. * Adds support for 100BaseLX SGMII transceivers. * Some code cleanup and additional debugging. Reviewed by: emaste, markj, Franco Fichtner Tested by: Natalino Picone Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47337 (cherry picked from commit 15853a5fc9548d9805a2ef22f24e2eb580198341) --- sys/dev/e1000/e1000_82575.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c index a33aa9eb2903..47b8006314f8 100644 --- a/sys/dev/e1000/e1000_82575.c +++ b/sys/dev/e1000/e1000_82575.c @@ -1686,20 +1686,19 @@ static s32 e1000_get_media_type_82575(struct e1000_hw *hw) break; } - /* do not change link mode for 100BaseFX */ - if (dev_spec->eth_flags.e100_base_fx) - break; - /* change current link mode setting */ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK; - if (hw->phy.media_type == e1000_media_type_copper) + if (dev_spec->sgmii_active) ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII; else ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES; E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + break; + default: + DEBUGOUT("e1000_get_media_type_82575 unknown link type\n"); break; } @@ -1750,24 +1749,27 @@ static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw) /* Check if there is some SFP module plugged and powered */ if ((tranceiver_type == E1000_SFF_IDENTIFIER_SFP) || - (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) { + (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) dev_spec->module_plugged = true; - if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e100_base_fx) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e1000_base_t) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_copper; - } else { - hw->phy.media_type = e1000_media_type_unknown; - DEBUGOUT("PHY module has not been recognized\n"); - goto out; - } + else + DEBUGOUT("PHY module is not SFP/SFF %x\n", tranceiver_type); + + if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 1000_base_lxsx\n"); + } else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 100_base_fxlx\n"); + } else if (eth_flags->e1000_base_t) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_copper; + DEBUGOUT("PHY module is 1000_base_t\n"); } else { hw->phy.media_type = e1000_media_type_unknown; + DEBUGOUT("PHY module has not been recognized\n"); } + ret_val = E1000_SUCCESS; out: /* Restore I2C interface setting */ From nobody Thu Nov 21 05:52:39 2024 X-Original-To: dev-commits-src-branches@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 4Xv6nz5ksGz5fH6Y; Thu, 21 Nov 2024 05:52:39 +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 4Xv6nz50L6z4qVW; Thu, 21 Nov 2024 05:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168359; 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=B9GxUM1rX140xSvzVeujX1a+iY4eL0HVuTmqILBEF4Y=; b=Uclv1oe4MCu60sMWyI1DU+54X9tqqj5RTswiydoJ/jKu3HvnZ9pXG9YoWIU24r5T+DbrsK RhoH3bWpZWIDZaQn/dP2Yb2MLrpepPBaoGZZEwGjw2GX1unB4B+zTUZlUyU9Lfcy539q3l cZ4DPQd5r1vzkFxDqJKOoCwA+4Fi23yFGEV+/iqKqLU7GRLWoDQ6anOzOGljbB8IWvTAxv E3pL1sMb3QHlriBhIj/PUNPnNfPBfW74nkrJtzu1Ot+0YmlWM2yr+XoU1lTWNx8aIXLDs3 uzr7G4yWFjCxrLdrtXUxWPJxvCWTXUIYMVbIRa1bvyOhUEMmPXJq63upLy7Z+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168359; 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=B9GxUM1rX140xSvzVeujX1a+iY4eL0HVuTmqILBEF4Y=; b=A0+wJR0Ga8lUjI85FFgyywxk7Nun6PzsIgHlY4+6BWUdBA33fv65FfcdtWRO2KkoDNeE7q OJrNroXzoOmPPJzFVxB2La/+rSWOE86SNyvdKdDA/UXPVgqZgrXsn5ukKrVmrs+Hwv1tGf aeZXGXaiAd6wRGwzKBwYwKDL34/dTxh690Vmfm0uLhXF2qg1brdPEUEN0Bu6rWT3WdaeMi ew+fD8+bhZf4mfQ43aT9UP3OOYKWQebNuEgDgS51eoyKjUktHpkwA3NjyZaETNQvpQEkRR bCSXiAWIHPP5/dFCqUIoNQqIh7lfv4WVJ9gbo2JxlMdTuiaSV9KR94yEM8wUtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168359; a=rsa-sha256; cv=none; b=mtPVp/SQ0x4qkhfzLzQ3881nsCpyy0YTQKpJDsEmDbr1L7mVgQ6FAzHzVMoGXdr6FS29QL VMiNrDySGKEl4fqxqtyNpEe96I8CMW8HC/JmMTVaD4HQBtl3UdEN1aYLvY4TiQ/2P52Asv KKoqnL9z+dZ1r3rRJ8464+hmVKP/UZ87aWgV0mhAPi3Tl4fwNF+Q9HpZsff/h9LpynDSwU osuzckxFzPUPbdDgUBbR9H/UOLmhCYCUtSYP4k/rBD65nD5mWm5kqmQK3N+FDxq4L1U46r vzoZPSHtiAZjsj0uYKxpnSvFj8rb8OjJbjw0JEpqVfF3ZcGnB0jhyGQ++TfAPA== 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 4Xv6nz4bnszRjS; Thu, 21 Nov 2024 05:52:39 +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 4AL5qdgx038153; Thu, 21 Nov 2024 05:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5qdf1038150; Thu, 21 Nov 2024 05:52:39 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:52:39 GMT Message-Id: <202411210552.4AL5qdf1038150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cf6a8711e437 - stable/13 - e1000: Improve igb(4) SFP support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf6a8711e437c69da5e2d34d27862a3f8beff892 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cf6a8711e437c69da5e2d34d27862a3f8beff892 commit cf6a8711e437c69da5e2d34d27862a3f8beff892 Author: Kevin Bowling AuthorDate: 2024-11-07 06:02:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:52:27 +0000 e1000: Improve igb(4) SFP support * Adds support for SFPs that are not correctly coded as an SFP transceiver. i.e. Coherent-Finisar FCLF8522P2BTL. * Configures multi-rate SFPs i.e. Coherent-Finisar FCLF8522P2BTL as SGMII so they can do 10/100/1000 auto-negotiation. * Adds support for 100BaseLX SGMII transceivers. * Some code cleanup and additional debugging. Reviewed by: emaste, markj, Franco Fichtner Tested by: Natalino Picone Sponsored by: Nozomi Networks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47337 (cherry picked from commit 15853a5fc9548d9805a2ef22f24e2eb580198341) --- sys/dev/e1000/e1000_82575.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/sys/dev/e1000/e1000_82575.c b/sys/dev/e1000/e1000_82575.c index a33aa9eb2903..47b8006314f8 100644 --- a/sys/dev/e1000/e1000_82575.c +++ b/sys/dev/e1000/e1000_82575.c @@ -1686,20 +1686,19 @@ static s32 e1000_get_media_type_82575(struct e1000_hw *hw) break; } - /* do not change link mode for 100BaseFX */ - if (dev_spec->eth_flags.e100_base_fx) - break; - /* change current link mode setting */ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK; - if (hw->phy.media_type == e1000_media_type_copper) + if (dev_spec->sgmii_active) ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII; else ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES; E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext); + break; + default: + DEBUGOUT("e1000_get_media_type_82575 unknown link type\n"); break; } @@ -1750,24 +1749,27 @@ static s32 e1000_set_sfp_media_type_82575(struct e1000_hw *hw) /* Check if there is some SFP module plugged and powered */ if ((tranceiver_type == E1000_SFF_IDENTIFIER_SFP) || - (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) { + (tranceiver_type == E1000_SFF_IDENTIFIER_SFF)) dev_spec->module_plugged = true; - if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e100_base_fx) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_internal_serdes; - } else if (eth_flags->e1000_base_t) { - dev_spec->sgmii_active = true; - hw->phy.media_type = e1000_media_type_copper; - } else { - hw->phy.media_type = e1000_media_type_unknown; - DEBUGOUT("PHY module has not been recognized\n"); - goto out; - } + else + DEBUGOUT("PHY module is not SFP/SFF %x\n", tranceiver_type); + + if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 1000_base_lxsx\n"); + } else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_internal_serdes; + DEBUGOUT("PHY module is 100_base_fxlx\n"); + } else if (eth_flags->e1000_base_t) { + dev_spec->sgmii_active = true; + hw->phy.media_type = e1000_media_type_copper; + DEBUGOUT("PHY module is 1000_base_t\n"); } else { hw->phy.media_type = e1000_media_type_unknown; + DEBUGOUT("PHY module has not been recognized\n"); } + ret_val = E1000_SUCCESS; out: /* Restore I2C interface setting */ From nobody Thu Nov 21 05:53:25 2024 X-Original-To: dev-commits-src-branches@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 4Xv6ps5rGRz5fGys; Thu, 21 Nov 2024 05:53:25 +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 4Xv6ps5HXhz4qyc; Thu, 21 Nov 2024 05:53:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168405; 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=JEza1AwwDnixsKXzYIzcnO9DmB+C8ImLX9FBuPbnFjA=; b=RLK7w2xoFxvwP5xKz67jCj1PA+XvlrDc51Z+o+9TIk1ydjGGY3wWrFcmCOOgUQcuGvtjGm WsveIQLkDK15FgpJ6AsvU0xOtd2YaCoo7zHqcAS3TrRS13qg4y9+fsvoTThtB25SIIdBzx ZEhIZvUjMYzzgk6K3HpT89WPF7W3H6PfAhatqgZVPV4jHnI0Lezn0I5KTixGDIF/JD2zL/ ejnccX7b7m7UYbFFLwZtb881bYXIrb4km5KbxwjNzcp/df1h+50v6matoQby7yPEyLi0cU PQ5LZ6TaMh+/tkxawt/nDlamzcMcMKAPr0H1Js21jP/64okiV+DbPFy0zersKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168405; 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=JEza1AwwDnixsKXzYIzcnO9DmB+C8ImLX9FBuPbnFjA=; b=KgT4rPpilK7/stTNY6i+CjYKF0dtLOy6ZrdPJ4Y79tsl/lxwfqG5fga4sOYpRXcp/mdg9n adrQPOaHOOpIRVrrYu7SnxAw8oCgGcO/9sRnZVz2MlrPTV1rk36gVCs+54qECQ/0HsnwU1 bLw4yI2Ka9SPAd0mloY8ZqWEXig57fJAwFCDt+K7c6NkQ/BqziWeSSVczsK3qQ61XdCMLL J6BB3AgUipGIWaQne2nd+bfy5XuJkUR6vjXyJxBAgF0iSOn1uGFlS03TslaEq/B7aD1qZ3 9IqnNHZtUqbLau8D+TKi4SroQjAnZpZKlS8lYEYzChcpUSP9DymugGaTjHtmkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168405; a=rsa-sha256; cv=none; b=Oi2vkjnANdKGZjyjIwh5BuH70N0CTok4qvmCU4w5c9kfcmOjgavBlwpGEUfhJZRQAtlRHi 1jAJ25Ts4knwNy/qSS+YYb9badlM7Oc9araCR9y1VYAHXE2yf9yvmAUXzob0rHhcpu+qoV vpESzJn0tUIjOkOqdLZebBYpSpzKCSyEkhgax1HRB2T7YCv4/mnr6Fjch+12U9KLhbIL4o rIn8yn9isHK4fV7xd0nop4U8ZEAenhHftcXEpO/P/SlQp6OH6C+ShtdxDPAEJczdUcOFP1 pNMFQYfBtPs+5KzQ0K0+daJWm5HhfTj6u1nB5y3no77eUEo8v8V7wZbWuJFzWg== 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 4Xv6ps4XhzzRg8; Thu, 21 Nov 2024 05:53:25 +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 4AL5rP0I038489; Thu, 21 Nov 2024 05:53:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5rPsS038486; Thu, 21 Nov 2024 05:53:25 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:53:25 GMT Message-Id: <202411210553.4AL5rPsS038486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 4de746ee9852 - stable/14 - ixgbe: Add support for 1Gbit DAC links List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4de746ee98528fb29763cbef72b50c7d2d822b32 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=4de746ee98528fb29763cbef72b50c7d2d822b32 commit 4de746ee98528fb29763cbef72b50c7d2d822b32 Author: Kevin Bowling AuthorDate: 2024-11-14 06:33:28 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:53:15 +0000 ixgbe: Add support for 1Gbit DAC links This is a relatively well known trick for the X520 (82599), can be useful for testing and lab settings. It's not an official standard or particularly common but ubiquitous Broadcom switch ASICs deal with it. We'll call it 1000Base-KX because it's SerDes on the passive cable and I don't think it's worth adding another media type for this. Reviewed by: emaste Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47352 (cherry picked from commit 48ddd1b9f88753c6875566fbb67bc622453e4993) --- sys/dev/ixgbe/if_ix.c | 7 ++++++- sys/dev/ixgbe/ixgbe_82599.c | 11 +++++++++++ sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 80f288a4ccf0..f8a620295aa4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1315,9 +1315,11 @@ ixgbe_add_media_types(if_ctx_t ctx) } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || - layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) + layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL); + ifmedia_add(sc->media, IFM_ETHER | IFM_1000_KX, 0, NULL); + } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_LR, 0, NULL); @@ -2323,6 +2325,9 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_TWINAX | IFM_FDX; break; + case IXGBE_LINK_SPEED_1GB_FULL: + ifmr->ifm_active |= IFM_1000_KX | IFM_FDX; + break; } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) switch (sc->link_speed) { diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 1ecab83a4e92..b2b40371648b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -441,6 +441,17 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, goto out; } + if (hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core1) { + *speed = IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = true; + + if (hw->phy.multispeed_fiber) + *speed |= IXGBE_LINK_SPEED_1GB_FULL; + + goto out; + } + /* * Determine link capabilities based on the stored value of AUTOC, * which represents EEPROM defaults. If AUTOC value has not diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index da7d16a514d0..218a9dac3b78 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1436,7 +1436,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && - (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE))) + (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Thu Nov 21 05:53:54 2024 X-Original-To: dev-commits-src-branches@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 4Xv6qQ5BW3z5fHR7; Thu, 21 Nov 2024 05:53:54 +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 4Xv6qQ2Wykz4r7T; Thu, 21 Nov 2024 05:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168434; 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=4sOlLNiTLO/vT5rICOVIaqjvXbgu+Zyk7xbVgTLiID4=; b=hzm4x7MjmCwYaHBbnO9+kS9UvxuyHBRj/3XF9VWX2AxeBvk8qNmWb/0ZjwTRHHZFmZJtNf ZDt7PJsXHm8DglgO0r0yIgBiHnXNBs/YOoN9SzxwSUARif/6ilOEQla5/RliR9WOmKP9tQ nu5vyXClJLYT3o/ymDvGTvWDhKHMfNgtPAwF8w0x7FKBbDEh09m7csfpSyDabVbstGEdmk NZiRV7yJ9wKfwF8gYLjlfgBYngJYbFUIQ9AjCEK1YYLv7YAodiUtAyhchckYn6KDSPh6ZP eZLt5VbxiNW8jc/6fcyvE93U5Pd4MBKktAbbBmTPFQzrIRbaiqskQr7yypZaIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732168434; 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=4sOlLNiTLO/vT5rICOVIaqjvXbgu+Zyk7xbVgTLiID4=; b=nw2QFxtejh2DO3zD0U5mJcne9iZS+f2qrXxuR8PkpDPSVS5dBq09ay2+vOmiEYqxf0kRCa +DfxtR8+dzIGMlgoWrjpn58Achn12EMx5Cxrfwl9O9V8TlKGSfeA2q5DOd4WqSbnhieFeR DtYQ31g58NtU8bq966BWsMU6IbGJ1gzX2gXt8YEWndtICpkJbAO6LcMQ2OKRV9x2KR2QgJ ZUd/FgxPzXRZEZ+Gk5y6aMDXjnbb0Te6ofv4HFwiWL2VIWfiXh6OAEmV/mHURCFKBg3k3/ TMIdwWOtOfqkjGTFlpu6ZGrn93ajf3VylcmlkO9UtoIHVpW1Y/lhw9lwnwGyPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732168434; a=rsa-sha256; cv=none; b=k+nOpU9vjcyp9+GYWLDNbykw6YDrGrOXuOiUoKsgfOVz2/k3UD41NE0GJS7mMTnElYBTOn 50gm3/Vc0Kso3Mch5scWvwc2Vp2PAQVzYpOMhP1Yzw2xD2hbFZVWwRwKbuJmHqGpMgktwb joGwY44ZzEceABPeF+EdVVnnkMskYj4ik3FVXC5/STRFGqE8vajU95h/T3SunzX+OZ1wJ3 0oRYdIrY62+ynCGBZCj0WCVYyXpgDjy7QHTrh42M2iz+R+zRfe2E8GYwROuPM5ri0u8iyH +EjNxtAgqLYzxN6XwF0yJ6zd/2lPIV4yOstNdz19NlcWJZqJ4e6CGEHDkYoFiw== 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 4Xv6qQ27dvzRf2; Thu, 21 Nov 2024 05:53:54 +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 4AL5rsxf038830; Thu, 21 Nov 2024 05:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL5rsM6038827; Thu, 21 Nov 2024 05:53:54 GMT (envelope-from git) Date: Thu, 21 Nov 2024 05:53:54 GMT Message-Id: <202411210553.4AL5rsM6038827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f6a3934d63fd - stable/13 - ixgbe: Add support for 1Gbit DAC links List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6a3934d63fd1439f363d5a733a0fa71525c6e7d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f6a3934d63fd1439f363d5a733a0fa71525c6e7d commit f6a3934d63fd1439f363d5a733a0fa71525c6e7d Author: Kevin Bowling AuthorDate: 2024-11-14 06:33:28 +0000 Commit: Kevin Bowling CommitDate: 2024-11-21 05:53:37 +0000 ixgbe: Add support for 1Gbit DAC links This is a relatively well known trick for the X520 (82599), can be useful for testing and lab settings. It's not an official standard or particularly common but ubiquitous Broadcom switch ASICs deal with it. We'll call it 1000Base-KX because it's SerDes on the passive cable and I don't think it's worth adding another media type for this. Reviewed by: emaste Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D47352 (cherry picked from commit 48ddd1b9f88753c6875566fbb67bc622453e4993) --- sys/dev/ixgbe/if_ix.c | 7 ++++++- sys/dev/ixgbe/ixgbe_82599.c | 11 +++++++++++ sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 23e378ba70c6..8ddb0315f254 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1316,9 +1316,11 @@ ixgbe_add_media_types(if_ctx_t ctx) } if (layer & IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU || - layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) + layer & IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_TWINAX, 0, NULL); + ifmedia_add(sc->media, IFM_ETHER | IFM_1000_KX, 0, NULL); + } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) { ifmedia_add(sc->media, IFM_ETHER | IFM_10G_LR, 0, NULL); @@ -2310,6 +2312,9 @@ ixgbe_if_media_status(if_ctx_t ctx, struct ifmediareq * ifmr) case IXGBE_LINK_SPEED_10GB_FULL: ifmr->ifm_active |= IFM_10G_TWINAX | IFM_FDX; break; + case IXGBE_LINK_SPEED_1GB_FULL: + ifmr->ifm_active |= IFM_1000_KX | IFM_FDX; + break; } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_LR) switch (sc->link_speed) { diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 1ecab83a4e92..b2b40371648b 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -441,6 +441,17 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, goto out; } + if (hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core0 || + hw->phy.sfp_type == ixgbe_sfp_type_da_cu_core1) { + *speed = IXGBE_LINK_SPEED_10GB_FULL; + *autoneg = true; + + if (hw->phy.multispeed_fiber) + *speed |= IXGBE_LINK_SPEED_1GB_FULL; + + goto out; + } + /* * Determine link capabilities based on the stored value of AUTOC, * which represents EEPROM defaults. If AUTOC value has not diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index da7d16a514d0..218a9dac3b78 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1436,7 +1436,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && - (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE))) + (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Thu Nov 21 06:08:01 2024 X-Original-To: dev-commits-src-branches@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 4Xv77j2zNxz5fHWR; Thu, 21 Nov 2024 06:08: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 4Xv77j2Tlkz4sC9; Thu, 21 Nov 2024 06:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169281; 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=lW7bIRrFEDeP2XKwLjuI3tLheMSx9kJUXPp9YWiyo/s=; b=ZikVMIh6kJcmM0VhC+ixsFJkAsQGTgMHW4NsTT7a6G3GVKrg6hehREtVsPZobQNwRXozRM IWOfUuZl9qVUu/QVI6V7GwahD1tv1101GqYl3TDHoZuMAyfqDmOf5fvU4t5mcfj+Z87Fxj cS23wTgDSH19JI3tvkU7EQJ3Xs268Qys0/qEOZ0YxK7YnARfD+mQBB+BhAr7oHoGOjgCgM bYd1KVHuwm1acPknXJnC2S1O8Iwk1RqG+sua9+MvEYrLlj/S2CWdz6iyCjUPc8JEM6hftS Y+bVPqXQGAVdRs3UYGinmEUwKmDg8VKJTu9rXDWpNOCP+rHebY4HgPguOD+5vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169281; 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=lW7bIRrFEDeP2XKwLjuI3tLheMSx9kJUXPp9YWiyo/s=; b=aB7/75KWLHsvkm+XFHQyfXpH289TogCbwcOJNhNsBMUDFs7vz2Mwcbgvj+mi4Kg4ch9M0L w39H0jbDDMSZHUBYkTYlG6jE9hi1aN2c5iaL7qFFKt4+P1MoDz1/KbeGy9Hqr6869XPSAK d2PQ39cLPGj8mUx663y5VP8XRNtnQ8CLKIlNagiu28qxx3mxdzDDSYIaWRKK/rteiplITe 5qB6CjzoVnuucIgIcN5L30/xa9aGLIfN15aEyOSG/fgDR46KL/lbJvZOARqzpWH2q17EkR sLQ0yVF45fJktHEtkUgq/JlgXwqLjUZt87mf8xQh6nTUHkQ9lJ9P4TaKUkKwCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732169281; a=rsa-sha256; cv=none; b=LsQRTSRXCfbvAEC8sbX/boK6AZJPxec5wPuG9CtnQEa0kdJe+h+wo3/mo3kUKheF9tSzwd rkzcCXZIUnNlGMBANjIrWcrkiPuxQqXy8GPb51nyzfC1TMhNfCEPxV3rXqaqh3ceRcJ1be BF4CB2uYaZwyf+hgEkPM2go5acI5wcgBRJhhY+AvKhlCcOam8F/EshSBYeRXpsiyBGPzam hfe26V++XMkWUHDaoeIf9SdDYMnAFFQ3rEkIAwqalsx+JF03nSSOqbFx0M9/UNSffZZpxO D+itOG0VclPmAhAT3D2yRHuvuIji8LOv9un33PH7RKzt/RV727mbLQOYMRXEwQ== 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 4Xv77j24jKzRCM; Thu, 21 Nov 2024 06:08:01 +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 4AL681hZ059715; Thu, 21 Nov 2024 06:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL681Jk059712; Thu, 21 Nov 2024 06:08:01 GMT (envelope-from git) Date: Thu, 21 Nov 2024 06:08:01 GMT Message-Id: <202411210608.4AL681Jk059712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 60ec1704493a - stable/14 - release: Remove empty suffix from file names List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 60ec1704493ac92de9cb997c27d04ac199aa6ab0 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=60ec1704493ac92de9cb997c27d04ac199aa6ab0 commit 60ec1704493ac92de9cb997c27d04ac199aa6ab0 Author: Colin Percival AuthorDate: 2024-11-18 00:06:17 +0000 Commit: Colin Percival CommitDate: 2024-11-21 06:07:50 +0000 release: Remove empty suffix from file names For "release" builds (as opposed to "snapshot" builds -- in this context BETAs and RCs are "releases") ${SNAP_SUFFIX} is empty; but it stuck into some ociimages filenames via a copy-and-paste error. The final filenames on the download mirrors were not affected, so this does not need to be merged to releng/14.2. MFC after: 3 days Sponsored by: Amazon (cherry picked from commit d54fdd16636bbe6a38a5b0a636dd83cf64aa6e06) --- release/Makefile.mirrors | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 8af614d9a9bb..7e25d69588bd 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -380,8 +380,8 @@ oci-images-stage: . endfor . for CHECKSUM in ${CHECKSUM_FILES} cd ${RELEASEDIR}/ociimages && \ - ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} - cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${CHECKSUM:tl} ${OSRELEASE}* > CHECKSUM.${CHECKSUM} + cp -p ${RELEASEDIR}/ociimages/CHECKSUM.${CHECKSUM} \ ${OCI_DIR}/Latest/CHECKSUM.${CHECKSUM} . endfor .endif From nobody Thu Nov 21 06:13:54 2024 X-Original-To: dev-commits-src-branches@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 4Xv7GV6zlmz5fJ0q; Thu, 21 Nov 2024 06:13:54 +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 4Xv7GV5y6fz4spk; Thu, 21 Nov 2024 06:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169634; 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=JCrtbekWNX8JgvbSsmiDIG1QxemjWyuG9cgou76dW5Q=; b=VTSxqNvhpPNIvy/iQsUyIcGgFpk7JrcVhBH50T9O5L8ADf6FPF5EzXEO1UH7kYQbp+OVtN cT3lzbvWSWjBYetP5gPPlyycIuW2rWs4eURdweALKLP4LTBEAC22uJxmjBnjBRw17OaZjA rsMTs7+zSVnBf/cleu1H/0/dsw90liXsVFER2N3whMxvXSNT7ub8M6PTv/W+QfrIYpkfJO Tt/QOSWb4w5ujIdOsOewXdavK+kmDmJb49XurQwHl06bYHSByfbxQqU1I3rR3qTpNrbi5j XPcFozcWS8maTTcaXfqr/LXcpkeBQ8Th00FOuMGZ/vG/5xH6MyYxpAKtLLYFTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732169634; 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=JCrtbekWNX8JgvbSsmiDIG1QxemjWyuG9cgou76dW5Q=; b=oMN0UvzeekynrJ22pNvfzR5grGK6lWMaYwTeJRlrnk+M3kjpVLYk2GlZNYYP+F+gZXhdHS ghMASkqSnGqNr9PoS2a8E6MPP+ncIHOcj8T2wQSJoX6RwrJ7Q4pWTIvyHTXlmfRDr+1XVt rQxBzB2aEkvXROtYwSgTjifFuLYOwd+gTcmvYA1WbLreTH4WLGrW43BU7rd0ziU951C0Cy A4A3EAtq87XBSnBGwht7+VA0xHWeDk62XWgzsbq0pvjXufKgJNEm/tble19f/u6fCttU7k ym9Mik2r4XLEkztlNkqTb+sS9Wtv82LcKIU6iJGttTFqniLpzuvvdOvkFI5iHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732169634; a=rsa-sha256; cv=none; b=QaXDbZStOHxqXw1ylj6jf41QvDNc03fTwODTsjeqlS6wjdq+Zz81uWU6tjLmD8dnzsMl1l RiGSIn9WnbYSdZ6XOuVRM2Ff40MJL61OClSTutU4JCQaRurQDaSdjv5u9Cq7nYk5qSUH3v C8WZPbPcnujrTeVyxvI0fcx6v6HryUcRKt6U+K3v0F+Vqv9nwW2OyZpP3R2UjqMDZawhON bYYUsUOyKFmQvL6Q9pEhrEyiPe3LtYpswVvsiuiDjGIiT5Xi4xwDO83cFxl7catp76/ze8 H4SI3kilbKClfLCjDuFka2XZZpdg3N/xVwdgA/+7gKxyoYa8oYeuFG8ER212LA== 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 4Xv7GV5Z5bzS9L; Thu, 21 Nov 2024 06:13:54 +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 4AL6Ds0n076967; Thu, 21 Nov 2024 06:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AL6DsUf076964; Thu, 21 Nov 2024 06:13:54 GMT (envelope-from git) Date: Thu, 21 Nov 2024 06:13:54 GMT Message-Id: <202411210613.4AL6DsUf076964@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 9431091ee021 - stable/14 - release: Don't break if firmware install fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9431091ee021eca9eb4c768b566e623ba9333b41 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9431091ee021eca9eb4c768b566e623ba9333b41 commit 9431091ee021eca9eb4c768b566e623ba9333b41 Author: Colin Percival AuthorDate: 2024-11-21 06:10:28 +0000 Commit: Colin Percival CommitDate: 2024-11-21 06:13:44 +0000 release: Don't break if firmware install fails On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") MFC after: 1 minute (cherry picked from commit e8263ace39c8ecf11233c0a10d0b1839e6813046) --- release/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index c5970b184b96..152c2edfcf06 100644 --- a/release/Makefile +++ b/release/Makefile @@ -199,7 +199,7 @@ disc1: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -273,7 +273,7 @@ dvd: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf From nobody Thu Nov 21 23:26:25 2024 X-Original-To: dev-commits-src-branches@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 4XvZ9s34CGz5dl9X; Thu, 21 Nov 2024 23:26:25 +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 4XvZ9s2XX9z4RCl; Thu, 21 Nov 2024 23:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231585; 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=QQSlfAPaL2EMqt2F5FqeiL8ZBJpuFQ9nj/Pp5ryjz14=; b=LlpPQVsiRvM8WLG98yEl767VmNfhcX5EqvfaJ1vv6k9kN666S/epgPeidy/IxtqFKv5qc2 o/vC0OY980B8UP4eyL6uqcUao1jgsNEnHn7IsxU3yB3IXDZxtDcciJISk/7Jvq2CWZ+5mU M1n4BBLvUgSHAAoMd9mA8dv0sNqyyG7IeWjKyzdCDp526yC5UFVKBgnE8m0nW8bYVWHmq/ MyWuIq0XyhZvwzDjGz7B+GEFhiNj+eRYefdbw6+I1KQ+yMk/yM7QliCXWp69kqC2S4Q0/f RCYZvNjvC65Y5yxocKMBlIH9lpvxwBSgu6+Q7bN0S1cqM6raFkuqYwzgKM4dYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231585; 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=QQSlfAPaL2EMqt2F5FqeiL8ZBJpuFQ9nj/Pp5ryjz14=; b=YvDPpBhKMGPt6eykgO82QreEOcgWPI2keU54nNUsp/ex4ToxlqoLv4SKV/hDm4KGyjLGkx hBAKvj2Pd8gg6NhOyVL30pFTWJ+AJv6DxLJTMSkBaeyMai3xM4pf3KWW/WuMvNL6RKxKGk dV5i0ETmsw3dtybfvxogQs/Mz+cyXHOVNSmPlGIMolGw1OSJdSohvxOe2YUJ8GT1Hhwwj4 2PUlPzxX0LvSdf1QeW5XRCO1BHOeQnZyNdmWxJkaDMVaGuoYzFuytCOoXgvtrOPDSUotaE 4Qan2Hp2LGtoN+e+szqaWqIN9+nJoNnICi62q1RBvVRlKk87IqYxDcqxROUV8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231585; a=rsa-sha256; cv=none; b=H/MAo+LuPv2QvQJgayH04DD8IoIKhoAoCgzlSh1/CzCsCQcnjMTxtc0bphhH0vyitbIsb1 LKfrF1CGEM4n2XF7mTDEyF1tOEXOgfr3A8p9ZZ+kt7J3blv11hJ6978THNDfMdpZxcvknW r41TjP+mMEerW3Ah/kKVVRsydbUybhDy34ide1OIO8JyVN+bDMO3dUpPOVuJT+AqJgm1GW KcVQ/92NfPfu4FuilnNQy9wrAZbjH1xUCKA5CPVhA62RLyhas9trdDGSmC/gYMK/xWYtKy j+y3hzhf0aGtSA0/0oyjT5qr4D3hUzXStnQ37trtTKtbMeNbQU9HfWFs9wxiwQ== 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 4XvZ9s23f5z10lr; Thu, 21 Nov 2024 23:26:25 +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 4ALNQPrG021298; Thu, 21 Nov 2024 23:26:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQPVm021295; Thu, 21 Nov 2024 23:26:25 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:25 GMT Message-Id: <202411212326.4ALNQPVm021295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 03c07bdc8b31 - releng/14.2 - bsdinstall: add menu to install firmware List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 03c07bdc8b31c97882e47b376cc48bfaa747c5cb Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=03c07bdc8b31c97882e47b376cc48bfaa747c5cb commit 03c07bdc8b31c97882e47b376cc48bfaa747c5cb Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:41 +0000 bsdinstall: add menu to install firmware Add a menu to the installer to run fwget(8) inside the newly installed system to install firmware known to be needed. This requires working netowrking. This is needed at least for wireless currently for when we entirely stop shipping new firmware in src.git to have working networking on the installed system (we already do need this for at least rtw89). Sponsored by: The FreeBSD Foundation Tested with: 4 different iwlwifi chipsets in a system (earlier version) Suggested improvments by: jrtc27 Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit bbe2a1da2df639c616869aa838244c8094779bd4) (cherry picked from commit 15f6edf20e4e1542f2385a9cbd6e996e23252858) --- usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++- usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/firmware | 125 +++++++++++++++++++++++++++++++++++ 4 files changed, 145 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index c8bf143322ae..50c8948a7989 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,6 +1,10 @@ .\"- .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Björn Zeeb +.\" under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 18, 2023 +.Dd November 4, 2024 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -240,6 +244,12 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . +.It Cm firmware +executes +.Xr fwget 8 +inside the +.Ev BSDINSTALL_CHROOT +to install any needed and available firmware for the new system. .It Cm rootpass Interactively invokes .Xr passwd 1 @@ -323,6 +333,13 @@ Default: Path to a log file for the installation. Default: .Dq Pa $TMPDIR/bsdinstall_log +.It Ev BSDINSTALL_SKIP_FIRMWARE +If not empty, the +.Cm auto +target +will not invoke the +.Cm firmware +target. .It Ev BSDINSTALL_SKIP_HARDENING If not empty, the .Cm auto diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 2d226f418783..cbe190d85f12 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -7,6 +7,7 @@ SCRIPTS=auto \ docsinstall \ entropy \ fetchmissingdists \ + firmware \ hardening \ hostname \ jail \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index fd5b634696ae..6a89b3dfdd81 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -364,6 +364,7 @@ fi [ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time [ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services [ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening +[ -z "$BSDINSTALL_SKIP_FIRMWARE" ] && bsdinstall firmware [ -z "$BSDINSTALL_SKIP_USERS" ] && dialog --backtitle "$OSNAME Installer" \ --title "Add User Accounts" --yesno \ diff --git a/usr.sbin/bsdinstall/scripts/firmware b/usr.sbin/bsdinstall/scripts/firmware new file mode 100644 index 000000000000..a563f0e578e4 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/firmware @@ -0,0 +1,125 @@ +#!/bin/sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr + +msg_freebsd_firmware_installation="$OSNAME Firmware Installation" +msg_freebsd_installer="$OSNAME Installer" +msg_firmware_menu_text="This menu allows you to install firmware packages for your system" +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +hline_ok="Press OK to continue" + +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_firmware_menu_text" + local hline + local check_list= # Empty; filled below + local fwlist _fw + + fwlist=`chroot $BSDINSTALL_CHROOT fwget -q -n` + case "${fwlist}" in + "") # No firmware to install + # Print a dialog with OK and a 3 line timeout bar. + local height width rows msg + + msg="No firmware to install, continuing..." + hline="$hline_ok" + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$msg\" \ + \"-\" \ + \"n\" \ + \"-\" \ + \"\$hline\" + + ${DIALOG} --title "${title}" --backtitle "${btitle}" \ + --hline "${hline}" \ + --nocancel --pause "${msg}" $height $width 5 + f_dialog_menutag_store -s "" + return $DIALOG_OK + ;; + *) + local desc status height width rows selected retval + hline="$hline_arrows_space_tab_enter" + + for _fw in ${fwlist}; do + desc="${_fw}" + f_shell_escape "$desc" desc + # install each firmware package by default. + check_list="$check_list + '$_fw' '$desc' 'on' + " + done + + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --separate-output \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + retval=$? + f_dialog_menutag_store -s "$selected" + return $retval + ;; + esac +} + +# Initialize +f_dialog_title "$msg_freebsd_firmware_installation" +f_dialog_backtitle "$msg_freebsd_installer" + +# Gather the firmware files and present them to the user +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Nothing to install? +if [ "${selected}" == "" ]; then + exit 0 +fi + +f_mustberoot_init + +# pkg(8) needs name servers (unless we could use a local repo in the future). +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +${DIALOG} --title "$DIALOG_TITLE" --backtitle "$DIALOG_BACKTITLE" \ + --infobox "Installing firmware. This may take a moment." 0 0 + +# Install each of the selected firmware packages +for fw in ${selected}; do + # We install one at a time in case one is not avail. + # pkg-install.8 needs an option to skip unavail. + ASSUME_ALWAYS_YES=YES chroot $BSDINSTALL_CHROOT pkg install -qy ${fw} +done + +# end From nobody Thu Nov 21 23:26:26 2024 X-Original-To: dev-commits-src-branches@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 4XvZ9t4LmXz5dkjB; Thu, 21 Nov 2024 23:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvZ9t3TLRz4RFh; Thu, 21 Nov 2024 23:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231586; 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=vFxnqI/gBe3J7kbFlSn7fQrn6HxNwJYIBlCOROToqC4=; b=XPXOLE0U+uZ3yciQjieWe69UInPcztChN8uLsu0GqiyLrCRbjNShqr+JOfNSPcZXm09Pw3 hVFOKlTPIWZyALFfFAC2Jf1dDqeMcGdWSqOlWFmOBRTT91I0rNAQLOUxU1Uuls+LRV1yn7 VlhNADqqD/oTF1FJUFqoZcjeR9MesHLP+uIvVMPFS82QKMKPKmmK1sYBAAms7xMik2fdUv 4E8dR6Hakq3vkYPMwcka4Aizowh403J3j2UD1NEplTd0GWcZYMTZco+UO4QDNM7X1jX/BL LrPsf6GXv3nulb0oX4N/KcFNe9S7AfKvL64UP2g2gP+YBj7rzVhaXeVXNLodlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231586; 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=vFxnqI/gBe3J7kbFlSn7fQrn6HxNwJYIBlCOROToqC4=; b=v70CmOsEsSdK966pbvXmjkg7J5FK9BSmqi9ZUvn8jwzwZ37AtCu9o8HklCfouCpjiE8BIO U5ShriNBDzA05cbpWCggsRCQpXk55ESGUwLyKd5P8dlcghjnso9gB88VLNi7fFsLJjdQU4 lXLLTQw9KkNJacGPK1hpSCEtCfuonW/Ay4n0qDVd0gdKcI/UlN4jkx0rheo5IDhGuQXvB5 VPIPNMY9C69/wUBh5cgg1DYSKyLadXLSPRB/Vy5ghDXl/2YdRbqvFWome+f7gQoJdH7LPN fjdCqADH4KekJV74fx7VyPK/P7FbSzRVH86JPBUkU707zJwqzlwROaAPOd7LbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231586; a=rsa-sha256; cv=none; b=YWclNh7Bg+1zx4NNv2KvRyldtLLDDlvBFSWpEyakZWl+3W6PiFoxzXGF2gbNZMQOnUE0ik M709jTrIS9zTfYLDtu0rHBMjPNdNiy3I3LID3nEr7x17TyH132RUzKErOtzAAz9rNiMwHu /W3vMktELBHSjSegOmUjmDoRezEI4HkoP4DoTwrf6sxr7C67biEvYSeAgXmddMGMZ+6W8l u94ZbfD9UcK7tHUukinbtMtxGAx5HacifTYzPzj0sOX7Fa+Di1oMX/mD3cJAYONlTDOvq6 PWDwMv6Mkl3j5Est1CiR+U+M7/2tTAg9RcfqMW2Foo10GsvYMkU0KgGKlE5eAQ== 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 4XvZ9t34Vyz10ls; Thu, 21 Nov 2024 23:26:26 +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 4ALNQQki021357; Thu, 21 Nov 2024 23:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQQMb021354; Thu, 21 Nov 2024 23:26:26 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:26 GMT Message-Id: <202411212326.4ALNQQMb021354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cce4df8b3cbc - releng/14.2 - bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: cce4df8b3cbcf4f58890048e608399471fc214f7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cce4df8b3cbcf4f58890048e608399471fc214f7 commit cce4df8b3cbcf4f58890048e608399471fc214f7 Author: Bjoern A. Zeeb AuthorDate: 2024-11-09 01:10:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:47 +0000 bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant Make sure an interface is back up before (re-)starting wpa_supplicant in wlanconfig not relying on wpa to UP the interface (though we fixed that). Sponsored by: The FreeBSD Foundation Reviewed by: emaste (in D47491) Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47491 (cherry picked from commit 5399052c63a7a3d2f54615d31bfd092ab887a600) (cherry picked from commit 7d0c12e1f907ddf9be6668449a966703c0f781d1) --- usr.sbin/bsdinstall/scripts/wlanconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 338e4f0a4109..728833f8d4a0 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -55,7 +55,8 @@ country_set() "$WLAN_IFACE" "$ifconfig_args" error_str="${error_str#ifconfig: }" # Restart wpa_supplicant(8) (should not fail). - [ "$iface_up" ] && f_eval_catch -d wlanconfig wpa_supplicant \ + [ "$iface_up" ] && ifconfig "$WLAN_IFACE" up && \ + f_eval_catch -d wlanconfig wpa_supplicant \ 'wpa_supplicant -B -i "%s" -c "%s/wpa_supplicant.conf"' \ "$WLAN_IFACE" "$BSDINSTALL_TMPETC" if [ "$error_str" ]; then From nobody Thu Nov 21 23:26:27 2024 X-Original-To: dev-commits-src-branches@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 4XvZ9w0bwrz5dl2w; Thu, 21 Nov 2024 23:26:28 +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 4XvZ9v4Qpzz4RQD; Thu, 21 Nov 2024 23:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231587; 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=rk4efzCRH/ebAqpX4y7E6/QpOULt/Js0GRdgaqTKu4E=; b=m7lp+oF8nKh7h1yBKlFfep1G4TZpwYpOuVAzN1CZfL6zYe8oNV6PkukACtlhIuPaPkat2E xHmc1EgRJ/CCjIOA/L6N1D+tY72Vurfv4vGjMWKaU71hfUEUA9tBiTW63nA6vizaaODEUq VsAuGl0SpRU9SRH5kaolB1U3LvFK9rgGl4ioktw0z6Jo04SyHlIl594iCysWKWv6QcJwlY Y6KPHDQq61NQnTWtfEWbnlUDGbConm88kq1RIVjrDt/7fE0o+ftYewRU3u6iPiXSWsksKj qFBsr2bNxAAOta7g80jrs1BFHAquN20MZS2/fsyRIziuEOYZ1/bA9b4dys0VRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231587; 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=rk4efzCRH/ebAqpX4y7E6/QpOULt/Js0GRdgaqTKu4E=; b=t7OKrGZ21q5/P62e9tbPI7TnUY/4TEFUlWFPjMF2+ipzMXyyswvjUy/4E0OfOv03vGAJT1 qa/73If6vLJfxcH4K59PsMRv5drylJvAtuaws/5TuVZavDHcdbBHVEESoSgOLttfPFPlkk 1RPVVS4sNH7rLLzjfGu8RyANPc90KPVpM2nBTVn4srqxVHunaa9xusi7I/aMvoZ+Q7s0FY e24MpMquZmUdwzwgwpY7nKhO4QrtISp9a/4h58QvFHhPzyU7hodCRM7wCLxAv50/B5xj0z yCe/34L/oRmzc7A2rAF0Q284g+ejeYa8c+yBx7CKHp4yAXygXdc/zsOggoGG3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231587; a=rsa-sha256; cv=none; b=QzqKpX2C7pn5IgJeAGzm5U1BxVr/1XOtjaVVZLoUTLNOcYVv7pllBqXnHeESyojl09jtQR D2/xseOuQQAIqOVEFNNJD1/+8JeOo8GE3MqS+g/fYEou9hBaZh+5Iitn4dRvY3RLUsqOi9 EI0sCDB7K223uxWoGX8aIS0YxdUxypDByKFRJtWp5vPMkOc+qQXCpi5Krt8dK5iVG7umSW eNr9zpOh2StgtuWrVxMs5mLLbUZJoJLPLwjpHh6OOEm1kLVM9QXu1pYUXRGEb9AZT/v37L TFbr8vGpyI+Q0rhOgpl0hznn+gZYP0puiK3vEECORDzlgQeD98GgHrrsGr2kAg== 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 4XvZ9v3ggCz10lt; Thu, 21 Nov 2024 23:26:27 +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 4ALNQRF5021424; Thu, 21 Nov 2024 23:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQR1e021421; Thu, 21 Nov 2024 23:26:27 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:27 GMT Message-Id: <202411212326.4ALNQR1e021421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c5b8ed13c9ef - releng/14.2 - release: install wireless firmware onto disc1 and dvd List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: c5b8ed13c9ef52767b2c495b3f794ee238e183d7 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c5b8ed13c9ef52767b2c495b3f794ee238e183d7 commit c5b8ed13c9ef52767b2c495b3f794ee238e183d7 Author: Bjoern A. Zeeb AuthorDate: 2024-11-02 23:51:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:53 +0000 release: install wireless firmware onto disc1 and dvd Wireless driver firmware is no longer added to the src tree. In order to have wireless support in the installer for the new drivers we install the firmware packages onto disc1 (and memstick) and dvd if built on FreeBSD and NOPKG is not defined (to not break cross-builds from Linux or OSX and to allow people to opt-out). Sponsored by: The FreeBSD Foundation Submitted by: cperciva (the orig. commands and where to place them) Reviewed by: jrtc27 Approved by: re (cperciva) Differential Revision: https://reviews.freebsd.org/D47407 (cherry picked from commit 7e2996c1f5b4e684cae40c2418b68061df9997d9) (cherry picked from commit b62012538e967b22736e8c2214b222f21146bddc) --- release/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/release/Makefile b/release/Makefile index 3d96880d1661..c5970b184b96 100644 --- a/release/Makefile +++ b/release/Makefile @@ -70,6 +70,17 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if ${.MAKE.OS} == "FreeBSD" +# For installing packages into the release media. +.if defined(NO_ROOT) +PKG_ENV+= INSTALL_AS_USER=yes +PKG_ARGS+= -o METALOG=METALOG +.endif +PKG_ENV+= ASSUME_ALWAYS_YES=yes +PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install +.endif + .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) VOLUME_LABEL= FreeBSD_Install .endif @@ -186,6 +197,10 @@ disc1: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -256,6 +271,10 @@ dvd: packagesystem do echo "./usr/freebsd-dist/$${dist} type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG; \ done .endif +.if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) +# Install packages onto release media. + ${PKG_INSTALL} wifi-firmware-kmod-release +.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf From nobody Thu Nov 21 23:26:28 2024 X-Original-To: dev-commits-src-branches@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 4XvZ9w6h58z5dklk; Thu, 21 Nov 2024 23:26:28 +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 4XvZ9w5zLbz4RGB; Thu, 21 Nov 2024 23:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231588; 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=NvqeWU4eSLJVDrV8WREt4XJWdxjqmP7jIqhk3k45dDk=; b=GPS62GaHpEG/MvYVe0TAlSVaN3g1v+uwlFwYuzlLa+dg1zfAuZ9gTtF27gtsT8n/WDSDP2 M96MCXJnusegMb0ae+id9IydJRTnctNJ9Z82XYFsIS2jUxvIilUdDQ/pFF84842StHusU6 ku4K3t3MK164H4KrPOK8s+8ZoXiGgQcr54o5N9NCzpOx+zHSIoiZzR8fJ5jw4m+RpkfZ7R YA4V6RUu8Plwb5rsnrX0hhLTXiInDXdnF26pjY8Be49PNE46J+0xWUSiRe2M/S6zQ1+T7B SBCgF8vacJWCYMKY9gFh6er3IDYzw4vJhziBvOVjqij0YL7RNruLtJFgNZtkDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732231588; 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=NvqeWU4eSLJVDrV8WREt4XJWdxjqmP7jIqhk3k45dDk=; b=Vls+MQbXMu4gnQLOKnnXkB2gw5/yR3nvBX2vI9UXT2Fl2j5cHEvKFGvl2rVnbbJ8bQMYCb W8rg5sKuuxvhsK+NYyGSoB2b4iXeFYvL/tXE+qD4enjOMagwBPbi+gDjxI/EFKuR6yZOBA o8CUQPs0dWiwsgF5A20aSTWe50BW69btk2whxJfjt76hJkUGhQaIxUtyrKNGoXOiU8bag7 ahbg1rihoziyaOFKxzaZqvusaVwtKyFoJAzUzSzkTCMUKpqAFvriXPjOuZNBtqtLchZ1py Il+oUj+vicN1tZkD4f162vKz0roJgvo2vvieEZJY6aVT8CBYN0n4Ol5VVFteaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732231588; a=rsa-sha256; cv=none; b=f9j2Q8Xo8tJLmXA9FNmdk25+42zsoCnL5diMRnJGC0jJj2J9u5hzrrlh9sD0FOpJQoahIX VzXTsub+rLiiR11jP24jC19Iu4+4ctD+6GDOeSsnbzJ2kZVMMgf70ILSA9gSWx+JD/1IX8 LAo3WKgNzsUvo5XVbOlvT0b8+x+8R59YvrpsbYgPzFc67ePBwmigBdFk/haa02ubKknxkQ uwjgTEhwtsRKFhapsIYadtjLfRCTeTTNpRBud7JSA8eEffts6HtYFH43Nb9i4eCxgch4M8 CaTHqEa/3wpqQDd8Ns4NBbprdOaQyin2/j8UC9qEqfkE0//ly0YG940vsnVMrQ== 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 4XvZ9w4qmMz10bD; Thu, 21 Nov 2024 23:26:28 +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 4ALNQSot021475; Thu, 21 Nov 2024 23:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNQS5v021472; Thu, 21 Nov 2024 23:26:28 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:26:28 GMT Message-Id: <202411212326.4ALNQS5v021472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 42d33f929925 - releng/14.2 - release: Don't break if firmware install fails List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 42d33f92992591cd86f66cc3fbc78e30b7f943fa Auto-Submitted: auto-generated The branch releng/14.2 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=42d33f92992591cd86f66cc3fbc78e30b7f943fa commit 42d33f92992591cd86f66cc3fbc78e30b7f943fa Author: Colin Percival AuthorDate: 2024-11-21 06:10:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-21 23:24:58 +0000 release: Don't break if firmware install fails On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") Approved by: re (cperciva) (cherry picked from commit e8263ace39c8ecf11233c0a10d0b1839e6813046) (cherry picked from commit 9431091ee021eca9eb4c768b566e623ba9333b41) --- release/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index c5970b184b96..152c2edfcf06 100644 --- a/release/Makefile +++ b/release/Makefile @@ -199,7 +199,7 @@ disc1: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf @@ -273,7 +273,7 @@ dvd: packagesystem .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} wifi-firmware-kmod-release + ${PKG_INSTALL} wifi-firmware-kmod-release || true .endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf From nobody Thu Nov 21 23:43:05 2024 X-Original-To: dev-commits-src-branches@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 4XvZY56fzHz5dm48; Thu, 21 Nov 2024 23:43:05 +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 4XvZY567G0z4Vjg; Thu, 21 Nov 2024 23:43:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732232585; 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=suJjTY7bQ9PU0R/F5+obU1FuJsPXVZOfnFktCtKHez8=; b=I6VVV0PIV/ZSXPj4+YawVesqTDQihHEW8twRVsSznEj+fWCBZdMEmGLwqLYAa489hV2iZS PBgllKdhzZ9sdQ3WNY4KGwKQyq9AaaaEuQbp/kJvt5OxuiZ0YZMmOGexkJrCbcmGcdt/H3 27lyzI47eRjIcugelnz6jfk261DG/tS7G3IoeXI+XCQzIZpxbT2trr1DdSw5NHO0ZWXd/i +wT2qokuKrbBMWEoio8TwtPSjSBMywuBSdAxXWYa/god+EQysBYntchdhMb9Jy84GeISEh ugstRwBXPlkKfC3WtAFP2K/3FGLliU5HhV3y6j9E5lVOSUMZGraLzV7IAcH62w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732232585; 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=suJjTY7bQ9PU0R/F5+obU1FuJsPXVZOfnFktCtKHez8=; b=jrMkZfPWogi3ZLtwrX6pUT/Qe5LU3cb0L94+SAKBc9jNWrxVHGUY/T3SlogUbYswCLoUgh kPobgMWMHkHFW1jowlDMRXvbFYsBxMdjXN5NMBzR25TON1vm9UKI6V0AMj4IVHDyaycGvL 6F83umc6heWSO1WQt36GxxQ7GGQaj5iH2QaXgwp2JQSN0O1MqM0vW2BcJzQht6zI9fKTe0 ImnTfMb9NtRYG239hiDhs6WzAVbFot67XcGCtjNYKfHJwszqmH68rzMnv5isVUmN7Wegky QUtZRMMmKcBCIKUivYGFAArApnG+cJIHbqdPBBUFikIjyJhV9WghQX7QpVMc8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732232585; a=rsa-sha256; cv=none; b=x50a6pdMbevLWFM3iTmz/ke3k1DZV0hxOmQFkhSPuXyHBSPbT7a9mCxCGsT9YrOhzTGUdM dOy13f9mnbmH+I4Ebr8fsuwDusmYJDUUGizEvYaUgCym0DvkLgUrbLK4FwLhBSwwVospj9 EmrSpxpjLO1hdvXfpKQ1vR9yQN/yqxxoOeu2avCC4VSJKW9Q/DA6FVvebNEIQpZ+QFv+wE 2+udVwcI1eeQbf9W82QHkILsycS9vzJQMQQDGFwVzR1yo8qpyNXhD+cz8He+xzPSraLSWf +y69T5Ekp8wDgn2J7TVAm5pxMlozRQURAQHCPw2rqb/E9PY1lIiN/+ywvQ6cMA== 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 4XvZY55cm9z11Db; Thu, 21 Nov 2024 23:43:05 +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 4ALNh5Tq057110; Thu, 21 Nov 2024 23:43:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNh5LL057107; Thu, 21 Nov 2024 23:43:05 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:43:05 GMT Message-Id: <202411212343.4ALNh5LL057107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: af96dc44e1cf - releng/14.2 - release: Add missing dependencies in the minimal OCI image List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: af96dc44e1cfa3d072beef070468509d68d91809 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=af96dc44e1cfa3d072beef070468509d68d91809 commit af96dc44e1cfa3d072beef070468509d68d91809 Author: Doug Rabson AuthorDate: 2024-11-18 10:05:29 +0000 Commit: Colin Percival CommitDate: 2024-11-21 23:42:53 +0000 release: Add missing dependencies in the minimal OCI image The pkg-bootstrap binary depends on fetch. Approved by: re Reviewed by: cperciva, emaste, bapt Differential Revision: https://reviews.freebsd.org/D47661 MFC after: 1 day (cherry picked from commit ca1f1d2c9419a5d66929ca6880b69901254645a6) (cherry picked from commit 4a768794b836f781ecf798949b60e5c5d305f136) --- release/tools/oci-image-minimal.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/oci-image-minimal.conf b/release/tools/oci-image-minimal.conf index 122da1905436..82e2ce6a1bd3 100644 --- a/release/tools/oci-image-minimal.conf +++ b/release/tools/oci-image-minimal.conf @@ -12,7 +12,10 @@ oci_image_build() { FreeBSD-runtime \ FreeBSD-certctl \ FreeBSD-kerberos-lib \ + FreeBSD-libarchive \ FreeBSD-libexecinfo \ + FreeBSD-libucl \ + FreeBSD-fetch \ FreeBSD-rc \ FreeBSD-pkg-bootstrap \ FreeBSD-mtree From nobody Fri Nov 22 00:00:43 2024 X-Original-To: dev-commits-src-branches@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 4XvZxR1s95z5dmnS; Fri, 22 Nov 2024 00:00:43 +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 4XvZxR1CXRz4X07; Fri, 22 Nov 2024 00:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732233643; 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=9GmE3k3mLCFJuJn4X5TykovmHn5Z3RSy8RcF7JHqICI=; b=mflEJ/Y0odTFoR88sIDT+8NVrInUaRtLbjXUVrAAnyfQmPm1QqtLkhtYARHcxGoS4D8odF 3YWXPZrbXWoSQvv6mdX7HSlgHQlJ+hBLohXhOlsgi/FYwx3juu1oBx8S1c+cpfRAaZ7ZwP RYYigvCIuMsxdVwBQ0iRaxq1hULNgClWJZBHxNwx84T1dC8PSQtTr7I7Zfad+3VXhe8FG0 BfqSd17VMrx/bBIdKfeORFFdmPSCW+vMXt86BOzsedvhW9RcFULhQ/OTlLpxLYOpnr+Lni b5KH1IhioUdM/WV00YJTrU+PbQEzrcptOGKA8wbBaDuoRL/IzYj/GfkbYHh+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732233643; 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=9GmE3k3mLCFJuJn4X5TykovmHn5Z3RSy8RcF7JHqICI=; b=I8y+0K0v2fVTBG0iEMUhM8aXvdZatvibziGlFUOMZYwivAnfA6gsSzcvmr0ILPvdwlJmOC DPGAdYynO4BkPBNM8uCGHeMdbM8WnK075doUSnFBRYoTPv2P7YArQb1K9kHEahT6V8qTks kpcNxtu0wTLJyCN1Zyc8hhXBa7+suoPdmzRYs+d6rBKyn/HR3eYiE6IfbhqUOATtpZO5dC ExOa56H7Z3EDEX16+8nQG/sZnMSpT2wkcNnWuKLR9LNn/mf/BvNJDqzRfGYEfXBi8cQ21b CYumPv6eNJRD0wJ48eQnLLzaqwN3499jmM0xz4+yHNJKOlJmS0jo5iFHPZhOnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732233643; a=rsa-sha256; cv=none; b=rQ9DY0P4TQCdYXxPHzifFRfqaCIzFJ5d+tdTF5JBUvCJfrZbVH0oq+f2TNDABcBAfbEtGG MqxWg6oMWn3CaB8pJ338V9qpVGB6AH4NVEJhKi4q4WoEb2DAprU+mT0BqBxAgLLqOLgwz+ fD2sB1LjSe6RMXxYZQuyM0jX9L//nT23zaXDTYQlrenLqL8jJH+pBijL87x+I2reHFuvy2 HTPdkdv0tS3w/kDbnYtdH0jbfkoj61xvPQbvzs3NKzMTZxrN0KgnsEw6oS3wAhKn7cef3q j/DiMQM8S8sveqs7oSgJBXTxde9TaKNUzITVOsxaEI+ZCaSZFAJKAT+7p/EzvA== 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 4XvZxR0pTDz11Mj; Fri, 22 Nov 2024 00:00:43 +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 4AM00hni088180; Fri, 22 Nov 2024 00:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM00hHf088177; Fri, 22 Nov 2024 00:00:43 GMT (envelope-from git) Date: Fri, 22 Nov 2024 00:00:43 GMT Message-Id: <202411220000.4AM00hHf088177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 5395ddd7aa13 - releng/14.2 - 14.2: Update to RC1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 5395ddd7aa130a8d8063f6eccf893937cc8baf0f Auto-Submitted: auto-generated The branch releng/14.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=5395ddd7aa130a8d8063f6eccf893937cc8baf0f commit 5395ddd7aa130a8d8063f6eccf893937cc8baf0f Author: Colin Percival AuthorDate: 2024-11-22 00:00:00 +0000 Commit: Colin Percival CommitDate: 2024-11-21 23:48:17 +0000 14.2: Update to RC1 Approved by: re (implicit) Sponsored by: Amazon --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 3da92b81939d..af5875c5c0b3 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.2" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Nov 22 04:53:06 2024 X-Original-To: dev-commits-src-branches@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 4XvjQq32TVz5dLw0; Fri, 22 Nov 2024 04:53:07 +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 4XvjQq054Kz4t0m; Fri, 22 Nov 2024 04:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251187; 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=TvXX7T5Goir+Zl1TAfjecdXSfbpouajI1FyFwcUb6u0=; b=rGqpwFbdD+P7GphD0lid62ZSu1wdTunDkaCD2+FQIGqBfxx/7j0qhL9BhF+9Ss3WxXcJjK d89uV2bgvmGXqSyprliyYKF2ruj3YSLJMMiGPnx8cJA65p0LtTQ5wN80Qbcuvv2ZCKl67s IT659AfW4k4C7Kca9ErClj87QHrC+1lIMb+10Z9Mqp70xU+eSiMAl1ly64itlDstxgNs5V lmMgcnL+c+5vQM43tKvJjCT2aLDXK/eZfHQCWj2YpCcL86qbyDizsFNbc7zgjrckaVsQL6 VdguGKUBjfk/4mnVhskHYeJu2putW493kT0Jl2Z3eFRynKxM4tqxujFhrqN9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251187; 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=TvXX7T5Goir+Zl1TAfjecdXSfbpouajI1FyFwcUb6u0=; b=JbH6JX5i1XTcnIliec4XrCEpp5wCkomwpcYEpLctA3lNpWZ8Gj/UcMyGHpQGHgr/4CuhbG F7baHmKqSnaYj3mK9K7cYgNnmy+T7xbQhfVspt+HBEK/mVxLUvpPEalv+WDagL1CfmFk8L 6itMTGQi8TPYKrFhjcjSj/DBw6SGlp/6t8KYQ9NDeI0GvBgnRy2FlMqsa+iGiDTfDZk3Xt UBmkMAM32Dm0yrcfn/wRZmjjlzBGqarcX5b02tpPOb9YVQU0l1T2u59EziZopLS75X5WcY QHEjmZi+4cLjdnu+4ho2DuclT/Vh/qvSAtk+T67xhdSltw+5PuFvpZbW9u4ZZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251187; a=rsa-sha256; cv=none; b=RXc3ilYULp7TQ+LefUC1oUupqcDAmCkQjb/InCJH7FBLpTgyRbAK6+iouH5EIsHJiGgizK bZkj8vYepZcGq5IjM6LvOyqzShrnH71aFVN5jgDBo1yRULwwUWWS+TgOr1w07jm1ci9K7n t5Xvnovxpj81xSaTkJX3J1ELnZ7nWVZT35BtBH1UrcOQ4erSr0H6JugOmj/6BvTnJ8mLZZ 0GNVT6mLCsVm3x7R3cKq/EHwrpGdEaQ9B6SKfA6GJpyC17Sd0SUUxDmpYpUps/hOKECGR3 voogNei+bJvkJ4bSGUd7Kslbi7F3E7Mc1cg2BoE/yQzVJHgr4tDsxQl5R8eMzQ== 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 4XvjQp6pTTz19HY; Fri, 22 Nov 2024 04:53:06 +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 4AM4r6ag034373; Fri, 22 Nov 2024 04:53:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r6ft034370; Fri, 22 Nov 2024 04:53:06 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:06 GMT Message-Id: <202411220453.4AM4r6ft034370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 3f309e953152 - stable/14 - sed: fix commandline-given expression when -e is not used List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f309e9531529aaee3b3da9aaff5582b565c75ac Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3f309e9531529aaee3b3da9aaff5582b565c75ac commit 3f309e9531529aaee3b3da9aaff5582b565c75ac Author: Martin Cracauer AuthorDate: 2024-11-07 03:40:02 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:51:53 +0000 sed: fix commandline-given expression when -e is not used Make explicit sed commands (first on commandline) behave the same as those given with -e. Without this patch the following two commands behave differently, the second one being wrong: echo ab | sed -e $'1 i\\\n--' echo ab | sed $'1 i\\\n--' Reviewed by: 0mp, des, kevans Sponsored by: Klara, Inc. (cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8) --- usr.bin/sed/main.c | 10 +++++----- usr.bin/sed/tests/sed2_test.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index efa28b5e7239..1632b823cc69 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -148,10 +148,8 @@ main(int argc, char *argv[]) break; case 'e': eflag = 1; - if ((temp_arg = malloc(strlen(optarg) + 2)) == NULL) - err(1, "malloc"); - strcpy(temp_arg, optarg); - strcat(temp_arg, "\n"); + if (asprintf(&temp_arg, "%s\n", optarg) == -1) + err(1, "asprintf"); add_compunit(CU_STRING, temp_arg); break; case 'f': @@ -184,7 +182,9 @@ main(int argc, char *argv[]) /* First usage case; script is the first arg */ if (!eflag && !fflag && *argv) { - add_compunit(CU_STRING, *argv); + if (asprintf(&temp_arg, "%s\n", *argv) == -1) + err(1, "asprintf"); + add_compunit(CU_STRING, temp_arg); argv++; } diff --git a/usr.bin/sed/tests/sed2_test.sh b/usr.bin/sed/tests/sed2_test.sh index a7408b2560a7..f50619612561 100755 --- a/usr.bin/sed/tests/sed2_test.sh +++ b/usr.bin/sed/tests/sed2_test.sh @@ -147,6 +147,18 @@ bracket_y_body() echo 'bra[ke]' | sed 'y[\[][ct[' } +atf_test_case minus_e +minus_e_head() +{ + atf_set "descr" "Verify that -e and implicit arg do the same thing" +} +minus_e_body() +{ + printf "ab\n" > a + atf_check -o 'inline:--\nab\n' sed -e $'1 i\\\n--' a + atf_check -o 'inline:--\nab\n' sed $'1 i\\\n--' a +} + atf_init_test_cases() { atf_add_test_case inplace_command_q @@ -156,4 +168,5 @@ atf_init_test_cases() atf_add_test_case commands_on_stdin atf_add_test_case hex_subst atf_add_test_case bracket_y + atf_add_test_case minus_e } From nobody Fri Nov 22 04:53:07 2024 X-Original-To: dev-commits-src-branches@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 4XvjQr59xzz5dLw1; Fri, 22 Nov 2024 04:53:08 +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 4XvjQr1dNRz4tDV; Fri, 22 Nov 2024 04:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251188; 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=7JVfIuWBQTVSf97gp4nM3ewtcKww3XB6zzz74d79PKk=; b=WkRut8XB3NaCgMCXLruPt2ZQinrMYhVnpxKO1WIqZHs2fFkO67PMa9aly+ZU5ZGmN/JpeU VLHfbkJ6mxT5QWaO5zaAONYY3zcNkSj92qA1FWzvahFODek/6SLZYELTuYrzgR9ezCbyOF lhbGMQT5thuHSq/oUkMnwcT2nMapxfwKVeDorIC7HafWq3yisCdOITjoa5R1s8HThxy88K 7rFPGwy6IboSZfevBe+kCSOMuAHjPsYphjIuSnUY76ZgFMUD63BHIEHeRhKorz0r3DXBFT 3TiY1mxMVikBQkjTh3PHIPpBZ9vbaNkOXmi0gfcT5YBLj9pktZ89Nxs0ggy6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251188; 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=7JVfIuWBQTVSf97gp4nM3ewtcKww3XB6zzz74d79PKk=; b=KBZOeLloPp0QlMt6EKzryGVG7maoo20loEj0urjwBmJDTtO830REqw8xm8o0OEhTYedaKI 4Kr/dqVUk7zoNwX4aZmXBt5/G819LTpzOq7CuVMiEpNcG6o0oQZ96qiBVRS01E8vMU1RhN UlTa17FDbCHcDMME3X9iQITB7VFlXaar4tzIcJbxwGC9ExDWDyVqV6bwW5IUw11fT56VDT 0Bc5jFxCtlzgmA5tsrrwya4VnHT5/4ZQBZRWs13l9hxqFPSzK6lMawStdtgyguq54QPCgT 6TwZP82L3Wxf3wR/L9XAd25kfcDsq3BuYR7A2r31NVQWHdEgiy9eTCSgR8mzbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251188; a=rsa-sha256; cv=none; b=l4IdMSe6J8p3xWp14g/4MHM2Ln4V5T9DdKn9weL0WNd1WBO7UrNOQgKUZb0jdrQkTkEOEf F15rNOEHiI2wMyByeXuwlgPjaA02KtTasIZuEdyOynVXVR8wIISRlIGVIkQpfXYOjuhTtJ 1si63HGKf3a8MGLGf+WCcebiBERpjidIkZLnUzFP7OW8vbWW4uAxf2YxH8eQb3VddzJo+2 nzuvtxxse3K/MQa0VUNFJk1/4y76Ydeelv2bbH2yYg9Meqs5qLGfIia7MLK5nH47zzkts/ metPZddj+8waPrYV2QdRjhwoV0mPsLb0l0y/qcfNCivt/h0YRx83zdqvb1PxFw== 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 4XvjQr1FHcz18pD; Fri, 22 Nov 2024 04:53:08 +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 4AM4r8gv034426; Fri, 22 Nov 2024 04:53:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r7i9034423; Fri, 22 Nov 2024 04:53:07 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:07 GMT Message-Id: <202411220453.4AM4r7i9034423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 0350ebae7eea - stable/14 - localedata: update widths.txt after recent Hangul exceptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0350ebae7eea7ac5333bf112d3c040313868135f Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0350ebae7eea7ac5333bf112d3c040313868135f commit 0350ebae7eea7ac5333bf112d3c040313868135f Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:51:59 +0000 localedata: update widths.txt after recent Hangul exceptions Sponsored by: Klara, Inc. (cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4) --- tools/tools/locale/etc/final-maps/widths.txt | 160 +++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index d8f0ab1888f0..4f91961334a1 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -859,6 +859,166 @@ WIDTH 2 2 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 From nobody Fri Nov 22 04:53:09 2024 X-Original-To: dev-commits-src-branches@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 4XvjQs4wnhz5dLkG; Fri, 22 Nov 2024 04:53:09 +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 4XvjQs2Tr7z4smG; Fri, 22 Nov 2024 04:53:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251189; 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=L7u3C3rSRq1rjy9RWKgquD6Bqu0nejhfHvLpnVoWDO4=; b=uNXUGbXAEff+RZqQ7jhR1XHhWdGfj3OuJONnZLOYY3jTlXxpmUGerApAqwk8cwULxBc2u/ 7hudbU3COYjSFaossd4oZ6OsjdmuQIrn0KGfA4fqtX9A9ADqsd7w/eeO4XIBIfTjmcWr2I 9QFdQGhWncKH+E0OIjPtKndGTK7HokWyhJN1PmNNLSwFrhuyh4AsMhcw9uBeUunWPx6ime OsfjhU3v/c3C+VYJVkLEx89xPa+eXetdaGYcKBP4H2U6sqMdCNLbUtm4AHo/cUMGSIQXGe 95LHIF92fbSJAN9pVLzlGJFcovT5DU+Vhil04giyErxsm+fWwQ79/cedxt0zbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251189; 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=L7u3C3rSRq1rjy9RWKgquD6Bqu0nejhfHvLpnVoWDO4=; b=czAggFGue783wxYdYVa7JbYF20vO2GLJmwv8BAre9PMx7VP9Qi1tTwB9zqgSTyzJZdAzE4 XNr8JeNgEl721U8VBIeDbVLVTlTnYjpRK/HMQ/VPsJPdCPrgpXdmKqUui2P5rnxPu1tT/3 nRhIaob5YsDyjS7eXGfMBk1Sl6u4+KQrubaLqyMUQVl0TwVbsTbPH3HQgxpiQnLoTFDfbd cFszhjTBVhAegpKhN+EQTxrN4gxI+V0p9Loyfvsp+Ytes0xQrVe8cmDgZFbwTOfPo3yQH+ emWa2iNIUfB9nb/t3NMIhPN9cG+VnsgZ9ocWuMsHCBtSRg8TK9zmMGRRtARZ2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251189; a=rsa-sha256; cv=none; b=MInUYxhleRXrIVZ9P3yOmwFvZz7HdQk+8IwvgfkVfDr3zm8CUrRPQt3s/SzEuStPmwfcJZ Z2VRsMswx7CqOgJM8+1sIq3ks+uRqSTAgKxt87bxgVkkDzquI0RiONSiiHd1ORGtdM50DE ys7qBdePxaxcX+PRgwGhrQXHiZP86waypoXRvQ4sGA1KBduWSgo4q+CHGvJ0OZqEmEz75c bEgJlwOLGkkz4dCCKHjpq1QFsk4nlERKn1lVIy1hOhl3UwMndZ5TPm7Hza3eCS/4QK97CV TOcdEfZ7TzNQG38cJA1gq3Qo+qDdwm9ZuFhTIebMe22Og061axRX9VdXFdHc/g== 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 4XvjQs256tz19HZ; Fri, 22 Nov 2024 04:53:09 +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 4AM4r9A2034474; Fri, 22 Nov 2024 04:53:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4r9t3034471; Fri, 22 Nov 2024 04:53:09 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:09 GMT Message-Id: <202411220453.4AM4r9t3034471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8b30c13fd56d - stable/14 - localedata: add some exceptions to utf8proc widths List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b30c13fd56decc3a416e217349de3ecc95fe3db Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8b30c13fd56decc3a416e217349de3ecc95fe3db commit 8b30c13fd56decc3a416e217349de3ecc95fe3db Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:02 +0000 localedata: add some exceptions to utf8proc widths Hangul Jamo medial vowels and final consonants are reportedly combining characters that won't take up any columns on their own and should be reported as zero-width, so add an exception for these as well to reflect how they work in practice. This conforms to how other implementations (e.g., glibc) treat these characters. Reviewed by: bapt (earlier version), jkim Sponsored by: Klara, Inc. (cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77) --- tools/tools/locale/tools/getwidths.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 2790b8031912..63c62791253f 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -28,6 +28,21 @@ #include +static int +width_of(int32_t wc) +{ + + /* + * Hangul Jamo medial vowels and final consonants are more of + * a combining character, and should be considered zero-width. + */ + if (wc >= 0x1160 && wc <= 0x11ff) + return (0); + + /* No override by default, trust utf8proc's width. */ + return (utf8proc_charwidth(wc)); +} + int main(void) { @@ -43,9 +58,10 @@ main(void) wcc = utf8proc_category(wc); if (wcc == UTF8PROC_CATEGORY_CC) continue; - wcw = utf8proc_charwidth(wc); + wcw = width_of(wc); if (wcw == 1) continue; + printf("%04X %d\n", wc, wcw); } From nobody Fri Nov 22 04:53:10 2024 X-Original-To: dev-commits-src-branches@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 4XvjQt6g5Yz5dLw4; Fri, 22 Nov 2024 04:53:10 +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 4XvjQt3VT4z4srl; Fri, 22 Nov 2024 04:53:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251190; 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=djmktuH/CALvw85IbUBZUURkFsTN4yA/IQYi+NCKgbo=; b=hLF2bTVN1kaPERQ5gWX17Yr9crj09wNUiACMcFHIiH0ertI2m+y6lkVgmqb7ovUXbQRZQR SKWavWXdAEAKULiKJuYYMlopqie1e2xSCF+qErRaj5ceS29ASSS+SP6dlbQF9kKJWhvTb0 n1o04/idS3+0w4qE3asLPIu3t5/HqzrQ06jt2M7agvnpEiupxty029XPuu8q1nwj1fagd5 CxLwrGOFdLKVvfmYzPKAakxfyzRiI6uvs2qCJpewHigMQWdf+9xow59/pbqo3FC0RSNBGI uPw/HCxtEuJh3HHPzvTTUqhkYJa01wP38s8Dv3YTRwziq0IZs1hr4OPtt0RNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251190; 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=djmktuH/CALvw85IbUBZUURkFsTN4yA/IQYi+NCKgbo=; b=PSIhSRIGAIkwijDxMwTBjcs3ewL12/wKZSy7oey+K++9S2ubIqoc+5mZEOK6hKZoJ/gclj r14lOWFncy0AUeoRb3yD4AuOgWQ2a++ah73azONjtgOghvYRJRKHiV8dpXN5WxHc5GWIYq DWa0akhJoBkGbtSH5PZdVUmNrEQ5pjGwBXFVulVJ8QAf8bh6MVcdI8XYkM3z7ejSraE0AR R8yk2AtNwpr5BEJ1PJC8IckOH3ecanGPtmd49w7CoSLUGrltPZZ6c7gVTx6/vpEWT2QHaF e2j54XNC4UGQ1WboKSKh2tlxaUryIdvuhene/PlTqd0QH6c9AdfrIgyEJG+qfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251190; a=rsa-sha256; cv=none; b=Vmq1I3ji2UWD3E0FxBVvYTzZFXfTbNO0Xru+cCl2PMrvsLnFpeOTLbOfiH3uQjMw7OM192 kDRQpIwxDG3ow7BtoWEaM5jeCTsS0GNxRMv3QAOZhccyKETZ/Wx2Az1+zfNBpjeTlA8a87 kGY0sd91ZbZyeQLf95LvipvHSRzx12GJ7xZutMhX1EdKb14JbSDnt8zIgjoXHmpl0nLnJQ PVxChII91Gcuur30AIwkTMae7DJ11qtgqcPmFEj0+Ivy7KbhyUVQ0O/mT93mAhP61z0oFL zddVCjNqriqMjNeOJbeBaxZTAMWXzvanXQkiKUVnZBohXESUDw1NK6J5wNR9yQ== 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 4XvjQt35v3z19T5; Fri, 22 Nov 2024 04:53:10 +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 4AM4rAoL034546; Fri, 22 Nov 2024 04:53:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rARm034543; Fri, 22 Nov 2024 04:53:10 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:10 GMT Message-Id: <202411220453.4AM4rARm034543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 8ded8a211de0 - stable/14 - timedef: remove redundancy in Catalan date_fmt definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8ded8a211de050b241b0c5bab6e5f319c4a4b03e Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8ded8a211de050b241b0c5bab6e5f319c4a4b03e commit 8ded8a211de050b241b0c5bab6e5f319c4a4b03e Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:06 +0000 timedef: remove redundancy in Catalan date_fmt definitions This is already factored into the month names, resulting in an awkward construction: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de de novembre de 2024, 21:21:18 CST This would now render as: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de novembre de 2024, 21:22:41 CST Reviewed by: bapt, royger Sponsored by: Klara, Inc. (cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189) --- share/timedef/ca_IT.ISO8859-15.src | 2 +- share/timedef/ca_IT.UTF-8.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/timedef/ca_IT.ISO8859-15.src b/share/timedef/ca_IT.ISO8859-15.src index 669fbab13074..7c625aad19b5 100644 --- a/share/timedef/ca_IT.ISO8859-15.src +++ b/share/timedef/ca_IT.ISO8859-15.src @@ -59,7 +59,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener diff --git a/share/timedef/ca_IT.UTF-8.src b/share/timedef/ca_IT.UTF-8.src index 5dfd3841d9af..a85dd8c4b942 100644 --- a/share/timedef/ca_IT.UTF-8.src +++ b/share/timedef/ca_IT.UTF-8.src @@ -63,7 +63,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener From nobody Fri Nov 22 04:53:11 2024 X-Original-To: dev-commits-src-branches@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 4XvjQw0vbjz5dLLS; Fri, 22 Nov 2024 04:53:12 +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 4XvjQv4kFVz4t0s; Fri, 22 Nov 2024 04:53:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251191; 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=s2A1gND203Z+NtvOwRD7Bj5J6mmcBdyVteFhBk9gf8w=; b=n4moCLBM2L07ceZm/Wl5HFO+HkRyQ02KoMvQNU3vX/+prWvr1qxIbl3pEnpuN2f8zmCCx0 eLh+zneStjgLTDTVy7IgZDO2klqhb9thiGelkozA5cnU5u++avq3fgR2CAfQjpXOu+QIh9 4DEKa0DjlBpw7/oqdHEQzGI2DR6DRwTwc2q3GmiveBCPp2WzGEzq5/+xPZoij5E7X+KXbv b3wfe/MBjl62B9TG1XeYigB5dJJ+lCSTX2ZUQi6qVA6mxkRXk9J7XwwUxMVvPEnlHPwO7P Rz27X0kjMXjVomU71wpFpdVs4HtBOoNSz24zgZ//9fGFG1zG9fT6AodCG4/8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251191; 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=s2A1gND203Z+NtvOwRD7Bj5J6mmcBdyVteFhBk9gf8w=; b=duVEmz/utuMm3ajs/bfpy9hhKJdWEMMuS1WuF4NbaC7ZSPrHVydQ92wX4Eg2VyWShgfOIq sVLSU9deVzY2RHz6u7ID9EApAKRGBoWXDYM6LOXSrHbuYszRUXLCyyrjx25WOYArgaxfxL +qzOaP1DJEtvyJuzhsWDUM8cWY3/oZJTCslBEcnUn/deKuTMO3Nk8Xg/5thfaoyrLdUazN kECOsLhretBkwKEcgo2qS+fN8Dmo1Sgf90Fk12WRqWHvsFLypqZf/4JLDBw96LWrS+FzxV Fa6feEE/LmUDe+kO1ATZ/1SAltLzbFU4LYlNLb2Iham7D56UXaNj802YPtt5UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251191; a=rsa-sha256; cv=none; b=Mfsv3n5vm2cXEpfcRYtAaMqskNvxrmWScOE5hW/GfJlWVui7AK+a6u9t6jVjUb2Zzt9hJ+ szOz6d7GVS3r2iBfUDJlh7S1CnsTKNDfh432cPoEW6BEf8exqTUH2AyQHP8yotJ3b2uv94 CoEYnQiYI85LAiL//XrGjd8QJ836ieJYGW8uRLpGEFEUkaZ78d9WbRyCVo45+PncRmOXM7 21Fe3elhngwg2KnQndqAV7cGIS70XG/qcp9e2mos6BDFfZMVshaidpK3SucHbaadoQzrhm XHVQwh+hWmLtZOVuvySqTWnTQzlDPrCjJxSgAA5FG5kbd5HNsnwgGGgE+8fZHw== 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 4XvjQv480dz19Cq; Fri, 22 Nov 2024 04:53: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 4AM4rBdE034591; Fri, 22 Nov 2024 04:53:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rB2X034588; Fri, 22 Nov 2024 04:53:11 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:11 GMT Message-Id: <202411220453.4AM4rB2X034588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7c09acc76504 - stable/14 - _utmx_op: don't recurse on chain busy List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7c09acc76504ba63305998a7abb8ece44a6b4ebe Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7c09acc76504ba63305998a7abb8ece44a6b4ebe commit 7c09acc76504ba63305998a7abb8ece44a6b4ebe Author: Kyle Evans AuthorDate: 2024-11-13 22:18:40 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:52:10 +0000 _utmx_op: don't recurse on chain busy In handling a PP mutex, we'll busy it as soon as we enter the loop and unbusy it either prior to sleeping or at exit time. In this particular case, if we fail to transition the mutex from OWNERDEAD -> owned because of casueword(9) failure and the suspend check fails, we'll start over and attempt to busy an already-busied chain and irrecoverably lock up both this thread and anything else that tries to busy the chain. Unbusy the chain prior to restarting because I couldn't decide if that was a better or worse idea than just keeping track of whether we dirtied it in do_lock_pp() and avoiding re-dirty. This is marginally easier to reason about as it returns us to expected state on entry to the loop. While we're here, simplify the code a bit as `error` will be clobbered right after the branch anyways. Reviewed by: kib, olce (both earlier version) (cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e) --- sys/kern/kern_umtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 2d54850da9c3..a900435e9d4e 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2604,11 +2604,9 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, */ if (error == 0) { error = thread_check_susp(td, false); - if (error == 0) { - if (try != 0) - error = EBUSY; - else - continue; + if (error == 0 && try == 0) { + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } error = 0; } From nobody Fri Nov 22 04:53:51 2024 X-Original-To: dev-commits-src-branches@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 4XvjRh0Kxxz5dLLX; Fri, 22 Nov 2024 04:53:52 +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 4XvjRg6ngXz4vKb; Fri, 22 Nov 2024 04:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251232; 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=fToGjxDi+w2CCSvME5lIPe2aKAIzUOEjcQxen7kKE+I=; b=U5ObG0D89dD4wVLqUTfDNQRUfwHcqcrxYgzoc0mn3xWYjm/cu8YeBEmvGx/H+l4/kW0u3R Jj7/AHybX2vcZ4byXS3w5gUbqJF47Acllmm8ibU2FhfkadmPS/+VDPuXTSxoO8L4jOtZr3 WVhgHihgqD7476YTnHCJZO+dX5pzOE0C9GabSS1VPV0QJZSB7FTYHpZsCRZILjw/oVfx6e rG8ESG7QyLXCJ8oa3NuhjgtVIE2YgRuQOa1rYh7byt7auhMH8F32mnVrIO/mWboqR1Z/5Z jPVV85rG08CjN5G4stUndwHDXe8kXJhb7fPOpNEzNX4Rw+/qCoqt3022flsLTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251232; 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=fToGjxDi+w2CCSvME5lIPe2aKAIzUOEjcQxen7kKE+I=; b=WkjTgGdK87D+sgVB70VvhBgXNaVS/v82n6U1VI0P/xtjqmsdmZPU/f+KFY7w5aUAG0kCnD LekNWF48UnM97BMKqZdRwfMVvJhQA2poGodaRq/2F4SzK+xBKsma18toRUMXj5ZV8qyM2p 8oduXrkKJvf6kfJtYoGQE5MOIK2mgbqkNxPs9wPR0DAt/0Ukz4S5pQNsmmvRYa0RiYA/v9 jefamEbgr9vfX+ES0ekxHDdWB9CsqqDEqy//Bv+vTNRDn1ZJGMFe9vDM5lLuoIsvu4amxO hUui2UW1L/i/6zANnSRTJcJ74IGNh6W7xg4IVSziuzOwOx3WLFgH6HZ9N1/gSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251232; a=rsa-sha256; cv=none; b=HrOtaDG1tHip9b/2SlXVuKhSTnfAOmFpl/xW2o2EQhVMOXojpOb1r9qAIvqr6/SapBwMxc b3hyevYqIohiSmcgMckETGmyGu6zF+Qcahfzjnsx8Log7uGTkrjMxFP5llRH85upPqiVbA d1G6chSSLIHFe/OJANdAHXSrsfuuYDog3IcrfksuzY5DVJ3IhJzESAomSx+EOnOZhpe3bu d7qP+9SdMSqZpjjJX+hpW87UeVxapxXrPwf6bU9jnuDVyUiKYC4qaruLTxdmo3PnYfuabL 6EWM3uyiWwZWQxC7fULxnQFRx6ds2GE3gTLavQYy3+1iILV0+cOxvfNDoo7F/w== 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 4XvjRg6P4Rz19Hb; Fri, 22 Nov 2024 04:53:51 +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 4AM4rplE034956; Fri, 22 Nov 2024 04:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rpeu034953; Fri, 22 Nov 2024 04:53:51 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:51 GMT Message-Id: <202411220453.4AM4rpeu034953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4e609121a764 - stable/13 - sed: fix commandline-given expression when -e is not used List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4e609121a764b103dd2d07630441d1c4cd76bbdd Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4e609121a764b103dd2d07630441d1c4cd76bbdd commit 4e609121a764b103dd2d07630441d1c4cd76bbdd Author: Martin Cracauer AuthorDate: 2024-11-07 03:40:02 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 sed: fix commandline-given expression when -e is not used Make explicit sed commands (first on commandline) behave the same as those given with -e. Without this patch the following two commands behave differently, the second one being wrong: echo ab | sed -e $'1 i\\\n--' echo ab | sed $'1 i\\\n--' Reviewed by: 0mp, des, kevans Sponsored by: Klara, Inc. (cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8) --- usr.bin/sed/main.c | 10 +++++----- usr.bin/sed/tests/sed2_test.sh | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index efa28b5e7239..1632b823cc69 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -148,10 +148,8 @@ main(int argc, char *argv[]) break; case 'e': eflag = 1; - if ((temp_arg = malloc(strlen(optarg) + 2)) == NULL) - err(1, "malloc"); - strcpy(temp_arg, optarg); - strcat(temp_arg, "\n"); + if (asprintf(&temp_arg, "%s\n", optarg) == -1) + err(1, "asprintf"); add_compunit(CU_STRING, temp_arg); break; case 'f': @@ -184,7 +182,9 @@ main(int argc, char *argv[]) /* First usage case; script is the first arg */ if (!eflag && !fflag && *argv) { - add_compunit(CU_STRING, *argv); + if (asprintf(&temp_arg, "%s\n", *argv) == -1) + err(1, "asprintf"); + add_compunit(CU_STRING, temp_arg); argv++; } diff --git a/usr.bin/sed/tests/sed2_test.sh b/usr.bin/sed/tests/sed2_test.sh index a7408b2560a7..f50619612561 100755 --- a/usr.bin/sed/tests/sed2_test.sh +++ b/usr.bin/sed/tests/sed2_test.sh @@ -147,6 +147,18 @@ bracket_y_body() echo 'bra[ke]' | sed 'y[\[][ct[' } +atf_test_case minus_e +minus_e_head() +{ + atf_set "descr" "Verify that -e and implicit arg do the same thing" +} +minus_e_body() +{ + printf "ab\n" > a + atf_check -o 'inline:--\nab\n' sed -e $'1 i\\\n--' a + atf_check -o 'inline:--\nab\n' sed $'1 i\\\n--' a +} + atf_init_test_cases() { atf_add_test_case inplace_command_q @@ -156,4 +168,5 @@ atf_init_test_cases() atf_add_test_case commands_on_stdin atf_add_test_case hex_subst atf_add_test_case bracket_y + atf_add_test_case minus_e } From nobody Fri Nov 22 04:53:52 2024 X-Original-To: dev-commits-src-branches@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 4XvjRj1ZNQz5dLpF; Fri, 22 Nov 2024 04:53:53 +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 4XvjRj15NGz4vPw; Fri, 22 Nov 2024 04:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251233; 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=4hBH2nTrsLuMy07A5nm3k08H3uoTEF81fMRepjtfVYg=; b=KbctcYyRbmZcaqly1W6AMpiJNtxWDysN+04BXRIakqqtiDpsQhbnaez0erZztdio4ZeFgN zGNvM39rSaJLLNpi2oujjCwwy1D8uG6Zp2pBTT1VBcDTPtvaJj9TCL5W1DtSFDkHVUkmQQ iQBOGNe1fwXWRsj9pvdjNU1b3lTv5ylnx9ecBGVtg2c5OUNN29ryr/21QMudxBtTMeljtc pbSyyEpBRsCGhW7TniSMnB88noNrf1W/rVUZdCgNsk6Nc74HTQyNlyC0YZL4UTfj8QWtpJ J1ss1YtM9KNX435R6BQZ3yj4rMTp0zzOUhqrJkQddrvkoxeIM4k6b7H5wWgYnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251233; 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=4hBH2nTrsLuMy07A5nm3k08H3uoTEF81fMRepjtfVYg=; b=PUnb7FJRTcWR23Ii56q6SyljSPWj5HHEmoi0eiZcsN0QBP8aOalRcJ6oXEF42XVkC2CB/h xSc2AQHSpWXmZZ7MjC0Y3QxiKpaKUEiLm4oU83ZN94G3t6UtQEu9/wklWKM91XTzXdHEOZ tTMT7bMqTlaElInlJlXewW5Up25ab6zbBbdu+27gKbc14B/kzOnjDLGMnlnG3lwKJ5k7sY aIkl0gzbcZ7SULuAYCkQZWYHRQUgwyBF45dMy7jZUJbAf+tUGVAWMxiLbJk8eyKn48HDfY jBEGXW8/6+DcvfrgU4MCraKQ0OAgAvV8ZphqjA4Z8wF3vIMMOPhIgG4frBHFdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251233; a=rsa-sha256; cv=none; b=T6gDarQuv1KvlwiSOTukEs4PR8EKZW+zDKIClnFbyCNw5bIZmI4FVnGHun0tC/Al14nz+i lA7odArquDaFiNlgyhXNdqpGEHxG/1JVMEFICIcIQQ4SSLmFr8g1VhdT0s50t/TLY6UWp+ nVYbpNiQm5/8+7MMFoVzh2WBYCbavAEmBbcpPzL4KtVs+9Oe06Zelgsu1Zp7eVv+nZRfdD UI38XS/CHTMLUnxb/oRbKbS5w9s+vL4aEKjJbOvcIHuwyb+AFhtJ9DNFDCUDgib/TCTTY4 ZX8IgIBdYPZl6xwGZQVXV0Us+mKZZYOovlKLzJ9LsMjeM0z7sdHfTh2gXQXnSA== 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 4XvjRj0hyHz19WR; Fri, 22 Nov 2024 04:53:53 +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 4AM4rr3u035004; Fri, 22 Nov 2024 04:53:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rq3I035001; Fri, 22 Nov 2024 04:53:52 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:52 GMT Message-Id: <202411220453.4AM4rq3I035001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a85a7f2ae112 - stable/13 - localedata: update widths.txt after recent Hangul exceptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 commit a85a7f2ae112f751fd7c0f9c4afc2a24bd473069 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 localedata: update widths.txt after recent Hangul exceptions Sponsored by: Klara, Inc. (cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4) --- tools/tools/locale/etc/final-maps/widths.txt | 160 +++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index 74c28ac58463..fe168ebbe201 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -835,6 +835,166 @@ WIDTH 2 2 2 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 0 0 0 From nobody Fri Nov 22 04:53:54 2024 X-Original-To: dev-commits-src-branches@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 4XvjRl1ZdNz5dM8V; Fri, 22 Nov 2024 04:53:55 +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 4XvjRk1jmFz4vQ2; Fri, 22 Nov 2024 04:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251234; 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=N5NrUyqntvHlGrb9CNl41f14teELHvaHJiqr4M6Ar4U=; b=dZYSa60u5eaYATJK1YaEok2aKmskmq3PmxE7+iLlwPATjkn8RNmv+9iDPxOCXoD/8OkP0/ 35PTvvl7Vyp2720uj3ZkZFzR10KcuDiOK65Ml2G1MRkEt1UJB5CfR1vM/zuQ56kOTbCKr8 s150InlN4Z1z1HV606U349BQMhpQQYHw1kCTd3JFVPRHPLiO2/KA5xBfnBN+SxWD51enw5 fpwVz8uL1IG7+Zk0pwfdcjSeh5t5iRKz68Iuc+4FXqm4R+QZj3SV6QKHOqlYZUEjqWKozW zcxb6yuX9Y+5zJlCnaEozQbhy5qjxED43CGJmfStu4Ii9HfCHpp7/2PIFkG5Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251234; 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=N5NrUyqntvHlGrb9CNl41f14teELHvaHJiqr4M6Ar4U=; b=X5sN8C4AEVR/xt5d2TXxzro/zqWvV1M0+STgBLUMPEKx62D4iK4NnKtd1zNuCVnPpLrc8E asag44YhXVbAt3KoqX4XJIoe//vcGnCtE1C8zF/yrU5xYPGuSgnbw9XCSMe7am18PX0srb aj68PLObEX4k2gd0chSPPikcik8hUXJykpkrb4DdR27RgdNxUWMPf1uPT5VzLPxbkrSYTM N5x2RDawlFpXZWtGgrFpC1HUu9/aRGdjMxhUKGmRNrfVQF7UHLgLT+Z1tQBAM4nMx7eS5J 48kGOMcLCZo2bBYUbdpZU+lGSOf4j+DsXyV0PAn127fuoB0GDBwrWuL27Dxxkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251234; a=rsa-sha256; cv=none; b=wMIPBa+HMop8wr/3z7ENJDNPl3fTeZO4tdA2mCCrIUzbUtsWmmdF3PKB4Q4qpyhODjVckz 0STw1Ef/Z5hWyQDQNhfXjDrv6YDCemgoL2oYV+TiQP9cAa7Pp/Xxa82aWrqg2niztSJeqw qgpjQoPhtgu46rbZT1VqBwpC1SImk1Dt2FGLRTBhiE3G7WmwyeMZeROvB8K0cFovfFseEb Vjr+03ey9o/u5hnkkxWZvUtWRHFCqDghx6cxBE+t8JiDMvDAlTKR1TJu1WFTXhDEuBTa+i ZKr5kYb5/XyseG/i9+dVTacYCOMXYNOleOaq+lwFEAPbBTSyxtEjTD48WRVEMA== 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 4XvjRk1HwNz19WS; Fri, 22 Nov 2024 04:53:54 +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 4AM4rsn1035052; Fri, 22 Nov 2024 04:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rssf035049; Fri, 22 Nov 2024 04:53:54 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:54 GMT Message-Id: <202411220453.4AM4rssf035049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f4f4fa8d04df - stable/13 - localedata: add some exceptions to utf8proc widths List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 commit f4f4fa8d04dfb1e27c4b3a82c1b032545e74e2e4 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:43 +0000 localedata: add some exceptions to utf8proc widths Hangul Jamo medial vowels and final consonants are reportedly combining characters that won't take up any columns on their own and should be reported as zero-width, so add an exception for these as well to reflect how they work in practice. This conforms to how other implementations (e.g., glibc) treat these characters. Reviewed by: bapt (earlier version), jkim Sponsored by: Klara, Inc. (cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77) --- tools/tools/locale/tools/getwidths.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 2790b8031912..63c62791253f 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -28,6 +28,21 @@ #include +static int +width_of(int32_t wc) +{ + + /* + * Hangul Jamo medial vowels and final consonants are more of + * a combining character, and should be considered zero-width. + */ + if (wc >= 0x1160 && wc <= 0x11ff) + return (0); + + /* No override by default, trust utf8proc's width. */ + return (utf8proc_charwidth(wc)); +} + int main(void) { @@ -43,9 +58,10 @@ main(void) wcc = utf8proc_category(wc); if (wcc == UTF8PROC_CATEGORY_CC) continue; - wcw = utf8proc_charwidth(wc); + wcw = width_of(wc); if (wcw == 1) continue; + printf("%04X %d\n", wc, wcw); } From nobody Fri Nov 22 04:53:55 2024 X-Original-To: dev-commits-src-branches@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 4XvjRl6Hl0z5dLkk; Fri, 22 Nov 2024 04:53:55 +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 4XvjRl2rZXz4v91; Fri, 22 Nov 2024 04:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251235; 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=LovNMgcpH8pqaaQgRbuWaIvM+VoKOYnXDOIcX5PgUMA=; b=Vcvj2OW5xmEJ3sY9+BmV2et7y47vK73+KrLK9Nd5gMKVoWDe5jFTx8foDbV9zc6UmSHIUI QTZNP3YK4d8SYAT+Bhh2oGhQfh26mn/mdog6O8tQ9M4AcLT3UFnrWgsCRPWpsSOaqH6m2O Zq2YcdsQadjsiCrUI55DtxYpKAE3RrHBksoXJLLkFZtRXZCqyQIA7DsexdbUraAQvTOchj hwK6zKEYCgVrZ0istEtAS67cD9lJ1U3rnei/En+5RK/w2WF1R0Br7i5JUZhvriCHOxCQN5 LwikuwBUl62GjZ6cDrhVnpBRoGxxg/cq3ifYHMHqClWHJVFJAOsY2mXa6NvXyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251235; 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=LovNMgcpH8pqaaQgRbuWaIvM+VoKOYnXDOIcX5PgUMA=; b=SS4MXnIrLN171Rslb0sY0hrvXZyybfqKGkBuLzTEx+5tub7qDDYBpMCVxK3kOh7Xwym/qF 7NPsrdSmbhSeRhTcrcx80xidWMkZGwzMlP5JSJ0PeK14lVBVdlVvUF9NM2oeFLtsuojgG+ YfTi/cMi/g0Fs2ecJJkFRxI1eIiZcqnPU3W+gJ3f/uIUvA6GhcEXrzENHs5U2FRYbNJor5 Z8ZX6gtwI6YBM4FTyMvK5Zw9fzqkNzLDUKKRHW4B9sdjqolwVDUb36UR6s7z6c4HmgzWLV CPXeHLlEPBvwr/kvrYw70Akyg21x2VmWz6PwpHsYsgjsFEILLaqedsl6NYtQ0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251235; a=rsa-sha256; cv=none; b=gl/RLRuH9oQr7vMJiCEwMfs2458MVxttriQT/mfnb2BXybbbZQGBOltC+54Cehz6kqIGGk I+qmLyYWlbRctYQGzPuPhdXJUIbiAJER1eWoO7dLym7fDtv1UNIVfYKr+2Gh3SBN4bh5Ny IvT/iw3D8fkc/yXYVH94nGNTVMxw+eE7MXd4rmMO4c86QADi+B1r0Adqh5hzgWaj5N8S3/ xSOs3SsKpsggWF1JKRdyHHPoFXSUzN86/ghwsfJQeBwxqanfbTDIPEQ4IpQMR9O+fWznVU pOEfFMTv2FcQdkLoCS5rrFs/LFB8r6FbcW7fxtUC8G288fxx08Gvs+1XeQuW8A== 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 4XvjRl2LH9z19Hc; Fri, 22 Nov 2024 04:53:55 +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 4AM4rtCa035104; Fri, 22 Nov 2024 04:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rtP5035101; Fri, 22 Nov 2024 04:53:55 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:55 GMT Message-Id: <202411220453.4AM4rtP5035101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4729bb364293 - stable/13 - timedef: remove redundancy in Catalan date_fmt definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4729bb364293fd11a160d2e86bf86563e79c1030 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4729bb364293fd11a160d2e86bf86563e79c1030 commit 4729bb364293fd11a160d2e86bf86563e79c1030 Author: Kyle Evans AuthorDate: 2024-11-13 22:12:42 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:44 +0000 timedef: remove redundancy in Catalan date_fmt definitions This is already factored into the month names, resulting in an awkward construction: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de de novembre de 2024, 21:21:18 CST This would now render as: $ env LC_ALL=ca_ES.UTF-8 date dimecres, 6 de novembre de 2024, 21:22:41 CST Reviewed by: bapt, royger Sponsored by: Klara, Inc. (cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189) --- share/timedef/ca_IT.ISO8859-15.src | 2 +- share/timedef/ca_IT.UTF-8.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/timedef/ca_IT.ISO8859-15.src b/share/timedef/ca_IT.ISO8859-15.src index 669fbab13074..7c625aad19b5 100644 --- a/share/timedef/ca_IT.ISO8859-15.src +++ b/share/timedef/ca_IT.ISO8859-15.src @@ -59,7 +59,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener diff --git a/share/timedef/ca_IT.UTF-8.src b/share/timedef/ca_IT.UTF-8.src index 5dfd3841d9af..a85dd8c4b942 100644 --- a/share/timedef/ca_IT.UTF-8.src +++ b/share/timedef/ca_IT.UTF-8.src @@ -63,7 +63,7 @@ a. m. p. m. # # date_fmt -%A, %e de %B de %Y, %X %Z +%A, %e %B de %Y, %X %Z # # Long month names (without case ending) de gener From nobody Fri Nov 22 04:53:56 2024 X-Original-To: dev-commits-src-branches@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 4XvjRm740zz5dM8b; Fri, 22 Nov 2024 04:53:56 +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 4XvjRm4KwXz4vSx; Fri, 22 Nov 2024 04:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251236; 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=DqqUxqhXhfr+qFH3VruGzHIrWHTRZ6AdWsYUKlLXQ4w=; b=cbA5sFE7MQyqqrA6lX8hV8mZG9dgX3VMHqxzl2fKsmf8+FftdmCdPglL74Sv42aDVD/4oJ nQuUni3Wn5MrjYJk7b8WzuVs/vvolIKJSKvqxqWjutuz5BBvKThMLBnLmhX7VQX/XMFBgM w0fDK7eFpeXpIju6cG0KEmy1aLKqqXtwCq+8NFWaSGaSEc/QFdiEb+2cuTCcCzq9u7aS+H qW/lA2Dg+5AYELnuDd2QpbY1oTwp8g1eit9SHyVuWWL0eVR4YZ8BWA9CNobRVl4A6maboY rFZPECcZErfvNgLQv20AoxNT7EMvTWmf60mwJ0VyLblf78nTQEtAhAB5mBiJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251236; 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=DqqUxqhXhfr+qFH3VruGzHIrWHTRZ6AdWsYUKlLXQ4w=; b=DG7ozNOytCE+0NLcrXKbI7newTbVP9sgkApnMuSiVM2zYrAn5xdb0wxgK31RtFR6Txs4om xUhSF8dOrK2MoWtyb026f3RyXk2LIbipEH7TvXIQ8TAtXvHGYaPhdczF7bcpQbD3qhNra7 8R1Fbr2DgoOozDz0C08tXJ6JTrV5lR/0XDm6FINajfsf1v/AMrmtG8ekXqMZ7DXLLCREm+ kDO8HWMvUqRYfS/qM9l1kKHNoDSNwksYwne61+qp6UNFWcA/8SqVjWUdxF62/17A4qbeVP CUI788JbjUUJfosYUtH19Y9wmts52TMTeB6AN7YJEWQHgp64oKE1OYaksRWJ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251236; a=rsa-sha256; cv=none; b=l30sjRPHfwBR2qJs3jCybP/9MF+idn3M2Kif/eC71sKtA3o3E0J+o/aE9tCHR1oP7p1S8J 6oaowlt7sWnrzM2R4dgsJBtYcQe26iI5vF2BoQzNIq6sLXyGyIj8MFIyTbF14Gx43bZ2XL ia4hMVQO5/LdkLscdijbXxj4f/qwgH1Vn74Wy+U5utLayft0yliAZs+aHwDljO4i0bg39T DuEBu7hWBNWtqIE5BAFuD3EpHXAGh6KO0g9g8tw9rxTkz4tiXgLUACQmzjLKfc8jR5mKwL Yqfd2UH3Ztd2+8AVe4oWvj1NVwMo2UOfsR65mY11kF7oGtprU6xzeLiNcmVmFA== 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 4XvjRm3KMyz193j; Fri, 22 Nov 2024 04:53:56 +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 4AM4ruJx035165; Fri, 22 Nov 2024 04:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4rurP035162; Fri, 22 Nov 2024 04:53:56 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:53:56 GMT Message-Id: <202411220453.4AM4rurP035162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7951b4f4f99c - stable/13 - _utmx_op: don't recurse on chain busy List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7951b4f4f99cc6e2cbd51c516dc083e031c3babf Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7951b4f4f99cc6e2cbd51c516dc083e031c3babf commit 7951b4f4f99cc6e2cbd51c516dc083e031c3babf Author: Kyle Evans AuthorDate: 2024-11-13 22:18:40 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:53:44 +0000 _utmx_op: don't recurse on chain busy In handling a PP mutex, we'll busy it as soon as we enter the loop and unbusy it either prior to sleeping or at exit time. In this particular case, if we fail to transition the mutex from OWNERDEAD -> owned because of casueword(9) failure and the suspend check fails, we'll start over and attempt to busy an already-busied chain and irrecoverably lock up both this thread and anything else that tries to busy the chain. Unbusy the chain prior to restarting because I couldn't decide if that was a better or worse idea than just keeping track of whether we dirtied it in do_lock_pp() and avoiding re-dirty. This is marginally easier to reason about as it returns us to expected state on entry to the loop. While we're here, simplify the code a bit as `error` will be clobbered right after the branch anyways. Reviewed by: kib, olce (both earlier version) (cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e) --- sys/kern/kern_umtx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 23087cf4269e..61b86d0b62b1 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2605,11 +2605,9 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, */ if (error == 0) { error = thread_check_susp(td, false); - if (error == 0) { - if (try != 0) - error = EBUSY; - else - continue; + if (error == 0 && try == 0) { + umtxq_unbusy_unlocked(&uq->uq_key); + continue; } error = 0; } From nobody Fri Nov 22 04:55:24 2024 X-Original-To: dev-commits-src-branches@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 4XvjTS5gQPz5dM94; Fri, 22 Nov 2024 04:55:24 +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 4XvjTS56dcz3x9b; Fri, 22 Nov 2024 04:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251324; 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=jAzNpD4mEMtkuvzRuk0xGTKbcDigfNwxjGldXCBZ7H8=; b=l/16QeSjXLtWfBPYKZGnPRJQKP9GPTpjkRSdz70eho0m6722GcF+nOPG6v1Z6Hxxh9MT/R /9Y0aXvsUbpl7e69U6CUPjIYOF0E65hsr/gwESRsUb3VLVOneMhyi6jASg/feUvJpzwUvq kz99Cdt81oDBeWzpsMRoPRlQxl6twwmaLzMwsTcX609GgBAxzQJEX8L1u1XLE+9uBnmWRh CHUxiBYM1KdKRhZ1rZDucJvQorJuLhkHTuTtWIwjaOcBDHl3i8pLYezwRFIUvaIc3t+6Es QcvS4eNsEp7lbuot80hsIgywwavbt8FLG6BiEaMz0qyTeH8HPjsL7+/kK37nKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251324; 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=jAzNpD4mEMtkuvzRuk0xGTKbcDigfNwxjGldXCBZ7H8=; b=FptWShGwOgb+o8L55gb7e8yKZPgoM2uzrDf1OrHIJUgxc8XqmaFKFU9f2I7a1LHJxkNcvv yiOMET0gnbHLwtMGWofOflDzjjdVdnnA+Dv9CMMXfxHkv0DED4G7wNhEaoGXKMHa6en7Zy e5KS9tj0dBYq6/7fG3+F1CxWmPHYkVO2JsH73M3OdUb/BsOpCb+EDOElAFQ61SGn+kDpbB UNwpXYL75UO0OJitXj8gEXn/5SCHgTGRnK2N9dyu0FczfXVL67Qsn+civIPm16noDfj1m7 1MEOXe3batE1GIUUVFAdXwzp99ETg6MCjn9M73dOE4aZYtkwbAOd0IN5NqoVpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251324; a=rsa-sha256; cv=none; b=yAxhLpcOgH284/nOKVxLeMbQy7gJ5aIcc4hro3uRDokQVJpKdxVv6R7GN7Guv9EdB7/2YW 59wgy8nCOPts+ktt/PWVXt0oq3GM4g07lQ9mbgWxCQfMtX3ZhDyDVliD1+FOQkcteYkM7C s1OMBNpgSWvdV+0J8KgSDzqSjuuGjRFHY4qcsQtuDdREkpZR4kdP0+Pkz0h6lOzWWBNWc7 bP5bt78OAzL9+btHnpO8kLrCvU7s/PiSR+HJV70RSPB9uzP0SSmtxVb1yphGQsztfxDgcs oiplQVBAHDLtELUzfskj/G9CbcTcQe+Zp7RaHBPI6FcGhFqn0a1214H+blk1Nw== 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 4XvjTS42Y6z19Cr; Fri, 22 Nov 2024 04:55:24 +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 4AM4tOl9035771; Fri, 22 Nov 2024 04:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4tOHP035768; Fri, 22 Nov 2024 04:55:24 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:55:24 GMT Message-Id: <202411220455.4AM4tOHP035768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 654292c0d683 - stable/14 - libthr: add some tests for pthread_atfork() handling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 654292c0d683fb7805df7f876693e125250024bb Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=654292c0d683fb7805df7f876693e125250024bb commit 654292c0d683fb7805df7f876693e125250024bb Author: Kyle Evans AuthorDate: 2024-11-14 01:33:36 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:54:52 +0000 libthr: add some tests for pthread_atfork() handling Test that it generally functions, and also that registering multiple times calls each handler in the order that it's documented to call them in. Reviewed by: kib, markj (cherry picked from commit 7e6ac503ffeb81733272d54af367db58e45e57ca) --- lib/libthr/tests/Makefile | 1 + lib/libthr/tests/atfork_test.c | 227 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 228 insertions(+) diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index d882ccfd877c..34e48c63d197 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -34,6 +34,7 @@ NETBSD_ATF_TESTS_SH+= cancel_test NETBSD_ATF_TESTS_SH+= exit_test NETBSD_ATF_TESTS_SH+= resolv_test +ATF_TESTS_C+= atfork_test ATF_TESTS_C+= umtx_op_test ATF_TESTS_C+= pthread_sigqueue_test diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c new file mode 100644 index 000000000000..5133330b1247 --- /dev/null +++ b/lib/libthr/tests/atfork_test.c @@ -0,0 +1,227 @@ +/*- + * + * Copyright (C) 2024 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define EXIT_NOPREPARE 1 +#define EXIT_CALLEDPARENT 2 +#define EXIT_NOCHILD 3 +#define EXIT_BADORDER 4 + +static int child; +static int forked; +static int parent; + +static void +basic_prepare(void) +{ + ATF_REQUIRE(parent == 0); + forked++; +} + +static void +basic_parent(void) +{ + ATF_REQUIRE(forked != 0); + parent++; +} + +static void +basic_child(void) +{ + if (!forked) + _exit(EXIT_NOPREPARE); + if (parent != 0) + _exit(EXIT_CALLEDPARENT); + child++; +} + +/* + * In the basic test, we'll register just once and set some globals to confirm + * that the prepare/parent callbacks were executed as expected. The child will + * use its exit status to communicate to us if the callback was not executed + * properly since we cannot assert there. This is a subset of the + * multi-callback test, but separated out so that it's more obvious from running + * the atfork_test if pthread_atfork() is completely broken or just + * out-of-order. + */ +ATF_TC(basic_atfork); +ATF_TC_HEAD(basic_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks invocation of all three atfork callbacks"); +} +ATF_TC_BODY(basic_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(basic_prepare, basic_parent, basic_child); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_NOPREPARE ? "did not see `prepare` execute" : + (status == EXIT_CALLEDPARENT ? "observed `parent` executing" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery"))); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +static void +multi_assert(bool cond, bool can_assert) +{ + if (can_assert) + ATF_REQUIRE((cond)); + else if (!(cond)) + _exit(EXIT_BADORDER); +} + +static void +multi_bump(int *var, int bit, bool can_assert) +{ + int mask, val; + + mask = (1 << (bit - 1)); + val = *var; + + /* + * Every bit below this one must be set, and none of the upper bits + * should be set. + */ + multi_assert((val & mask) == 0, can_assert); + if (bit == 1) + multi_assert(val == 0, can_assert); + else + multi_assert((val & ~mask) == (mask - 1), can_assert); + + *var |= mask; +} + +static void +multi_prepare1(void) +{ + /* + * The bits are flipped for prepare because it's supposed to be called + * in the reverse order of registration. + */ + multi_bump(&forked, 2, true); +} +static void +multi_prepare2(void) +{ + multi_bump(&forked, 1, true); +} + +static void +multi_parent1(void) +{ + multi_bump(&parent, 1, true); +} +static void +multi_parent2(void) +{ + multi_bump(&parent, 2, true); +} + +static void +multi_child1(void) +{ + multi_bump(&child, 1, false); +} +static void +multi_child2(void) +{ + multi_bump(&child, 2, false); +} + +/* + * The multi-atfork test works much like the basic one, but it registers + * multiple times and enforces an order. The child still does just as strict + * of tests as the parent and continues to communicate the results of those + * tests back via its exit status. + */ +ATF_TC(multi_atfork); +ATF_TC_HEAD(multi_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that multiple callbacks are called in the documented order"); +} +ATF_TC_BODY(multi_atfork, tc) +{ + pid_t p, wpid; + int status; + + pthread_atfork(multi_prepare1, multi_parent1, multi_child1); + pthread_atfork(multi_prepare2, multi_parent2, multi_child2); + + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(child != 0 ? 0 : EXIT_NOCHILD); + + /* + * The child can't use any of our standard atf-c(3) macros, so we have + * to rely on the exit status to convey any shenanigans. + */ + while ((wpid = waitpid(p, &status, 0)) != p) { + ATF_REQUIRE_ERRNO(EINTR, wpid == -1); + if (wpid == -1) + continue; + } + + ATF_REQUIRE_MSG(WIFEXITED(status), + "child did not exit cleanly, status %x", status); + + status = WEXITSTATUS(status); + ATF_REQUIRE_MSG(status == 0, "atfork in child %s", + status == EXIT_BADORDER ? "called in wrong order" : + (status == EXIT_NOCHILD ? "did not see `child` execute" : + "mystery")); + + ATF_REQUIRE(forked != 0); + ATF_REQUIRE(parent != 0); + ATF_REQUIRE(child == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic_atfork); + ATF_TP_ADD_TC(tp, multi_atfork); + return (atf_no_error()); +} From nobody Fri Nov 22 04:55:25 2024 X-Original-To: dev-commits-src-branches@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 4XvjTV0q0kz5dLq2; Fri, 22 Nov 2024 04:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvjTT6PNcz3xCk; Fri, 22 Nov 2024 04:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251325; 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=ipqirr36YpVFfsK2gnDrYDuCuHMjmM89NeNCpMIzRSc=; b=UzXJ7ov30mu9O8SkyVy+edF5vetFnl5Yt5V7rC1+EQMWtHEx6OxWoXEW+nnvjP2l1WBuev 5XtlmkA5jQJRmNWyjedkIbtcfglVw1SgwhbPaPgAg1mKIrLKDdYrktzN4WM8HUGKp9UG2p j2TS9mgLk84jYn4rXFQsIo+ytR6lhkgES0beqBBz089bstsG3AoBr0oRikAhwl9VXbmfL0 uEH09F1f4CyxyyoVTaU2oAm+XEeLGIQUjTgVLG1fpnjHzQPe97bY3IWPDGYUoDNjtXXe/U umoKfcUY+Qih2NVgsRWmjvk5GpBC2HSD4ckSl5AqmDfhoeTi04wgTMO5jld8bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732251325; 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=ipqirr36YpVFfsK2gnDrYDuCuHMjmM89NeNCpMIzRSc=; b=flc522COV/sN9fkepRly89FQz5MnVMRO79ltdFcOEoO1FHZPx6h652CShz+pKGGGeR0JmM 9z2iba8RGZPFhLHhWSzaPaS/w6/48OMPhqwBnf/+kIgtKFGw1kPIJtr02vv+N1QDt8ey4y o8/6zci/IL1dN8RqAqvxdiwFbi2r7VnE+O1Sa7doyBjI4glaxIksCTlhEvv+WiGd7CwB8B 4rBA1CFpJ8OBwys0Wl5xE+I+DKD/hQNU/3LJy+iVGiRtnTV2KYlJswkqsfov+juSczXZsU /gS02ZcV+qFB1a+yAxjAuShnNasZeQ5OsrcJjWD8M7UGwcUUqalYjAj3utw6Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732251325; a=rsa-sha256; cv=none; b=g6puHfV7lvkOBRivD1bNHq+VmcfzWym5Ct0pUxlATEjd8lRhgVWaFm6gs/aWU2VOiAinGj dMTFh2GRfI8uEzk49MDlVL7w/GJ+emiiUusw6LixI3EEKQYvRDegIqRb/5JMWEbf1yMzLP MWnSJfXc1k6yo7bU/7fCljyCBegYbt0H92gBrBsYLJAw35Hp8aiEzXbrEd2FR5dxKlMXTz p+VeYfSr0T/DfS8yikPdVn8BFnQsTflDtxBxGh2IUP1NeceNnNNjwObCRCWRVF1AUOMQaG qN5jxi8xylkKsqg9VjbvLb+U5UO5AOUnbXIC4NpVx0a5dh65PbuDHuofVjAhDA== 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 4XvjTT52J5z19Hd; Fri, 22 Nov 2024 04:55:25 +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 4AM4tP64035817; Fri, 22 Nov 2024 04:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AM4tPqg035814; Fri, 22 Nov 2024 04:55:25 GMT (envelope-from git) Date: Fri, 22 Nov 2024 04:55:25 GMT Message-Id: <202411220455.4AM4tPqg035814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c5a7b5882ae2 - stable/14 - libthr: allow very early atfork registration List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c5a7b5882ae28932f79c29678fae36498467e8ea Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c5a7b5882ae28932f79c29678fae36498467e8ea commit c5a7b5882ae28932f79c29678fae36498467e8ea Author: Kyle Evans AuthorDate: 2024-11-14 01:33:44 +0000 Commit: Kyle Evans CommitDate: 2024-11-22 04:54:55 +0000 libthr: allow very early atfork registration LSan wants to be able to register atfork handlers at __lsan_init time, which can happen either at the first intercepted function call or in a .preinit_array function. Both of these end up being very early in rtld and executed with the bind lock held, which ends up causing problems when we go to _libpthread_init(). Instead of requiring libpthread to be initialized, just insert the new atfork handler straight into the list if it's not ready yet. The critical section and locking should not be necessary if we're really executing this early, as there won't be any threads to contend with. Reviewed by: kib (earlier version), markj (cherry picked from commit 4b202f4faf40fd7af8b84491360186aed8ce5733) --- lib/libthr/tests/atfork_test.c | 53 ++++++++++++++++++++++++++++++++++++++++++ lib/libthr/thread/thr_fork.c | 20 +++++++++------- lib/libthr/thread/thr_init.c | 1 - 3 files changed, 65 insertions(+), 9 deletions(-) diff --git a/lib/libthr/tests/atfork_test.c b/lib/libthr/tests/atfork_test.c index 5133330b1247..cb0fcb7e62db 100644 --- a/lib/libthr/tests/atfork_test.c +++ b/lib/libthr/tests/atfork_test.c @@ -25,6 +25,58 @@ static int child; static int forked; static int parent; +/* + * We'll disable prefork unless we're specifically running the preinit test to + * be sure that we don't mess up any other tests' results. + */ +static bool prefork_enabled; + +static void +prefork(void) +{ + if (prefork_enabled) + forked++; +} + +static void +registrar(void) +{ + pthread_atfork(prefork, NULL, NULL); +} + +static __attribute__((section(".preinit_array"), used)) +void (*preinitfn)(void) = ®istrar; + +/* + * preinit_atfork() just enables the prepare handler that we registered in a + * .preinit_array entry and checks that forking actually invoked that callback. + * We don't bother testing all three callbacks here because the implementation + * doesn't really lend itself to the kind of error where we only have a partial + * set of callbacks registered. + */ +ATF_TC(preinit_atfork); +ATF_TC_HEAD(preinit_atfork, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks that atfork callbacks may be registered in .preinit_array functions"); +} +ATF_TC_BODY(preinit_atfork, tc) +{ + pid_t p; + + (void)signal(SIGCHLD, SIG_IGN); + prefork_enabled = true; + p = fork(); + + ATF_REQUIRE(p >= 0); + if (p == 0) + _exit(0); + + prefork_enabled = false; + + ATF_REQUIRE(forked != 0); +} + static void basic_prepare(void) { @@ -221,6 +273,7 @@ ATF_TC_BODY(multi_atfork, tc) ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, preinit_atfork); ATF_TP_ADD_TC(tp, basic_atfork); ATF_TP_ADD_TC(tp, multi_atfork); return (atf_no_error()); diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index 614841cc314f..aa54b0444cf4 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -84,20 +84,24 @@ _thr_atfork(void (*prepare)(void), void (*parent)(void), struct pthread *curthread; struct pthread_atfork *af; - _thr_check_init(); - if ((af = malloc(sizeof(struct pthread_atfork))) == NULL) return (ENOMEM); - curthread = _get_curthread(); af->prepare = prepare; af->parent = parent; af->child = child; - THR_CRITICAL_ENTER(curthread); - _thr_rwl_wrlock(&_thr_atfork_lock); - TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); - _thr_rwl_unlock(&_thr_atfork_lock); - THR_CRITICAL_LEAVE(curthread); + + if (_thr_initial != NULL) { + curthread = _get_curthread(); + THR_CRITICAL_ENTER(curthread); + _thr_rwl_wrlock(&_thr_atfork_lock); + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + _thr_rwl_unlock(&_thr_atfork_lock); + THR_CRITICAL_LEAVE(curthread); + } else { + TAILQ_INSERT_TAIL(&_thr_atfork_list, af, qe); + } + return (0); } diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 007cf5be81c9..ff59288d919e 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -519,7 +519,6 @@ init_private(void) env = getenv("LIBPTHREAD_QUEUE_FIFO"); if (env) _thr_queuefifo = atoi(env); - TAILQ_INIT(&_thr_atfork_list); env = getenv("LIBPTHREAD_UMTX_MIN_TIMEOUT"); if (env) { char *endptr; From nobody Fri Nov 22 15:38:06 2024 X-Original-To: dev-commits-src-branches@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 4Xvzl2662Nz5f2dY; Fri, 22 Nov 2024 15:38:06 +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 4Xvzl25b0Lz3x7x; Fri, 22 Nov 2024 15:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289886; 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=iwtp0PXRvxMR+acIooIIwuWGH86blRZLdREZKI8/PNg=; b=xXNIBxKMVN4vmOr92Nzy1AccpkmlKcfDNpl7S8Zaz/3EveAnts9DOb6V7PpolWtay3uyOo PZh4Ry1e48zWin17yj60QZOYjjLfBOppN3jcvstUvD5uMxcdXnlZeZzN4fL3UQm8xC1dPV Pg7P6UbZw13HyapNUGsADtVthPEYyT6hu3nT5LW3wcJEtELRFE66g7iZoJQ7LEPvWfowN7 5obEuekq2WVRevOkMUkPk5teUp5pcfl4KnLzU2xRNUCfAfmJJLbnaUESPzeoCpDKkB/L67 J+R1V4BZVGhLbn1KZoPyiKZj+FTs1v8PwsI9O/d3usGC6AOPYXQ9yXVA7nwAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289886; 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=iwtp0PXRvxMR+acIooIIwuWGH86blRZLdREZKI8/PNg=; b=n5ty648iCkEFFmGJoyJHa1h5+eOHuLm/jnKmqLlhM92gPsgXiTUVk20x4NPrppERixubvV H1GpokecPS1Bur6Gr6vGuFzmelMewYaqgXZm0Zmpq0Ts1iFepG6rx2fDJoJhR736REd61u rMx2X4eHCpn8Nm1Ez/tZ41w6Kb3qPiwiViCfRyoRnXaB1LRx8KFD+k0r91+LCFM3scNbi0 q2FQAm+riG6a1vomnJF3ABqwfWybF65GOqpRH71q24bsL1UKi/Ba6uubvTXIVAJrM14UQo jDwoFUzg289XofQrbmMuVgW/LHR4eI7RJyqzTwUaMLBMS88JS0YEoHz7SX7TiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732289886; a=rsa-sha256; cv=none; b=CEzQZmlKup5tgqSP8sN4v2wLCepC3ES0VhyaJoWI9wh03WRYPw+AsovS8LB6TXUxG/qdfp Mxvfg5+y9Wbjq90746yKv+SNWIDvMhsPJruH1K87IGTgiQdVgIwLKU6SN6Y6hLIecaoPa2 ACt2ZCosVlUUo0PFDLzAwkunKBrlL9wgQIKDXUkFg3tBGj6wvXpPnfyAelcNpSe89oK6dn FUwCf7BfBcvAms71BdM7K1DDSV2EKkbDXy60jcn7skUb/yQ9hmFAwf1+kSD8HgvXPXDMDJ fRf/eDzvMiRI+nZNbEcBe4nFGZ79xoAmaR2p1owB/IXzeEdGq9WiBbnYt+LoUg== 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 4Xvzl24nH2zW3p; Fri, 22 Nov 2024 15:38:06 +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 4AMFc6Ef035992; Fri, 22 Nov 2024 15:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFc6Cf035989; Fri, 22 Nov 2024 15:38:06 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:38:06 GMT Message-Id: <202411221538.4AMFc6Cf035989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: d39e0bdc6b76 - stable/14 - rtld/arm: fix initial-exec (IE) thread-local storage relocation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d39e0bdc6b765f9b2fca24fb67951b12ec47348e Auto-Submitted: auto-generated The branch stable/14 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=d39e0bdc6b765f9b2fca24fb67951b12ec47348e commit d39e0bdc6b765f9b2fca24fb67951b12ec47348e Author: R. Christian McDonald AuthorDate: 2023-11-03 12:56:58 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:35:06 +0000 rtld/arm: fix initial-exec (IE) thread-local storage relocation net/frr[89] revealed an interesting edge-case on arm when dynamically linking a shared library that declares more than one static TLS variable with at least one using the "initial-exec" TLS model. In the case of frr[89], this library was libfrr.so which essentially does the following: #include #include "lib.h" static __thread int *a __attribute__((tls_model("initial-exec"))); void lib_test() { static __thread int b = -1; printf("&a = %p\n", &a); printf(" a = %p\n", a); printf("\n"); printf("&b = %p\n", &b); printf(" b = %d\n", b); } Allocates a file scoped `static __thread` pointer with tls_model("initial-exec") and later a block scoped TLS int. Notice in the above minimal reproducer, `b == -1`. The relocation process does the wrong thing and ends up pointing both `a` and `b` at the same place in memory. The output of the above in the broken state is: &a = 0x4009c018 a = 0xffffffff &b = 0x4009c018 b = -1 With the patch applied, the output becomes: &a = 0x4009c01c a = 0x0 &b = 0x4009c018 b = -1 Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42415/ (cherry picked from commit 98fd69f0090da73d9d0451bd769d7752468284c6) --- libexec/rtld-elf/arm/reloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index c3e95940be74..6efc9f499761 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -280,10 +280,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; - if (__predict_true(RELOC_ALIGNED_P(where))) + if (__predict_true(RELOC_ALIGNED_P(where))) { + tmp += *where; *where = tmp; - else + } else { + tmp += load_ptr(where); store_ptr(where, tmp); + } dbg("TLS_TPOFF32 %s in %s --> %p", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)tmp); From nobody Fri Nov 22 15:38:07 2024 X-Original-To: dev-commits-src-branches@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 4Xvzl36xW7z5f2H6; Fri, 22 Nov 2024 15:38:07 +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 4Xvzl35fsnz3x4v; Fri, 22 Nov 2024 15:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289887; 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=dHa4CeLbg10cfwQBGq5ey1i6i10etQfPDIb9L+vw2LI=; b=yxK3BxLco33sBGJDnp2ZSFy1LOiqqx0hSlpCTELpSm/E4NuUhFY+iXXJeqaEHHRgrTbFF4 Z6fkAtyVCc7M1aFyGV+KOcotDvKTzv7F+dfsIrm2GND6F4z++AXl6QzQCe1y1oouXfM7+C i8znbJW7/u0DbfdwoM0tjCLdEwhMUdZqIaTfzm8RsB845PLU1ZZusLJ1itVvjRfEOgBfzr ze9eydU0kmL7wjf/7imivEqxadNdbLsBpRmIJLUBDlVgTcYSj9hL05MhRVZ79WXKtShM6Z JiYgkHHE6LL1eCMYX8jQl+uA6YLKko3bhqgKQudJZt4Tem+2wU/G0OwadZIxGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732289887; 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=dHa4CeLbg10cfwQBGq5ey1i6i10etQfPDIb9L+vw2LI=; b=npm27ZVIPhYZqiZMyCcYJ+E5YMca3XqfoMs+gVIZTPaVKpLd10Fqzz+/cBFnV3RJPty9pv j4oEM+P2wEBxrvOXbJ84+VL+3Rm9Gu+Wl8+AIYqCYLObezleByoId7L/Shsq3NIrT6J8Yu aMkMxcbvCwsd0hebTHUnv/Jn0XdrcThOOcZ2cFt5DOUaYc/xQtTF9oPUWvS2iLqTSeA8Xq rCc9ZmfFao0VH+tiFHXsWEg6zrKfgpR16hxQzrjyVw//Fr6DfixfmAqvUcsfshHZV2585m 8EVbUp6zIhP7did7LX2WgcdCyF8bW1N30ry52/ih3qqgjhitkRim+RvCmg4o7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732289887; a=rsa-sha256; cv=none; b=r6p2yiRQUDtPdMsGMNgZbPpJUJVZe0NbJnK0v4QyFkrWLlpZcwlQNA7RRDFl2o41lBmo0i c+MJ50eKp8ca2Te2L7JswZG33KkCClY62g1fnltHxIaPsv+773QzJZ47WSFoBLAcThaT0K 9oQQ14mWi3Ig6IAdpKJ6H5p13Su/JXMGbHxiq6hKiTJ305ui+WMIrkEaRYLBcUu8W6Ipz0 TBxaBxCdpo09imzD4EAjmhLOEotUJlYZyReInHqd7ZC7zDon1Ai4UUpkFS9nl5QENqzbTc rwg51vj9MX+JtEVngCWN8gJf1jPL+OUSkedw4Qa/DV5WizdO927PdswCgfwrGA== 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 4Xvzl35GL2zWPt; Fri, 22 Nov 2024 15:38:07 +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 4AMFc7uo036085; Fri, 22 Nov 2024 15:38:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFc755036082; Fri, 22 Nov 2024 15:38:07 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:38:07 GMT Message-Id: <202411221538.4AMFc755036082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: f424c4a907e1 - stable/14 - libc: enable initial-exec (IE) as default thread-local storage model on arm List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f424c4a907e12259fbc148d1dd0be13cf4025916 Auto-Submitted: auto-generated The branch stable/14 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=f424c4a907e12259fbc148d1dd0be13cf4025916 commit f424c4a907e12259fbc148d1dd0be13cf4025916 Author: R. Christian McDonald AuthorDate: 2023-11-09 20:22:21 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:36:32 +0000 libc: enable initial-exec (IE) as default thread-local storage model on arm As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this patch enables IE as default thread-local storage model in libc on arm. Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42445 (cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a) --- lib/libc/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index fbfd6619784d..d887e0808ceb 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -54,11 +54,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # Use a more efficient TLS model for libc since we can reasonably assume that # it will be loaded during program startup. -.if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ - ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ - ${LIBC_ARCH:Mpowerpc*} != "" CFLAGS+= -ftls-model=initial-exec -.endif # # Link with static libcompiler_rt.a. From nobody Fri Nov 22 15:42:14 2024 X-Original-To: dev-commits-src-branches@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 4Xvzqp72lSz5f2SV; Fri, 22 Nov 2024 15:42:14 +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 4Xvzqp6V24z3y5s; Fri, 22 Nov 2024 15:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290134; 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=+r9di2uGoX99aJmsL/QeLbG6+1mOewfDaWtb2m+2FC8=; b=czjRDtgYD1HGoQ4MFd/chYjawyjAl8pzQTCkc35A6+6avQzrRp5nAZ7B3TS5E38K7vVaqO sWVZ4l0fVNrNhIc1IJ8F/BDNARSLWrLqdwaGd5K9NFnkQvAcMbgqaX8X/gOZeP3yDdq/NH ojQmWfnYCbv9Ti14cWOZuxXO0Mg0KN2GNooXxIkPtXVAz0ozU9PZUX68XynuLX966Q4S+B 92zP2T+CC2mTiLJby73UuYkmtpj6yS6wgSxrkAniqyttV7FTNKCsAjcYp1GBXIABZsiNZO HD6OQLAunKrGauB7ADDJyUfo1K6hteeN5mqBO+5BQFGz6o5QMoJxVszU/HzM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290134; 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=+r9di2uGoX99aJmsL/QeLbG6+1mOewfDaWtb2m+2FC8=; b=XA1sn9coZokFXTnU3t27t1Zut+tX11JWeYpfOkXloh4+yaixbId9WIDT+VIh/kvyj4HqCJ E2G7e735Cw/NWOTUYUsH3vOS5/LNaumw0tuip0Y4aai5I4xMzmY+KoZ5LWUdNeSYym6Yhh Bl0QbrHsjD9DGA1LX0/Uu2syrPHEiBithJgYtbka1E2P5PTnJcA0+qUFrSXUB8cZW3TXhI a3MKw+cRWKhbhhwYscjD1h+rmilkIpzOz6tzc4Xisflx3S64/mLnyG/qWRoxoaglhgUpAw toZu9xuez0XElmgLi32zBiZZCjutEkN56BFCh7Z6ELqFdnZBD8T2G0yDzWZsCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732290134; a=rsa-sha256; cv=none; b=qdmWBXV4FDi54kuzeM5LPJ4HqsjXw7NaZccyOLBylZ4M8+A37WyVds1MnrmEq2/gkiKZy8 hJj+kbfrQVF3yzyHuk0BAdptYsLkiatF1g4rJcAERPUlsUModPqR3Y6UV+so4qOaK+yAx5 MyLAAe2XM8yLWj/AFz/zKHG5QIf0rISkMCBjTbLTZrUzmkNfC+7lJ9S1BoUUz6zlbx91ss 0ui2BWEzozhjHfOITIZhfLeg4MLLEAA+dKaGun6LgPOVeamcCypVjDp3EZEZ05ATWwUlCy cbY7XJ7dwgjZiRfg0GHeQa19hjNonPdX0fOK1OcBWmat4S7hj+L518737rpYog== 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 4Xvzqp5pFszWZ7; Fri, 22 Nov 2024 15:42:14 +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 4AMFgEUl052384; Fri, 22 Nov 2024 15:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFgEl9052381; Fri, 22 Nov 2024 15:42:14 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:42:14 GMT Message-Id: <202411221542.4AMFgEl9052381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: e10cca68cf34 - stable/13 - rtld/arm: fix initial-exec (IE) thread-local storage relocation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e10cca68cf349d11bc5c6474b792529bffc789cf Auto-Submitted: auto-generated The branch stable/13 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=e10cca68cf349d11bc5c6474b792529bffc789cf commit e10cca68cf349d11bc5c6474b792529bffc789cf Author: R. Christian McDonald AuthorDate: 2023-11-03 12:56:58 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:41:10 +0000 rtld/arm: fix initial-exec (IE) thread-local storage relocation net/frr[89] revealed an interesting edge-case on arm when dynamically linking a shared library that declares more than one static TLS variable with at least one using the "initial-exec" TLS model. In the case of frr[89], this library was libfrr.so which essentially does the following: #include #include "lib.h" static __thread int *a __attribute__((tls_model("initial-exec"))); void lib_test() { static __thread int b = -1; printf("&a = %p\n", &a); printf(" a = %p\n", a); printf("\n"); printf("&b = %p\n", &b); printf(" b = %d\n", b); } Allocates a file scoped `static __thread` pointer with tls_model("initial-exec") and later a block scoped TLS int. Notice in the above minimal reproducer, `b == -1`. The relocation process does the wrong thing and ends up pointing both `a` and `b` at the same place in memory. The output of the above in the broken state is: &a = 0x4009c018 a = 0xffffffff &b = 0x4009c018 b = -1 With the patch applied, the output becomes: &a = 0x4009c01c a = 0x0 &b = 0x4009c018 b = -1 Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42415/ (cherry picked from commit 98fd69f0090da73d9d0451bd769d7752468284c6) --- libexec/rtld-elf/arm/reloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index e2dc7f8c9eb9..b62a62c5b116 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -322,10 +322,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; - if (__predict_true(RELOC_ALIGNED_P(where))) + if (__predict_true(RELOC_ALIGNED_P(where))) { + tmp += *where; *where = tmp; - else + } else { + tmp += load_ptr(where); store_ptr(where, tmp); + } dbg("TLS_TPOFF32 %s in %s --> %p", obj->strtab + obj->symtab[symnum].st_name, obj->path, (void *)tmp); From nobody Fri Nov 22 15:42:15 2024 X-Original-To: dev-commits-src-branches@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 4Xvzqr20sPz5f2kn; Fri, 22 Nov 2024 15:42:16 +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 4Xvzqr0R64z3yhj; Fri, 22 Nov 2024 15:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290136; 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=69BRMs9Se7gNilHyaupdLZA1MjAiBx5Y1VwZEz9oz+I=; b=yaHd9wSEPI81XJV7jru6/1oEctwlxfqmDF8fRedB7L1VUndaHCtmG6e2XmaASw9SK99vLH wEMB1e7BGGw2DTaf6XxDCaG5QvwBD2m7AT/EyI71XQx2oIJLFizG8KUhV0hcHdxAjAetuz 9uoN7dNJwUS8WlzJQVNqbbR4nP2C45A5Qa4gdcZHFGpByFGQ2EAbIWoEVSfj9lznfXvQyQ Qpskn1JcQHDieuwdSM64mFFKAy6sgORryPaUN1AticEN+jYAzo+U/b+L+LB6jSSKCJJgM4 5Pg3R7eCE2NC14QMqFSveV2f7S39+kg/ZG0WZ70cpY/EJppXSIO68M3V8+92WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732290136; 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=69BRMs9Se7gNilHyaupdLZA1MjAiBx5Y1VwZEz9oz+I=; b=U4cHNhi4RZ/hDYxTAppjhR0A1jl/vuvnaF2l06qb15ILVG9mw2HUw5/avnc1Y69J1pc2Lx 7V7LVrQVDdsg39KbTQ1YJdSldxr+Jy3iRqXKkkt+5aU/83cUxgUo9tPSyUd+ppn02EG8eE YYFq6BNaX3JrME1ImevvURxfbi+D6bGW4t2XSiferWX0CYQKi2Dk2LxKSrtoDVFmGgGn7L xc/S8H7rIqwO4/iQvBrQnRZEIwbV0PG4EgSCd4KA4Jw+iEFCUt2wbRUS17Mmsn5OQlyR1X TS2WxT4wDOYB9SZ3oX2/XDfUM9aFj0qEZGmsnvEPdb+5P2Bc4H1b6dpuvk+h9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732290136; a=rsa-sha256; cv=none; b=ha2GDsKkJZOyY66D4bzZMkhDEpkYiUFDaHfnL4yaIGJAk9Q/v6c8wymQaG3BZdKHi2ePPd 2DMTY/6hFRhdk9mvOvL60zEZDmHj9DIHH420CwiPPwixbwd7GKgWX+gdfQn6ey78vYV/UY gBTPG17jB6/jJ/BuLNllE4sOHh8355rOHzDSB7Tx/jaKpa68yx3RXMtZa7z8GD7RzSZXWt Zoh0/E+defCUs/GrMix5UWbqYdHNZcFst4WjYco9cX1FxAovNJLMHLg0wKkSjGDtFSYIdG s5qWgpjuShmz09YrvcOcsLeTSNQhxEEy0qCR+S8aXhohLO3nsHbwVfiCxIS/VA== 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 4Xvzqr03B0zWv4; Fri, 22 Nov 2024 15:42:16 +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 4AMFgFoV052447; Fri, 22 Nov 2024 15:42:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMFgF4o052444; Fri, 22 Nov 2024 15:42:15 GMT (envelope-from git) Date: Fri, 22 Nov 2024 15:42:15 GMT Message-Id: <202411221542.4AMFgF4o052444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "R. Christian McDonald" Subject: git: c364608261d1 - stable/13 - libc: enable initial-exec (IE) as default thread-local storage model on arm List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c364608261d17d2d6aa0ff64085bcf908b8fb5a0 Auto-Submitted: auto-generated The branch stable/13 has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=c364608261d17d2d6aa0ff64085bcf908b8fb5a0 commit c364608261d17d2d6aa0ff64085bcf908b8fb5a0 Author: R. Christian McDonald AuthorDate: 2023-11-09 20:22:21 +0000 Commit: R. Christian McDonald CommitDate: 2024-11-22 15:41:47 +0000 libc: enable initial-exec (IE) as default thread-local storage model on arm As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this patch enables IE as default thread-local storage model in libc on arm. Reviewed by: kib Approved by: kp (mentor) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42445 (cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a) --- lib/libc/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 9ea1f38d4076..5601b5432592 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -55,11 +55,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # Use a more efficient TLS model for libc since we can reasonably assume that # it will be loaded during program startup. -.if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ - ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ - ${LIBC_ARCH:Mpowerpc*} != "" CFLAGS+= -ftls-model=initial-exec -.endif # # Link with static libcompiler_rt.a. From nobody Fri Nov 22 19:37:36 2024 X-Original-To: dev-commits-src-branches@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 4Xw53N4FCmz5dH7X; Fri, 22 Nov 2024 19:37:36 +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 4Xw53N3Xg2z4RVM; Fri, 22 Nov 2024 19:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732304256; 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=bbbo8OJaC4PnBwRidh049rNiaiOG2aCYjOqWbwfj+ec=; b=GRGwPd688MhxpXds4Hb8VfS5NTivFKwp1pz9ka5paBnr5/sEj2MLm0s6gsrcszntXxJgQX 0v5iXcOAMhQZgQf+PIz2ii2Ir2bum5NhCSMjvMmmCGn8OlGsHqmEYjqhSvjVuc+7rOJSVU A2hZNf0J5VZIb6rJjWluwW0EMYN2z0JWmrsyG5AvgVPqnZzuH+Dj42wySrO+4VI6BDXiPW 7KMFl+m1ZVLSQZOqX5eUd+Oodw7PGBYeJtJMr3pJqTzt3NDuny1jJUCt52vSiDYifTBAGq z1tuiGr6CJR7KAJZiZvwxtyrqU5aedJimcPvAMgctWPDM2nTgKHKBy3W7D/YFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732304256; 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=bbbo8OJaC4PnBwRidh049rNiaiOG2aCYjOqWbwfj+ec=; b=CEhSWKbPDHixYEUq5pbKSuC9tmQW4xaZDE7ZOIBtOKnhwU2GGKcZDy5RQ2uT1T2yZ0tOW5 LNx4D7QgDyxw0mvL7Vh4ZzPS2hdV+4ZcZuQMzIYT6/SlNBjR9eY+1XE0TW24W619IHdxs9 JIezzw1pTQ4lUJ0J5FFvJj1KqdC0UXS+OfW1oQKDHVDK0s6XtEQKvppYrEvrClD/4a88CS gx0vfg4h47pDEBGz99Fb73qUDWTIIGCzv03WbBArZmBVL0i2KoTM68FOuMsa0Oq+u5n2dA 5Zb+eXbb27Uyj3gnXOGgdWZeVsDilWWvn/C17ccRgttwRLA97ZYQ/KDBT+JwnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732304256; a=rsa-sha256; cv=none; b=sREtnSUedTrUXp1KFk+ZZ7joiA4pftqzGvDHNiZiAYEkxKIGKtD2rj+5UF9lkM1NY38TNZ YA6e2nuYsyHtJ6I0nR50W3+/3BJv7qjRX62fQU5CnhBTUA10zOgeBhNfJYLgz9nQ6n9QNR rp2nOyw8FOufZlWecVjGgE6c4R+wZVpYeDOdk+kGvxnYA9Df0YEhwefm88GmCsxMpK+oSc bqmiDN4mFBAODtaMKa2f8ZvjTCH9IepNzLcVl7QdI01O5GaaTEy5eR8o9RwCm/DLEIUNm1 F1eMJb2LskYN0q3FK4Gd4yb9nqpgpWIfICNQAx85JFJnp2liCNRX6GI8K380EA== 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 4Xw53N31r0zdQJ; Fri, 22 Nov 2024 19:37:36 +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 4AMJbavE084562; Fri, 22 Nov 2024 19:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMJbab7084559; Fri, 22 Nov 2024 19:37:36 GMT (envelope-from git) Date: Fri, 22 Nov 2024 19:37:36 GMT Message-Id: <202411221937.4AMJbab7084559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c769f45a5709 - stable/14 - gvinum: Postpone removal to FreeBSD 15 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c769f45a57094a73931dbfd1f845ee473603e61e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c769f45a57094a73931dbfd1f845ee473603e61e commit c769f45a57094a73931dbfd1f845ee473603e61e Author: Ed Maste AuthorDate: 2022-12-12 16:57:12 +0000 Commit: Ed Maste CommitDate: 2024-11-22 19:37:18 +0000 gvinum: Postpone removal to FreeBSD 15 It was not removed for FreeBSD 14. Sponsored by: The FreeBSD Foundation (cherry picked from commit a5f7047f28654aa297c57a9d24f6d1408641b975) --- sbin/gvinum/gvinum.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/gvinum/gvinum.8 b/sbin/gvinum/gvinum.8 index 8bf2fcc92b8e..4176e6274a37 100644 --- a/sbin/gvinum/gvinum.8 +++ b/sbin/gvinum/gvinum.8 @@ -37,7 +37,7 @@ and associated .Xr geom 4 kernel support is deprecated, and may not be available in -.Fx 14.0 +.Fx 15.0 and later. Users are advised to migrate to .Xr gconcat 8 , From nobody Fri Nov 22 21:24:12 2024 X-Original-To: dev-commits-src-branches@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 4Xw7QN4kNfz5dPMB; Fri, 22 Nov 2024 21:24:12 +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 4Xw7QN46PXz4cpl; Fri, 22 Nov 2024 21:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; 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=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=UZHnfwcKXFbYz9OWPwKweYgjLkRSMNmib3skOskLNPJT0Pmjgyzz2GmudfFRTksyjdxdvj rpt7O8TWCBC/+YoYGBhVpbVpKibycVu42tA5Nt7xTOXsr2lsOHl5Alpyd+w8XezHS1y/AK G5gbUhyRIGcagTwNVZyAb+/jmsH6Jhdubh7DGt84yx7A6fmJ7I8QtyaKRjrVRMGIaVOiQn HX+w3uCTHw+xq759ulSBQxFSIOK7YLJuyX3aMGr3J7BJMO+rI1Cw8BPtLMhUJgX5LB7AeL LOzE05rWk9vc7ZXbHVXqCLwOu/RhEi2QLQ/uu8MEjwJPx8Md131Wkp2c9YGb6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310652; 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=z9sCAUyLyJEyVfzwGupVp2nk08vWcBLm8zUsibJhNQ8=; b=ioeP5cG1bIDqrN+QAezpNzZay1eme/4VVQwjNO4235ApyEieYrFWSORZkR+jOgYA1AB4b6 pabmzL87fQ7wBHf+vNKqWKV5omFYZTFkR3gZ5vs46D3Nj1s/Z58rGqoeYZ7MeE3BaVizjR DOY8hhottsc/iI8bMYNyeYWACH5AgvUyHbrftAUKboCUz7OJGfeiKjQYtKfFs3ZqXMmF6g K2av8hWZlpHkLKRyBEUtuUX998WkFMFUnsJpx7hFYsfDzHfE7hN3OqU2cwC7j6MtzRW62I ubg21s+lx0k7idTCUyBvoS38DozuhUrm3j2/kvox5Hy+iIwZvTCGtddKfebaKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310652; a=rsa-sha256; cv=none; b=ul/ekRQKcd+me53VZpBQTbOnnnk7yU5CYeUh/vnAQCbkNrk+BfHh75xZyXjVimMZG3LQre 4V7x896wFv24CoYJRH541YlgyzV0m5mxoF2sEv6gBS3dsMyzXBHKvv4FMrE8bKuXU6KLEH 8+9D7O/WnLA981zjhV+YrKFsgpHy35eAgfsbtNapF2feUgycvOjE3Oy6dwTPM7mTcE9WO/ QhL4L2WnuVQNwX7p6Az/Uxab1jxgDeL7ikxaFaWWaUrQIXUgktjwltqlD2TaSeNHHlV0S5 wvuhgXpz6KQWjpBigex/H2iIzJk9oJo2lxkyYe6dszUnMuZYpfDzmBzEmtKO4w== 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 4Xw7QN3jmrzhJm; Fri, 22 Nov 2024 21:24:12 +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 4AMLOCxS088327; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOCYi088324; Fri, 22 Nov 2024 21:24:12 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:12 GMT Message-Id: <202411222124.4AMLOCYi088324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9e67981e7855 - stable/14 - in6: Constify some sockaddr conversion functions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e67981e7855bcaf50717491287b0ba8ea23495e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9e67981e7855bcaf50717491287b0ba8ea23495e commit 9e67981e7855bcaf50717491287b0ba8ea23495e Author: Mark Johnston AuthorDate: 2024-11-14 19:20:21 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 in6: Constify some sockaddr conversion functions No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3) --- sys/netinet6/in6.c | 4 ++-- sys/netinet6/in6.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index e9f16dcf5c54..54b9d598b961 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2655,7 +2655,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) * v4 mapped addr or v4 compat addr */ void -in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin6_2_sin(struct sockaddr_in *sin, const struct sockaddr_in6 *sin6) { bzero(sin, sizeof(*sin)); @@ -2667,7 +2667,7 @@ in6_sin6_2_sin(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) /* Convert sockaddr_in to sockaddr_in6 in v4 mapped addr format. */ void -in6_sin_2_v4mapsin6(struct sockaddr_in *sin, struct sockaddr_in6 *sin6) +in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, struct sockaddr_in6 *sin6) { bzero(sin6, sizeof(*sin6)); sin6->sin6_len = sizeof(struct sockaddr_in6); diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index ce3bbea6b8e6..0a4377638de1 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -679,9 +679,9 @@ extern void in6_if_up(struct ifnet *); struct sockaddr; void in6_sin6_2_sin(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); -void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, - struct sockaddr_in6 *sin6); + const struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(const struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); void in6_sin6_2_sin_in_sock(struct sockaddr *nam); void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); extern void addrsel_policy_init(void); From nobody Fri Nov 22 21:24:13 2024 X-Original-To: dev-commits-src-branches@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 4Xw7QP6R4Xz5dP3X; Fri, 22 Nov 2024 21:24:13 +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 4Xw7QP567Bz4cpm; Fri, 22 Nov 2024 21:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; 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=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=AMwIjl6ZZlqXJVWeGqiQUfTZoFOH0oi83hXLCk4g5YYBSviQqo4KLmerzdEHhAkVF7jjN0 jUb0dahnwJsoQKkYIxqw9Y5lkTEZYB0Rl9OQA6JfWKu86vOJdIq4LBEO7BT6RdLk5RCFHL P/4EdZV099kzdXZaVRJkqvUm+EBMA0X1gourWj4++a47uRAwbJjaTKO2zr2RvQRubdOzXn zYxOYFtnNDCjv8ZhFTD8V6WLw0OXSrsJlHbv8oX3CGfMLgYkjLOHZjfrqUbpGHTsLQzIvG voxFx6fPKlxV+HjZUEHe42qgI6AzNCsaCZBMiHgwR1ir1lCuno3A0RftwAzYiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310653; 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=OOAe2+4E9iXezJNGt9QC6p/APKMa3OXF8b5u9sTuKKM=; b=Ag+Ii0XI76KFQrFx4UqmtNL8ptH5fbtauDqeDuJafIfcjjbXRB6kyHfaicD4uc4vqME+Ue 4JwSH5Zjv0TfL7fZQAKVP+WjvzutQ4MQuH942DM9fnHA7M3eIsSBrOfONPDh1bv5yQl0wF iixqYxqoW2Fv1TLWEn7Kdi0jYG8pj4q+0irs0ozbuN7fJRBUhvT8lJOQGI61RSWrojuIBu Q/JKfdSgC557FTd6S2wMnbbVyr4qJXyXRhMTdPfXfDZz6BgVa//c0zGpWZsaKIFAFuoPFK T1pkaZnrzNt2kWztZVBhK5fl9p0QNUmgP66ZoTKtL0jJDlUILGUCN8uhvlcn6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310653; a=rsa-sha256; cv=none; b=cv+zx+g5BFG7trQCyFLJOv7nskB8dd3adEwfuRfuYNuJqqkVd7ivebs+ZQC60jFr9mZ8kP xr8W5an72nnlRtRFYFZnHqzOQFUJbf0pdxpJkG00Qcrjndic0TdV1kaRfn+d9YAGX4CEOh NNgATSTHILuIVEvS3ifHe8nFhnQYH4ed1vTPkwt3n+QFvEHxwchUQ4eeAUtCxJ6KiVpZgH ikjONKc2a/ICizfTUebwrG8A/pDefJdSoL76IJ/oZA/r199x4753S0t4k2EWyhWLnfnEex 1dz4L+dWoFlq3abUcr1mZwVhkbDx1c3he8sB43zZvjl+5Vt8hchVWo1QZErcrQ== 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 4Xw7QP4jr2zgmm; Fri, 22 Nov 2024 21:24:13 +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 4AMLODIi088385; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOD7M088382; Fri, 22 Nov 2024 21:24:13 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:13 GMT Message-Id: <202411222124.4AMLOD7M088382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a525cdc39039 - stable/14 - inpcb: Constify address parameters to in6 pcb lookup routines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a525cdc39039f64687bcf2da3819ffd0f85e5e9e Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a525cdc39039f64687bcf2da3819ffd0f85e5e9e commit a525cdc39039f64687bcf2da3819ffd0f85e5e9e Author: Mark Johnston AuthorDate: 2024-11-14 19:28:03 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 inpcb: Constify address parameters to in6 pcb lookup routines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Stormshield (cherry picked from commit 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0) --- sys/netinet6/in6_pcb.c | 16 ++++++++-------- sys/netinet6/in6_pcb.h | 22 ++++++++-------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index f7f2ea0b8699..4c2c25bf691e 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -721,7 +721,7 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, struct sockaddr_in6 *sa6_dst, * hash lock. No inpcb locks or references are acquired. */ struct inpcb * -in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, +in6_pcblookup_local(struct inpcbinfo *pcbinfo, const struct in6_addr *laddr, u_short lport, int lookupflags, struct ucred *cred) { struct inpcb *inp; @@ -1184,9 +1184,9 @@ in6_pcblookup_hash(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, } static struct inpcb * -in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, - uint8_t numa_domain) +in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, + int lookupflags, uint8_t numa_domain) { struct inpcb *inp; const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; @@ -1246,8 +1246,8 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, * from which a pre-calculated hash value may be extracted. */ struct inpcb * -in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, - struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, @@ -1255,8 +1255,8 @@ in6_pcblookup(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_int fport, } struct inpcb * -in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, +in6_pcblookup_mbuf(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, struct ifnet *ifp __unused, struct mbuf *m) { return (in6_pcblookup_hash_smr(pcbinfo, faddr, fport, laddr, lport, diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index a11dbdb8c4d2..edf7023747bb 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -76,23 +76,17 @@ int in6_pcbbind(struct inpcb *, struct sockaddr_in6 *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr_in6 *, struct ucred *, bool); void in6_pcbdisconnect(struct inpcb *); -struct inpcb * - in6_pcblookup_local(struct inpcbinfo *, - struct in6_addr *, u_short, int, - struct ucred *); -struct inpcb * - in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, +struct inpcb *in6_pcblookup_local(struct inpcbinfo *, const struct in6_addr *, + u_short, int, struct ucred *); +struct inpcb *in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, u_int fport_arg, const struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t); -struct inpcb * - in6_pcblookup(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *); -struct inpcb * - in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, - u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *); +struct inpcb *in6_pcblookup(struct inpcbinfo *, const struct in6_addr *, u_int, + const struct in6_addr *, u_int, int, struct ifnet *); +struct inpcb *in6_pcblookup_mbuf(struct inpcbinfo *, const struct in6_addr *, + u_int, const struct in6_addr *, u_int, int, struct ifnet *ifp, + struct mbuf *); void in6_pcbnotify(struct inpcbinfo *, struct sockaddr_in6 *, u_int, const struct sockaddr_in6 *, u_int, int, void *, struct inpcb *(*)(struct inpcb *, int)); From nobody Fri Nov 22 21:24:14 2024 X-Original-To: dev-commits-src-branches@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 4Xw7QR1GHCz5dP5Q; Fri, 22 Nov 2024 21:24:15 +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 4Xw7QQ6Vk7z4cn2; Fri, 22 Nov 2024 21:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310654; 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=p0XLCyFjMOg/KOOaCIlN+nS7h5ZA3OX8+k+6yqCr4jM=; b=Ea1fmBuTPs3qa4zwBlBVxlcP/QmKq1KDpX6nFVLQL6EhYzfMpiJwGIfalQl8l+gaD/F88+ sbKDBp+JfoIHMuMqBSAzg/Y+3WYKgFWnQvh28YZ/W1I8vTtnlPXfDtf8VQN/U3XFApGKp6 /sgl9fKtDfRBjCl/fKYNlp8xLtXEBAljnXX2E2CpG4o8lqieSvS/WfKmKySzrNpQHanvzR MqWcCANIlSK6Wlej4zdk9fwTVTrsCHmD+Zyo+H+zPUmiCO5LnDww0s/whRcKg3iUvrUb+0 IaV8XeQICUMu2tF2XFZuQ3+mC3xlMFWNxsL1U7vGEExasZ6O244T0213jODVKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310654; 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=p0XLCyFjMOg/KOOaCIlN+nS7h5ZA3OX8+k+6yqCr4jM=; b=MjUT+MfShMHwkMCAYzue+8gBmqJ+qkusOzHPlOYgpKdYPDdGOR1u0Nov80G9JvavFzzrdw YbUoI0+KlLk2AK6HQI8ld0WwaDialM0M6xIqZz8ueXNMG4QOQ3LtD42Mn6XGrRtae97hRB ckamBpkk6mYkWCth2smwzFiUeokTT8W7ZPiX735mTdl7xcAwDBH7OaKvkTq+3CiwrjowoK 4tuMvVBsdlHUwjJ+2o+VDNczsvYGZpEvkXvJqzbQnBgnKCGr2XZNDzlbc6AJySDvCQaFoU V3H4AFnH7PfUr3DUmtN7WoxrCTuUV8usoXeylon996HE2/fPq88krGr8tQtC2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310654; a=rsa-sha256; cv=none; b=YSOXfCGnB6hwkc5Q+8Lajk+juSuSEtX/elnyQY9TJCo70VWn15nM4jtaYKOXyOhwmWWX83 f/aFeij8wRq0x48cFcwJ6vF4wKuPriCYOaTYol+5xRLA16dExita0GJjHjJngmYip9CDF7 OPVlSPuCDeI1zqseEQP2djYMKOdc9w1zMdtXDk4mE9wm3mN/YCDkIyfbvW8QznSPVBbok1 mF6YPI1RyWmvOjIjx62Do2eX2qTSHOecxikJ2hn55ok+daF2uuktEuAQ6IIYmSOrQtIcTx l2dPfJkW1bsWhCn/x2a968CCnf2QeKW4DkVJ/AblZLX/PU+RjZ021AqmyxWmkg== 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 4Xw7QQ5qFzzhX3; Fri, 22 Nov 2024 21:24:14 +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 4AMLOE6q088440; Fri, 22 Nov 2024 21:24:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOE5e088437; Fri, 22 Nov 2024 21:24:14 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:14 GMT Message-Id: <202411222124.4AMLOE5e088437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3126ebadf9e2 - stable/14 - ukbd: Enable ukbd_apple_swap for all Apple ISO keyboards List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 commit 3126ebadf9e203ee3e7d7dd5bac0c48d74007c16 Author: Frank Hilgendorf AuthorDate: 2024-11-01 19:37:38 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 ukbd: Enable ukbd_apple_swap for all Apple ISO keyboards Key code swapping between [<>] and [^°] key is enabled for all Apple ISO type keyboards. Before, swapping was enabled when the Eject key was detected in HID usage. This did not correlate well with the swapped keys presence. usbdevs file is extended by several Apple keyboard models to support ISO model identification. Reviewed by: markj MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1506 (cherry picked from commit 541e7a98b762916cd951a64dd7e77efd51dfa8dc) --- sys/dev/usb/input/ukbd.c | 72 ++++++++++++++++++++++++++++++++++++++++++++---- sys/dev/usb/usbdevs | 42 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index f33ae6e8a620..9ff093628312 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -72,6 +72,8 @@ #include +#include "usbdevs.h" + #ifdef EVDEV_SUPPORT #include #include @@ -173,13 +175,19 @@ struct ukbd_softc { #define UKBD_FLAG_ATTACHED 0x00000010 #define UKBD_FLAG_GONE 0x00000020 -#define UKBD_FLAG_HID_MASK 0x003fffc0 -#define UKBD_FLAG_APPLE_EJECT 0x00000040 -#define UKBD_FLAG_APPLE_FN 0x00000080 -#define UKBD_FLAG_APPLE_SWAP 0x00000100 +/* set in ukbd_attach */ +#define UKBD_FLAG_APPLE_SWAP 0x00000040 +/* set in ukbd_parse_hid */ +#define UKBD_FLAG_APPLE_EJECT 0x00000080 +#define UKBD_FLAG_APPLE_FN 0x00000100 #define UKBD_FLAG_NUMLOCK 0x00080000 #define UKBD_FLAG_CAPSLOCK 0x00100000 #define UKBD_FLAG_SCROLLLOCK 0x00200000 +#define UKBD_FLAG_HID_MASK UKBD_FLAG_APPLE_EJECT | \ + UKBD_FLAG_APPLE_FN | \ + UKBD_FLAG_NUMLOCK | \ + UKBD_FLAG_CAPSLOCK | \ + UKBD_FLAG_SCROLLLOCK int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ int sc_state; /* shift/lock key state */ @@ -296,6 +304,48 @@ static const uint8_t ukbd_boot_desc[] = { 0xff, 0x00, 0x81, 0x00, 0xc0 }; +static const STRUCT_USB_HOST_ID ukbd_apple_iso_models[] = { + /* PowerBooks Feb 2005, iBooks G4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_FOUNTAIN_ISO) }, + /* PowerBooks Oct 2005 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER_ISO) }, + /* Core Duo MacBook & MacBook Pro */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER3_ISO) }, + /* Core2 Duo MacBook & MacBook Pro */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER4_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_GEYSER4_HF_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_MINI_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_ISO) }, + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_ALU_REVB_ISO) }, + /* MacbookAir, aka wellspring */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING_ISO) }, + /* MacbookProPenryn, aka wellspring2 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING2_ISO) }, + /* Macbook5,1 (unibody), aka wellspring3 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING3_ISO) }, + /* MacbookAir3,2 (unibody), aka wellspring4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING4_ISO) }, + /* MacbookAir3,1 (unibody), aka wellspring4 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING4A_ISO) }, + /* Macbook8 (unibody, March 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING5_ISO) }, + /* Macbook8,2 (unibody) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING5A_ISO) }, + /* MacbookAir4,2 (unibody, July 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING6_ISO) }, + /* MacbookAir4,1 (unibody, July 2011) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING6A_ISO) }, + /* MacbookPro10,1 (unibody, June 2012) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING7_ISO) }, + /* MacbookPro10,2 (unibody, October 2012) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING7A_ISO) }, + /* MacbookAir6,2 (unibody, June 2013) */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING8_ISO) }, + /* MacbookPro12,1 */ + { USB_VP(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_WELLSPRING9_ISO) }, +}; + + /* prototypes */ static void ukbd_timeout(void *); static void ukbd_set_leds(struct ukbd_softc *, uint8_t); @@ -1001,8 +1051,7 @@ ukbd_parse_hid(struct ukbd_softc *sc, const uint8_t *ptr, uint32_t len) hid_input, 0, &sc->sc_loc_apple_eject, &flags, &sc->sc_id_apple_eject)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_EJECT | - UKBD_FLAG_APPLE_SWAP; + sc->sc_flags |= UKBD_FLAG_APPLE_EJECT; DPRINTFN(1, "Found Apple eject-key\n"); } if (hid_locate(ptr, len, @@ -1138,6 +1187,17 @@ ukbd_attach(device_t dev) sc->sc_fkeymap[n] = fkey_tab[n]; } + /* check if this is an Apple keyboard with swapped key codes + * apparently, these are the ISO layout models + */ + DPRINTF("uaa vendor: 0x%04x, uaa product 0x%04x\n", uaa->info.idVendor, uaa->info.idProduct ); + if (usbd_lookup_id_by_uaa(ukbd_apple_iso_models, sizeof(ukbd_apple_iso_models), uaa) == 0) { + sc->sc_flags |= UKBD_FLAG_APPLE_SWAP; + DPRINTF("UKBD_FLAG_APPLE_SWAP set\n"); + } else { + DPRINTF("UKBD_FLAG_APPLE_SWAP not set\n"); + } + kbd_set_maps(kbd, &sc->sc_keymap, &sc->sc_accmap, sc->sc_fkeymap, UKBD_NFKEY); diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 18176fa516a9..af33b2cdec07 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1142,10 +1142,38 @@ product APPLE DUMMY 0x0000 Dummy product product APPLE IMAC_KBD 0x0201 USB iMac Keyboard product APPLE KBD 0x0202 USB Keyboard M2452 product APPLE EXT_KBD 0x020c Apple Extended USB Keyboard +/* PowerBooks Feb 2005, iBooks G4 */ +product APPLE FOUNTAIN_ANSI 0x020e Apple Internal Keyboard/Trackpad +product APPLE FOUNTAIN_ISO 0x020f Apple Internal Keyboard/Trackpad +/* 17 inch PowerBook */ +product APPLE GEYSER_17 0x020d Apple Internal Keyboard/Trackpad +/* PowerBooks Oct 2005 */ +product APPLE GEYSER_ANSI 0x0214 Apple Internal Keyboard/Trackpad +product APPLE GEYSER_ISO 0x0215 Apple Internal Keyboard/Trackpad +product APPLE GEYSER_JIS 0x0216 Apple Internal Keyboard/Trackpad +/* Core Duo MacBook & MacBook Pro */ +product APPLE GEYSER3_ANSI 0x0217 Apple Internal Keyboard/Trackpad +product APPLE GEYSER3_ISO 0x0218 Apple Internal Keyboard/Trackpad +product APPLE GEYSER3_JIS 0x0219 Apple Internal Keyboard/Trackpad +/* Core2 Duo MacBook & MacBook Pro */ +product APPLE GEYSER4_ANSI 0x021a Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_ISO 0x021b Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_JIS 0x021c Apple Internal Keyboard/Trackpad +/* External */ +product APPLE ALU_MINI_ANSI 0x021d Apple Keyboard/Trackpad +product APPLE ALU_MINI_ISO 0x021e Apple Keyboard/Trackpad +product APPLE ALU_MINI_JIS 0x021f Apple Keyboard/Trackpad +product APPLE ALU_ANSI 0x0220 Apple Keyboard/Trackpad +product APPLE ALU_ISO 0x0221 Apple Keyboard/Trackpad +product APPLE ALU_JIS 0x0222 Apple Keyboard/Trackpad /* MacbookAir, aka wellspring */ product APPLE WELLSPRING_ANSI 0x0223 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING_ISO 0x0224 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING_JIS 0x0225 Apple Internal Keyboard/Trackpad +/* Core2 Duo MacBook3,1 */ +product APPLE GEYSER4_HF_ANSI 0x0229 Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_HF_ISO 0x022a Apple Internal Keyboard/Trackpad +product APPLE GEYSER4_HF_JIS 0x022b Apple Internal Keyboard/Trackpad /* MacbookProPenryn, aka wellspring2 */ product APPLE WELLSPRING2_ANSI 0x0230 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING2_ISO 0x0231 Apple Internal Keyboard/Trackpad @@ -1174,6 +1202,10 @@ product APPLE WELLSPRING6A_JIS 0x024b Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_ANSI 0x024c Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_ISO 0x024d Apple Internal Keyboard/Trackpad product APPLE WELLSPRING6_JIS 0x024e Apple Internal Keyboard/Trackpad +/* External */ +product APPLE ALU_REVB_ANSI 0x024f Apple Keyboard/Trackpad +product APPLE ALU_REVB_ISO 0x0250 Apple Keyboard/Trackpad +product APPLE ALU_REVB_JIS 0x0251 Apple Keyboard/Trackpad /* Macbook8,2 (unibody) */ product APPLE WELLSPRING5A_ANSI 0x0252 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING5A_ISO 0x0253 Apple Internal Keyboard/Trackpad @@ -1194,6 +1226,16 @@ product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ANSI 0x0272 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ISO 0x0273 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_JIS 0x0274 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J140K 0x027a Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J132 0x027b Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J680 0x027c Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J213 0x027d Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J214K 0x027e Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J223 0x027f Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J230K 0x0280 Apple Internal Keyboard/Trackpad +product APPLE WELLSPRINGT2_J152F 0x0340 Apple Internal Keyboard/Trackpad +product APPLE MAGIC_KEYBOARD_2021 0x029c Apple Internal Keyboard/Trackpad +product APPLE MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a Apple Keyboard/Trackpad product APPLE MAGIC_TRACKPAD2 0x0265 Apple Magic Trackpad 2 product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse From nobody Fri Nov 22 21:24:15 2024 X-Original-To: dev-commits-src-branches@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 4Xw7QS3llYz5dPPQ; Fri, 22 Nov 2024 21:24:16 +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 4Xw7QS05FDz4cdN; Fri, 22 Nov 2024 21:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310656; 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=R/llLCUscYs5bmPcTq5repbrkai6MZwYAZb7ni5r8dg=; b=Tq+d/a+xmYEiWYIjlXqOqlHfuiG42PJGRRZi1clo2GXruefxd4BzxLf9CXcF34R1Ylpphl skrdFoEZDrmWVybhGCIJzzOKrSBauNoMF2x8huyP4WXaxf9n2LV4z5j0Sur/1JVaNpf5Mw MYOmb7nNY2G/ek/EjATjz+HvHTlslb/qU90kKjI1JcmiVDluTG7srGtfPB9uvC/30Ill8I yXgA39UbAk/pF1B5GMm3bnDOfTihG05WLTr2+bRw30mlVp81KJQfthZHOQNt6vZ37hnnUe Y2kHGQ1upq3v0EyMCh25b5hw7MdiPqdXSBXon59xYldDo0xV0KU5ieor56clhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310656; 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=R/llLCUscYs5bmPcTq5repbrkai6MZwYAZb7ni5r8dg=; b=gexted1sA5sPZccjSmECl9/r7lYJthuwumbqhB0YQZ/+Bk1gGV6HcfASxmWrX4smE8zTfj LjKNYbu6nvZQ5NRS+RqsoX5l4LzIHwG3oTI//mzYcCGk6iRCYGjvH5epzpWpJbRJtXRWml es0t8Heo+CLgD9LT3vBxwYDEcUCcFeJ3cHJRUFJDpGR/k/mnfKr/Ul44TF+Ly/ZpcYrm3Z eaEPJMEp0dIMteh6wwYtfrWWUEqRcXBgZt43sV28i8idGf+keywblJa+mXoqT0jg7m2PTQ wkGGCR2C0l3GaPiLjWYhBFTLQPDnV5BX0by+d+orgcMfjGr+dmIo0IThVkKbSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310656; a=rsa-sha256; cv=none; b=WU5c69IfzcYcW5NVP5asefVm6DS7Zv9uJYZZPeQGYZn6xK+izO0k0jrnWvN353ArA0+zIA 4Tqjr1wNPec61QfFvHV0QLI3kEq1tojLzHIO5gUaOiXa5EReAI6yczuXrUxnB6KkoOKY+P 0XFNlspoX67eIIAFHl/KanA3Hf6Bas1+TutjbNwqfHQQOVbWk/RI80UGLnBU4ut1E4O0t6 vI4Pw8GP9DFix3K2SmsgQbVdazlFqljdBgRe3GPGgF2/sqJqpqbV4vG94zCtJMHuiZI2tW lq0xVtH4DKdjdGguHc/8aYUSFlXre2AI0YLUXDt5vvUgDICOUXymmWdeGa8zyw== 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 4Xw7QR6qDVzh0H; Fri, 22 Nov 2024 21:24:15 +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 4AMLOFpG088497; Fri, 22 Nov 2024 21:24:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOFiM088494; Fri, 22 Nov 2024 21:24:15 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:15 GMT Message-Id: <202411222124.4AMLOFiM088494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1538da10be00 - stable/14 - makefs.8: Remove a warning about makefs -t zfs being experimental List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1538da10be0058d8362ff3f8d87a68dddacb1473 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1538da10be0058d8362ff3f8d87a68dddacb1473 commit 1538da10be0058d8362ff3f8d87a68dddacb1473 Author: Mark Johnston AuthorDate: 2024-11-19 21:07:39 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 makefs.8: Remove a warning about makefs -t zfs being experimental This should have been done with commit d9fe71828797 but was missed. Fixes: d9fe71828797 ("makefs: Remove the warning printed when makefs -t zfs is used") MFC after: 3 days (cherry picked from commit e19c607ff9b2b5d55664fd13e5fd9814e3279ffd) --- usr.sbin/makefs/makefs.8 | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 0cc2619e6c89..c87df98d24d5 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -503,9 +503,6 @@ Volume ID. Volume Label. .El .Ss zfs-specific options -Note: ZFS support is currently considered experimental. -Do not use it for anything critical. -.Pp The image created by .Nm contains a ZFS pool with a single vdev of type From nobody Fri Nov 22 21:24:17 2024 X-Original-To: dev-commits-src-branches@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 4Xw7QT2hwRz5dP5T; Fri, 22 Nov 2024 21:24:17 +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 4Xw7QT1HxPz4d5g; Fri, 22 Nov 2024 21:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310657; 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=GoYgRYMGJoZNqNTr2JE0aaI7Wn2KB8WuOg0fQqkL4Dg=; b=JsZLOo/hOhSi0EuBbG5Lo93LcIWB/kTZO1i2xN7vA3bK8d0ycgmxxpl2blN3K7/DOEFaTa jTgKZ4imuY11DZFmwPhx/Xv1oWtG4qc6GSjWemYXNSLGanY8/AlDfYJPlAMeb2dTgiXXFf rDMWN61I+Y5k7FWwdlbvfpYXDiZtU56OmrhXxq1X2e0kUUV/lp/+QWEtKYiAWLSS0b2F8H zkCrNGY7uX6t8l+s/HSJFAM1F1SWD+b+UXaKZMbkGcI9VIscqQmpkMy7P8999hmd9PDF7k Yecm/DaqVP8rFssC3GKnDaFJyZ2/Wz0FRIptdzSPIBo+qNCENZp8OyQ/sArrqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732310657; 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=GoYgRYMGJoZNqNTr2JE0aaI7Wn2KB8WuOg0fQqkL4Dg=; b=MoAn7GQBdlvv1yGjOCl2j9U9mjXhszaQYlLYAhNz7BC0UtBHZQkoUVv47M+azSlr62e4vH FEDwPW4YAdc1eUeLjeLNE9TmCn0Wm0PYYjOfZgskwfv3+QoaI9UyAEn6sZHSRJ1haGwHDg NFPmg8p7G/vV84TbISjrymy1kdcuBkLGTsQnEnX21Sw/QAUiEm8DcvAveVwIgMn7DcP8ul DFZNbYe37fvvNNM3990UwaBQZaZjnKl1U3PVbiPKoQDTDtEK8dfVXWy52ttOvlwaaiXkK5 /ldgn2SO+1lEWwNdc5hpWAdrhEoYg0rbuH1zGqF93VPTaRDz7oDl3vDDRIjpNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732310657; a=rsa-sha256; cv=none; b=BG2StyXMJCVtr5ko+GCfnzt4ZqNF03loIfKd+Mf5wBB+R9DU67h8UWG9Qm6Fvzf2E2gQX6 s8vefprbqZHzaSUpYkeU3M3rlEDcZJ9T/yskroWFe0r5JuCnwvNyCTtCr8TU2NZC6IeabI H+0DrdC8mX5UzTy+gF7hmMuxOKXWQwOX9JxhYgmwIwHLrTyhimjYrZiTJGfMAOZ793hccy b6FybMl64Goosjbg+rr/g4fbeVw0Z+WmZDbWBy/ZWaYq01tHVL4lydkjikn1m5O6MgYubn Zknoi47JlSq6bXAv/WTqhIiQLfSv9yg91CUSknL0rt3wq6lHjViYGabcaU6wgQ== 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 4Xw7QT0t1nzgmn; Fri, 22 Nov 2024 21:24:17 +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 4AMLOHWx088563; Fri, 22 Nov 2024 21:24:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AMLOHV5088560; Fri, 22 Nov 2024 21:24:17 GMT (envelope-from git) Date: Fri, 22 Nov 2024 21:24:17 GMT Message-Id: <202411222124.4AMLOHV5088560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0e290388cb17 - stable/14 - pf: Add a sysctl to limit work done for rdr source port rewriting List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e290388cb17b76d3e79ee5f405405bf0a1169ee Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0e290388cb17b76d3e79ee5f405405bf0a1169ee commit 0e290388cb17b76d3e79ee5f405405bf0a1169ee Author: Mark Johnston AuthorDate: 2024-09-10 14:33:47 +0000 Commit: Mark Johnston CommitDate: 2024-11-22 21:23:47 +0000 pf: Add a sysctl to limit work done for rdr source port rewriting It was pointed out that the current approach of exhaustively searching for a free source port might be very time consuming. Limit the amount of work that we might do before giving up. Reviewed by: kp Reported by: Eirik Øverby MFC after: 3 months Sponsored by: Klara, Inc. Sponsored by: Modirum Differential Revision: https://reviews.freebsd.org/D46495 (cherry picked from commit 339a1977c32414f3d23733504955245ca6f3802d) --- share/man/man4/pf.4 | 5 +++++ share/man/man5/pf.conf.5 | 6 +++++- sys/netpfil/pf/pf_lb.c | 18 ++++++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index b757376e0183..4938e719b17e 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -87,6 +87,11 @@ Default value is 131072. Size of hash table that store source nodes. Should be power of 2. Default value is 32768. +.It Va net.pf.rdr_srcport_rewrite_tries +The maximum number of times to try and find a free source port when handling +redirects. +Such rules are typically applied to external traffic, so an exhaustive search +may be too expensive. .El .Pp Read only diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index d9e9127f8a84..935a70301d88 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1410,7 +1410,11 @@ A .Ar rdr rule may cause the source port to be modified if doing so avoids a conflict with an existing connection. -A random source port in the range 50001-65535 is chosen in this case. +A random source port in the range 50001-65535 is chosen in this case; to +avoid excessive CPU consumption, the number of searches for a free port is +limited by the +.Va net.pf.rdr_srcport_rewrite_tries +sysctl. Port numbers are never translated with a .Ar binat rule. diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 3f5b3f90a4e4..2623a22db86b 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -52,6 +52,13 @@ #include #include +/* + * Limit the amount of work we do to find a free source port for redirects that + * introduce a state conflict. + */ +#define V_pf_rdr_srcport_rewrite_tries VNET(pf_rdr_srcport_rewrite_tries) +VNET_DEFINE_STATIC(int, pf_rdr_srcport_rewrite_tries) = 16; + #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x static void pf_hash(struct pf_addr *, struct pf_addr *, @@ -756,6 +763,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, break; case PF_RDR: { struct pf_state_key_cmp key; + int tries; uint16_t cut, low, high, nport; reason = pf_map_addr(pd->af, r, saddr, naddr, NULL, NULL, sn); @@ -807,11 +815,15 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, if (!pf_find_state_all_exists(&key, PF_OUT)) break; + tries = 0; + low = 50001; /* XXX-MJ PF_NAT_PROXY_PORT_LOW/HIGH */ high = 65535; cut = arc4random() % (1 + high - low) + low; for (uint32_t tmp = cut; - tmp <= high && tmp <= UINT16_MAX; tmp++) { + tmp <= high && tmp <= UINT16_MAX && + tries < V_pf_rdr_srcport_rewrite_tries; + tmp++, tries++) { key.port[0] = htons(tmp); if (!pf_find_state_all_exists(&key, PF_OUT)) { /* Update the source port. */ @@ -819,7 +831,9 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, goto out; } } - for (uint32_t tmp = cut - 1; tmp >= low; tmp--) { + for (uint32_t tmp = cut - 1; + tmp >= low && tries < V_pf_rdr_srcport_rewrite_tries; + tmp--, tries++) { key.port[0] = htons(tmp); if (!pf_find_state_all_exists(&key, PF_OUT)) { /* Update the source port. */ From nobody Sat Nov 23 06:19:54 2024 X-Original-To: dev-commits-src-branches@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 4XwMJV3XQJz5f1gV; Sat, 23 Nov 2024 06:19:54 +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 4XwMJV2zLYz4Q7H; Sat, 23 Nov 2024 06:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342794; 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=OB23N18dB4Pl+vWqqd1TM8NLbhFOrg/+wcUorLTlkyk=; b=vteIsXZHMT1LrbZguGFAIPIj1NjvZt1uDDnDOynWZHR/UKb1nSumcoPVZsO/3JgSZ+fNUd Pr0uPJ0dC53Zj0IHLdLRhmaurBNrSXrQr8wgRmy+aD5/Qsm1Urro7Dapn/YU94XfRGl3du uphtiRTIu7i61I36LHo8wGLrG8mBj8syvlQK9LaWn/NtOXFMPsuxSZIK1tbhYg+YYtWQhu svfddNRXzICGzdIHtZrPKhcjEE+86kzVky7qo/zWDyUbSo4TD/u1SWa+TChHmY/oRMG2bc rh5HpHq3T6oUCsmt00xF684zD2AKM5YI0s2jwaI9nC9mSbtcIENG/iPfUMeIZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342794; 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=OB23N18dB4Pl+vWqqd1TM8NLbhFOrg/+wcUorLTlkyk=; b=uHMPlYwUzuZ0bEWJsfuLQggHlRjUhGfQW1P7/fB/6ERhEiFmAY6Q0PfvJDv97StpQKxcS1 dx6X7b39TLdVM15tV7/bFEgDrIWG4d8SpNqPq5eIF78BIRTPOjDcvNx6Dk6D/fB0jEOrFW /ngX3pO9JTF83chjXKlr/kwJfdhZ6fcvwHaW4HlrEdsX3ayhrYCw73+Oz6dyQl4OhJm+d7 NqZhVxsX2ASKL+dQspucXKo8rQfz7K2vl753ydXsbVQ7XjNp0FJm0dcinesF+7Pu1+M9nX iHHWXWhYc4zkmXh/lv5p685T9HaCf4X65cyt+8aFEJnDdoMf4F/NzgJ078ecbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342794; a=rsa-sha256; cv=none; b=vvSTl1aghedQFVLTML8KdW/CschE2hrIBpoOzOI5rW+58LD6qafrv/GScFxVLZ1cLqcOJ4 m9opL1MtiI7CVpjXlgM73prPVjpFNYGfFjqSiRB0Mij1xyd41WM820kIsMv9eLbOKaDzez rCVXkszNa6a6sryexxTnw7P2d1olmxbUhHMBBAbbLWwy1V4mX+Ez1AzWyyyL0HwekqEyxG WT+PkDpC/vDNOhu2UNMe7KFY8i70GKmJFUAXsJTfCpH9M7bBKbJgan6BIBQAJrh2CMKX3v JB4/wDWQzcmOyyRLGyFQJeUA84VrMKycw2+mcg1/ynZN4kWGHvQGvDDR9cQCjg== 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 4XwMJV2BJ3zxrV; Sat, 23 Nov 2024 06:19:54 +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 4AN6JsGa077879; Sat, 23 Nov 2024 06:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Js3b077876; Sat, 23 Nov 2024 06:19:54 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:19:54 GMT Message-Id: <202411230619.4AN6Js3b077876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6739fd94aaf1 - stable/14 - ixgbe: Add support for 1Gbit Active DAC links List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6739fd94aaf19640b0efaecc3ed7a3989601ba77 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6739fd94aaf19640b0efaecc3ed7a3989601ba77 commit 6739fd94aaf19640b0efaecc3ed7a3989601ba77 Author: Kevin Bowling AuthorDate: 2024-11-20 00:24:55 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:19:44 +0000 ixgbe: Add support for 1Gbit Active DAC links 1Gbit also emperically works on Active DACs. Sponsored by: BBOX.io (cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220) --- sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 218a9dac3b78..ea815c6c88e5 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1437,7 +1437,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || - (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) || + (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Sat Nov 23 06:20:10 2024 X-Original-To: dev-commits-src-branches@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 4XwMJp636mz5f1r0; Sat, 23 Nov 2024 06:20:10 +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 4XwMJp5H48z4QS6; Sat, 23 Nov 2024 06:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342810; 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=OhMIzCAem9CEyj4AVEXUUXqX5ugYYWQyHPd8fn6sYtM=; b=huuNYI+NnrjBJJp8IROHAWpZeUzYkJUpfYvl+CxCzC/FpwjLVAQHPMnHlZMNXRBo6xYNYx NB0vH1CetI4aMNJsIEk7eSYnpC8kWUnwVl5xZqFmlT2RA2HD/wNya4dnK01rB9sDI/J758 U7J2LLvPzxxhxJSX6RRV1kiQ6Dk8yEJNm3E+mL8WicT0/KKWbVXA/NviR+VSftqRcWq9jX dbMszts3+PiW/Tz2JZdt9SnrOzVc7x0cHqYSWzgFE4m7bTz0BWl5PD0cVEXqVGOrlY1YO7 qpQ4wfAn+YWHPVzME2ORzm8kCwzUBY9PV0drQSUx0N6ohLsDhkRXCuDi1Iymaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342810; 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=OhMIzCAem9CEyj4AVEXUUXqX5ugYYWQyHPd8fn6sYtM=; b=smMvhAr8UeJzeVwuHJtE0shffS4pWqXN1IQeqSUw5dcVh9HdAULUneD7iKBxBPCBdFQ4Q0 ViKTDM1qYpLr/pxK8zuuDGt7Ntr02+LUqTnyjnlyDHDriOzGwd9GISqDnsHgpgLBM/lUlG 4kDESWhpgN3nRRVlnuYLfwd4g97RpQBPLhzPScLF5RcQrwacF9dyD5Bc9SXvkR7yqz7Yuz dsl9ye9i/GDOUtttWf2ScjsYM7VGT2qIUHZkZds2mLyrBJ0tGlPE4CesQEVdCZGeZGiYB3 rNXRwbnMcCsgGf8NvWdRVzdx10b8vtNCKBIeP9Tp/Kk1XONfpDnU1K4hUrXaLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342810; a=rsa-sha256; cv=none; b=QfxOuIvN/Dz0s2+WbBVmn/O3bC3YJaM4P6m07Q0w10EQID30IQ40y5SUrQHCEmriTEY1mc qlf88GiT0icAphy4Vsizqf/pLaKJ4dVcT8tNaGTAxsSfE2JBf8gXRLrkZN9FldnwKpsgpu i0kJQlXkOgGvjd+RzWicquYhSGVMZH3OY8EKSHkCgUReeZpJ8pzc9a1idCDFvIRkLHM46R 6V4fsoby/OikS2dV940Dn9OMmkX/kYqSLgQ5BOo34hEVL1JhbAdvw+mqmvcNayp4whbCaX EjGjyZTfJBUDl7iAvGeVmOqEHde3x+wcisxDKcPvYv3nobOLSdJ0Va5uz7Vlgg== 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 4XwMJp4ptTzxBF; Sat, 23 Nov 2024 06:20:10 +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 4AN6KAQh082602; Sat, 23 Nov 2024 06:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6KAdh082594; Sat, 23 Nov 2024 06:20:10 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:10 GMT Message-Id: <202411230620.4AN6KAdh082594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cb8d81a2315f - stable/14 - igc.4: Remove non-existent timer tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb8d81a2315f04c46eef276d63db6ea679e18660 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cb8d81a2315f04c46eef276d63db6ea679e18660 commit cb8d81a2315f04c46eef276d63db6ea679e18660 Author: Kevin Bowling AuthorDate: 2024-11-20 23:55:45 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:01 +0000 igc.4: Remove non-existent timer tunables These were removed in a40ecb6f7405 because they do not apply to igc hardware which uses EITR for interval timing. Sponsored by: BBOX.io (cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78) --- share/man/man4/igc.4 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index cf36e584a679..f9bca716f7fe 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -100,21 +100,6 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. From nobody Sat Nov 23 06:20:57 2024 X-Original-To: dev-commits-src-branches@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 4XwMKj6glRz5f220; Sat, 23 Nov 2024 06:20:57 +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 4XwMKj69Jnz4R4q; Sat, 23 Nov 2024 06:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342857; 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=otZ17zMKtbUmmz5t+U+uzoEUWERc14zM5yYPRjB4xlE=; b=POFT4jurkRnFDq5KAxyLXnd4IJbGUbaA2rU8+JzMuKRH8+L0MI3qJx3hWirRHrYaQelidC hLf4SftPXbQmvBgqizRvI+W86uv/KVf8kS5CgUVfyZVdwHBYvhjj7fN4ZzRIYD228uRDYP hsYubbXxJvastlQE1GAMI5GJVY9hde5fyMXj94tieVTY+TH3Hf9m0nO/vS8Lox9LK6CT9u lfoFiLtTkEwdkObb6Tin2t87urH3wVo0ZTVAoKEkzQB85lK19PtQLGNUadUCsvAf7Xj6MU LGwpOaVLd1Fh2ZiqJSONT3tWDNIXYsCbsxkf2+FMh42QoyrPjjSWMKmbIkR1uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342857; 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=otZ17zMKtbUmmz5t+U+uzoEUWERc14zM5yYPRjB4xlE=; b=l6bbIv6SyPbc2A/IyfjVuwGFTlzSQEqvbDfqCCZwB4hlLnmwcVzfyi172vy2SNysaLPSXW 8nX1Sfl3RxcRbfTJam0yWSMylTN1N6b6VQtjEq20ybnGaZc3Vgco0/Wca1GDC6AHHILMR/ AfxD0eET7k+kDt/T8GncHrW5CEZUWuwzRdTfL/77mH6K3c0VfCdsxjl0xww1LJRph19t5a iiBaL/Ojiwecq06wEZVwVXrYMBFeViDIQUfr+vdKqmDdUOWNPCmiagHcDeTtZxqUMVTB2K gpyaODNkYwqTeDT2SCttuw04Za3EyilCWxsD59FGLmGYBEf05k89wDei5J/oZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342857; a=rsa-sha256; cv=none; b=VG4XRV8ZyWwEl24JBIzvMoTGfXDMfnbxP/z8mjPHLE1gLgbR3g/aiPaGRboB0g1PHWjeyU wCjn4OqzjGCEPh+0N2+BfZGz+R0pxlv/pYaiJ4EZi1Vll4vwuEFM7qk+IDQFsQvDvpNfMv 9fb6N7QjtB0Uxn7uhNxOKWqbw9I7sdl0w/9FaAwI2BMbb0SUDTQhcMArITMnZZs/TVDQ+T 6M/BcuQNiPRYITuBGcmoEseajgbHWOwaVz5ZooQkFVuORxzWn0qFqmu8zE5YqlmokDMJSp glJob1ZdnMKAvyUXHg+r2SYT+2ltmSYY6brdBaEZ1eS/P8nM4NwHo+j3QSXTXQ== 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 4XwMKj5fbFzy31; Sat, 23 Nov 2024 06:20:57 +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 4AN6KvZX087032; Sat, 23 Nov 2024 06:20:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Kvq2087029; Sat, 23 Nov 2024 06:20:57 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:57 GMT Message-Id: <202411230620.4AN6Kvq2087029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 974d9c5a8750 - stable/13 - ixgbe: Add support for 1Gbit Active DAC links List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 974d9c5a875044810557f96264f23ecfc106f13d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=974d9c5a875044810557f96264f23ecfc106f13d commit 974d9c5a875044810557f96264f23ecfc106f13d Author: Kevin Bowling AuthorDate: 2024-11-20 00:24:55 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:31 +0000 ixgbe: Add support for 1Gbit Active DAC links 1Gbit also emperically works on Active DACs. Sponsored by: BBOX.io (cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220) --- sys/dev/ixgbe/ixgbe_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 218a9dac3b78..ea815c6c88e5 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1437,7 +1437,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) || ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) && (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)) || - (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) + (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) || + (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)) hw->phy.multispeed_fiber = true; /* Determine PHY vendor */ From nobody Sat Nov 23 06:20:58 2024 X-Original-To: dev-commits-src-branches@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 4XwMKl3JRYz5f23G; Sat, 23 Nov 2024 06:20:59 +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 4XwMKl0QMRz4R7C; Sat, 23 Nov 2024 06:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342859; 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=dbnpQPZfZ27bk4mM9yj6sqcZSEZ2NUk34bA3pGE9aMg=; b=ya/h3KkL6oRNVzUE6HetrGYE9AQh2PlVaLxbzdiDMf+u4hQ+TyE16D6nJhwZzuNeZshJmr 5Wo4uQWfTajiHxE5k1e7/tKYyHZKr6ISuHwnxOXEa7pemzpHx7mPzLokuOoyVcwSNDf7VW WgTH1KaUgS73QNqs852JmPBm7jNfMKx2K9y5pZedmbHSaRsc6t67QnbBghIjGng3fFvR2E nsX66Pq45cDoZ6DC9w9qN23c+P1MEIcX1SvoEV1WNoPvKYIJmUqCy+GGrDHTgjvaZX30du 2vurNv3CwNh//sOn/1oLvJvQI+1e7OS6sitBFtE043N1f1Q8gtXVNeC+HLpnAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732342859; 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=dbnpQPZfZ27bk4mM9yj6sqcZSEZ2NUk34bA3pGE9aMg=; b=duHr7BDBlnvyI9BioNMHDbQI16u7wFlZXG4xXu0sw1un1Jtd8RH/kgEcZ2zCWuzhppOCS8 BbDdIwRoaLa0l8zms3WxI4NivCGM+hhwqHrorO3mQPC//a8VckyBBhLxSrG0SOdiwIMAVZ 0tusPFAlm01PAnFiKTvdIx7JqPq9uExd3hU0wyyTcgAZX1KzXkRZnFQv9K6uTg4A0oxvwY SaQF0OwkqTMB6QUN5f160tnocXk6ItSFoX2kRQrILjhvdhIwOgBUUaF5nvteLxdLaXy47I gJyAFTByLCuZvTQ/3k0QOR5B6UpZS6a0gZgiWpXXF6BLTWusTPCP3KCdyuXLUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732342859; a=rsa-sha256; cv=none; b=stPCp0b7oGNrjrVaQzpOb51Wr+2uAfpH4k+X0I5jlpxHjqAO6gOpPpxIWQGFKm5a1kmb/S qTMhNj+B7InMJFPDzgCjzKhIBkTA6UbiDXKFjZAUSvuEnxB6Smjf5SMnzTKdsl0De3iADs /eAccCPt5Y2THTinRq2SjgoXc/BdNkPDrF2lotYM8NQIxk7g3jwbPZ+3/ql++JmGuPNcqx iJkGZyzq13KTxVtauTxULASSnko9vYom7CZAi97Rus0NaCpTdb42QF4VpX7SjxiMDvWzUx qNKtRFD1EepnG2EseBR+f3blRU4W0EvaWiY9lxqvRyOBa5SRAkg1sNAhFInBbw== 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 4XwMKk6yC2zy32; Sat, 23 Nov 2024 06:20:58 +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 4AN6KwXV087080; Sat, 23 Nov 2024 06:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AN6Kw5C087077; Sat, 23 Nov 2024 06:20:58 GMT (envelope-from git) Date: Sat, 23 Nov 2024 06:20:58 GMT Message-Id: <202411230620.4AN6Kw5C087077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 33c11ce8a352 - stable/13 - igc.4: Remove non-existent timer tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d commit 33c11ce8a352fc59f1c8f1c0dd8022df92c1bd9d Author: Kevin Bowling AuthorDate: 2024-11-20 23:55:45 +0000 Commit: Kevin Bowling CommitDate: 2024-11-23 06:20:43 +0000 igc.4: Remove non-existent timer tunables These were removed in a40ecb6f7405 because they do not apply to igc hardware which uses EITR for interval timing. Sponsored by: BBOX.io (cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78) --- share/man/man4/igc.4 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/share/man/man4/igc.4 b/share/man/man4/igc.4 index e3dc7da65713..12e252030f97 100644 --- a/share/man/man4/igc.4 +++ b/share/man/man4/igc.4 @@ -101,21 +101,6 @@ Disable or enable hardware stripping of CRC field. This is mostly useful on BMC/IPMI shared interfaces where stripping the CRC causes remote access over IPMI to fail. Default 0 (enabled). -.It Va hw.igc.rx_int_delay -This value delays the generation of receive interrupts in units -of 1.024 microseconds. -The default value is 0, since adapters may hang with this feature being -enabled. -.It Va hw.igc.rx_abs_int_delay -If hw.igc.rx_int_delay is non-zero, this tunable limits the -maximum delay in which a receive interrupt is generated. -.It Va hw.igc.tx_int_delay -This value delays the generation of transmit interrupts in units -of 1.024 microseconds. -The default value is 64. -.It Va hw.igc.tx_abs_int_delay -If hw.igc.tx_int_delay is non-zero, this tunable limits the -maximum delay in which a transmit interrupt is generated. .It Va hw.igc.sbp Show bad packets when in promiscuous mode. Default is false. From nobody Sun Nov 24 03:21:54 2024 X-Original-To: dev-commits-src-branches@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 4XwvJf2J3yz5dL85; Sun, 24 Nov 2024 03:21:54 +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 4XwvJf1nndz4HZK; Sun, 24 Nov 2024 03:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418514; 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=kZmJJ7sWp8xlcmStJiWXtTX9yUQp+vV6RZNuzogD1/0=; b=hhx1fBAoWRnMBy6/DYnc6PRcUjo4/wtUuIbGpcNhTJaWSojWqAF2BtxjhTUtHYVNxchIeF AHqeqTVlFtWCbQvSbOk80RvNiGaE0zgve4XH/8BmVXltJOxEzLNyLRa283RwPMBbzk46Di 3l+oRRH0lS4lAxWUiF34iEBrg3rRkXSsUc26i6uAuIu8knKf0eiqvLNdbj6MeZCgvu3I0J 3iZBeyBZ3u1eizLkKZqAoh3QCQ6pECGMr3FaDvzgxVQzyn1LGsiG/5P/Mp028BTrmIMygb 8UdAhcm2yhgUWtaZSoxOi0NF9uuiPQB3EtupdqxKn4osAeHOPIZmFK8pMWGviQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418514; 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=kZmJJ7sWp8xlcmStJiWXtTX9yUQp+vV6RZNuzogD1/0=; b=HqDt3KU5//vzkXUyNu+TRmUiyyln5h0ujpnDGX/rBg5PRRmVVhUgvPd5WMgYDE/X5RdIXV qOOa5qtFrifopsDs69w44C4R0/N8iRY01YK3VS1P9mhsAr+5ETDgknqpn/jS7nVtd+0xHf /wNeS1eCj8jMB6jbJhFUtmWw/E7F1eymBV4AnLi/Z0+iGwiJKlxKIElRzJMroz2ts5tJjq ZXlhSobSpWuD0Ve7MvRqjRJ9BP5ekuZtAAJeKJrUKLx2IgZZ61rBzFc3CQICdPOMOxWAjy CtVs/YGlAtJpbmP3Z0e3zGSl4pxZgYWqKJUgONE9yEF1wZEkgPMRbVc2A6NLGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418514; a=rsa-sha256; cv=none; b=tIwvx3qv7VzmLKUPYY/6XKtBja6MvLgqWmPalUZZ2vYYwZ1j6SOApTfY93YVbdKiPNYUrm yRfGqrl7InThuRBKs0DWNssKNP/yH/C/xr/OtnK54IlaSlfcV0hCm9wmuE0Blw0nX8hgVZ /l1r3bL6aW4ztHT8eU5WO0SURwF916KdlQtJ8toT9fZjqtgyA9sM8+3RxsSvIY3n/CWXxG +cahZJi7EP8uT+3ccv8jxjLIs/uZw/ECB4QKl4gchiEtPXqeGmDgKOsASQmB5izcmkUzbS GfGYEzInt4gxXnkwosarLOmh8gCjbQSmWslmZovqTgYQYVCK+FdbcIW+L5Y+Tg== 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 4XwvJf1PPMzcdg; Sun, 24 Nov 2024 03:21:54 +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 4AO3Ls5o040804; Sun, 24 Nov 2024 03:21:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3Lsae040800; Sun, 24 Nov 2024 03:21:54 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:54 GMT Message-Id: <202411240321.4AO3Lsae040800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 52ff9ccb5b25 - stable/14 - ixgbe: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 52ff9ccb5b2553719d050f8fd041c8e17578250b Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=52ff9ccb5b2553719d050f8fd041c8e17578250b commit 52ff9ccb5b2553719d050f8fd041c8e17578250b Author: Michael Tuexen AuthorDate: 2024-11-21 01:18:17 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:03 +0000 ixgbe: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to fix the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Michael notes emperically 82599 has an unexpected middle mask: Chip First Middle Last 82599 0xFF6 0xFF6 0xF7F which should be fixed up to 0xF76 (RFC 3168) in a future commit. Reviewed by: rrs, rscheff Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44258 (cherry picked from commit eea2e089f8dadf850a30ed837edd7a386427a9ed) --- sys/dev/ixgbe/if_ix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index f8a620295aa4..ad690fdccef4 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -204,6 +204,7 @@ static int ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); @@ -2756,6 +2757,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", @@ -4742,6 +4761,43 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) return (error); } /* ixgbe_sysctl_eee_state */ +static int +ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IXGBE_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IXGBE_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IXGBE_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IXGBE_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IXGBE_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /************************************************************************ * ixgbe_init_device_features ************************************************************************/ From nobody Sun Nov 24 03:21:55 2024 X-Original-To: dev-commits-src-branches@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 4XwvJg4mvmz5dLBR; Sun, 24 Nov 2024 03:21:55 +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 4XwvJg2W7pz4HnF; Sun, 24 Nov 2024 03:21:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418515; 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=t1u00yC4ZtAymlerKx8bLsXlQZdq1RN7D0G0XCrYYzY=; b=LbtQf549ogkYcVDfm7+TlIaZGGEAayyn085jRVLXB3g++7qNVBjOL49yxFIh+89cUPnCdS MaP1iqrtFQtTfY9M9tAZZtuhT0HU+SzpPPpc3LRXEH0dsiBWzmN5MvKFD6P4WjJwcKiawz nSyH67ai+TcFrsj5kyreIi4Pc8S3Jff4L9wqa7/1d5mzTK0rveT3dVyj0Nx8F8qV8k8M/0 EzZ4oUBxT0+CtIJtahbL/KVlkaPtZTKMCr1nGJKQWyIZwVZ8J5Ynyd/vK1Hk0z4efQ7I0w Wri4S52zhvoaUrhUp5MoxRq5LiBHbzxZdVV7Qko6g+cgVT8wYJX6OhleITLrRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418515; 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=t1u00yC4ZtAymlerKx8bLsXlQZdq1RN7D0G0XCrYYzY=; b=kIn6kP3W/tzbUfO6xsZ4E3EE49rKQuItcgopYzmGpKjNbBx5jqhyYJO7esymmJZGqr7k0F 1MFtCLs+ukSoB+qeACFSKpSuS2OWbIR5jBbDXM76VaIzsIGX9lPclmNU+G7Ro1NPO4p8MY aqHsuVdBTTYBdc9MGG7YL4CFHtKR4Xj00mzCVIsB9Bo30WMzyTV+KmjxYtpVshVuj85HBS lUW2JhtgOfT7LEqnjm8fWvf8DscwXO0d7P2zh+9FZT7Mo2pYlNNiUcqKXvpCpRAMzLmKLs Efzs7+qjum2leTurhmJC29vqB+xX3BdZVbX97x+PhR77mV0RuZQf358m4Sd5xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418515; a=rsa-sha256; cv=none; b=nOkdzgrMGbuu9dNU9Ks+tcDb8sQjIGwfQMwWnDndfWQJgrithP1FIkBSJ1MMEERtQrsEs3 Re7ZMry0JvkQX19YTMda+XYYVNamqhgo39DLFye0n+LWKzVSjVp0rfrtiP8ajsKTVbAV+C yC2k9PLW7K1tVClAyf90dHto60kQ5rIIb2T9nwVLRPfUKLV4PEUC8Dcnc+kurSItjKAF3y 4BE5xcSDqa3sBGqBF502Sx0unV3ulxFcXB+VDy+nH8zE7hFt5ivzNTesWMguz1nEdheFrf xrvVZC48tW4xkMfCCH1kP8ssgdJmcVxGwNa1P4mHLoLqViqTbIngsd28R8uahQ== 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 4XwvJg27FLzdHL; Sun, 24 Nov 2024 03:21:55 +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 4AO3LtuF040858; Sun, 24 Nov 2024 03:21:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3Ltk6040855; Sun, 24 Nov 2024 03:21:55 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:55 GMT Message-Id: <202411240321.4AO3Ltk6040855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 9a89886460b6 - stable/14 - e1000: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a89886460b6932c7a93bc324529250241f25521 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9a89886460b6932c7a93bc324529250241f25521 commit 9a89886460b6932c7a93bc324529250241f25521 Author: Michael Tuexen AuthorDate: 2024-11-21 02:22:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:17 +0000 e1000: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Reviewed by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44259 (cherry picked from commit 90853dfac851afa9e8840f5a38383256d75458b6) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 0b99f1b06130..98521e6e6ee9 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -333,6 +333,7 @@ static int em_is_valid_ether_addr(u8 *); static void em_newitr(struct e1000_softc *, struct em_rx_queue *, struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); +static int em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -876,6 +877,24 @@ em_if_attach_pre(if_ctx_t ctx) igb_sysctl_dmac, "I", "DMA Coalesce"); } + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -5182,6 +5201,43 @@ em_sysctl_int_delay(SYSCTL_HANDLER_ARGS) return (0); } +static int +em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = E1000_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = E1000_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = E1000_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = E1000_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + E1000_WRITE_REG(&sc->hw, reg, val); + return (0); +} + static void em_add_int_delay_sysctl(struct e1000_softc *sc, const char *name, const char *description, struct em_int_delay_info *info, From nobody Sun Nov 24 03:21:56 2024 X-Original-To: dev-commits-src-branches@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 4XwvJh6Nk4z5dL0t; Sun, 24 Nov 2024 03:21:56 +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 4XwvJh3gH7z4HJc; Sun, 24 Nov 2024 03:21:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418516; 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=5FABlpGduHMsQQ+vBxeUJ0weoBVV08snuQvK3vnYAyg=; b=qu+BlWuiP/6FlrjFpYLg3DJhwWlRVhAu8bYjBhREbz4Mqjvluiq8K4aPJrsgEcH3dBNDyX B6W3r1HWxXy9MtK6cfnTVWRINUQ3ftzz4jFQD3EQGAW1aIuvzHE4r/rrSAXYif4cbNuNk7 kNjo1KBnAAwgo9qwni7Uo0gm4KsA+NAMro/H0EGWdPJrBi7LEzt79GN/NHK1bVcw+X3yeu vUWV6eFTsJjkgGznK26JYN8ifFOBQhenMtQkyT+wAnfzVZqH+eo7IP5Vj4v8kxKhR4Z/Su t2IkgTY1DYH7koJ/5XbK0+Q3V/bOpiOzeIwzf1PKMEW3aGSgCO4iKEafscsb5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418516; 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=5FABlpGduHMsQQ+vBxeUJ0weoBVV08snuQvK3vnYAyg=; b=n6g0IWQsckhGamFDRlO/YzhctHIx10hH9YCY3ak5JMLFZ1XG24bLzDOiBytLqWZIMgtdWH cwEZl0TfhnBg4kK2wWKnENu/kbmj9qJ2EfAD2aU3Mj5CRFfkYnhJDYR27q3CJ1AkYaSg0d UV9JrjY5/ExTkvoqCaCuhhqGmwZJXAwZYWqgpPnZ/tO+LsyyJs11Z3atc9ky73CAbJW7MP kpvkPfZHb8J2bCnwbqjO+dSMsxxxm+ixc1aGsfixxxZezBoJu8Q1DfGsirRUBA+rv6diXB Nyy5l/+8oCvZRRdNMcFVEdwlkVQ+N7NdW0zPo3wBVY2oXua0FTAp2AyHXr5vNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418516; a=rsa-sha256; cv=none; b=hKMk7j+9SC8n4MKnojsdvQXO+LVFVKCrpKB6AS0vDE+c0ZJmTmE1r1cbcqAwzYuxfz5tXu i0LmCUDKtO3FYwiTNVDPIYHLOnDI9SdyStX61xOQi/n2xbQJPxiZsToVDvbWvSCFbEcszA NAledOVz84gleTIoDWhYwCfn/ijAmmBqbnfeFnpuEF90URYxFZmOtnJtCBNuf3z7qiwzGF pOOt6q3zsWtVg4UmBCqKHeskIGsFPuVCYUejb7WT73TbbmgkvZyaK+MuMgKRzxmfDQ+SeO KlNm3fRTMPpKQACJso661SqY67Y7nOh/MHp7UVd9vYkUVOFL0sxnMzodkQmuOg== 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 4XwvJh2zsWzdHM; Sun, 24 Nov 2024 03:21:56 +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 4AO3LubJ040917; Sun, 24 Nov 2024 03:21:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3LuGT040914; Sun, 24 Nov 2024 03:21:56 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:21:56 GMT Message-Id: <202411240321.4AO3LuGT040914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 6890e1e79341 - stable/14 - igc: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6890e1e79341b52665792978899b94a1bbe311dd Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6890e1e79341b52665792978899b94a1bbe311dd commit 6890e1e79341b52665792978899b94a1bbe311dd Author: Kevin Bowling AuthorDate: 2024-11-21 02:38:01 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:21:30 +0000 igc: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Sponsored by: Netflix (cherry picked from commit ab540d44ba3201ff8313b90ba0096004603b2e34) --- sys/dev/igc/if_igc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_regs.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 38fb1406b1c1..9a4d0b2dd0ac 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -127,6 +127,7 @@ static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); +static int igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); @@ -497,6 +498,27 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3013,6 +3035,43 @@ igc_print_nvm_info(struct igc_softc *sc) printf("\n"); } +static int +igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct igc_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IGC_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IGC_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IGC_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IGC_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IGC_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index 26614dc33df6..17fa89e492e8 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -145,6 +145,8 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ +#define IGC_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */ +#define IGC_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Nov 24 03:22:48 2024 X-Original-To: dev-commits-src-branches@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 4XwvKh73jfz5dL11; Sun, 24 Nov 2024 03:22:48 +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 4XwvKh6ZYhz4JL4; Sun, 24 Nov 2024 03:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418568; 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=uH7Cb6QAfuZQRnXoJFrVnoUcu/7aDTud8VfahLxQ4Zg=; b=VS15w2a5Ac9OE93wvbQuanTBtaqsT/2Dz/LnMcZKAf/CYyYMBGSrKn82nNHohZn9zXD8EO 6fc/r3OcWgaPH4ejiyXz7Zs9g0yxJldI1FZoIzr/AS3DqKS2CVWsaNXlJAFxpVZ/YHn+6X quajsoZLFc3M9shpszvUoBlGQxHv9FlMtBRRRkJPlN2V+iihUbHZbzEg5UyZxbe44QzcFD vWSHJUbqOWXx208mbO15hpR6uHbYNe2dP2b3FBUc711IQ4aZcXmukJd4cWxiwL59/W+wPI egV/H1xjVhTn4M5bmHMHC9ESITDRPBHY+2LOqr/vsaLFo5KrmaSeRaSo+5dZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418568; 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=uH7Cb6QAfuZQRnXoJFrVnoUcu/7aDTud8VfahLxQ4Zg=; b=fJGZx0HXkRQ4pblVYvOj9q84Sb9yf9V/IVj+yYSbu1B4W28U3Re2aVQbnGw5x0TLTZHpI3 vDDRcOu/0ZaxCNpOmlznwWv0pKBdBGvaBBhKk9B+TuwezQmp/FCcEZAZdZhT/Tz639n+9k s2o1z5tSih42RGOTonQnleE+PJRXD5wDPQrWpZbgdDiFlcClYP+14Dy9R8UXBC1NblMTl0 WM0X7CtNb33FmApTVtERW9lwca8Ot4WFa3rSTGPv/W7aQHMDE5V46qo7I2n2iaKvAZgpSW BOSzml3ql624ErzkePAoTHujbn5JFdyWjk8hNUyVmqvKBxyJCVnupSP+VAQZNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418568; a=rsa-sha256; cv=none; b=fQGzxUYi7Hqd+znXu0Z705qBJ0oxceNo9Xb53XAXhs5YKo196uSVGJ3tDV6vxE1asJD8t0 DZhcEUyniGE8f5DWLXDi8fgliGXUUBntsjlDrmzvVhEALzqnCaRSRO/bgUsa6ioRKpNfks 15FC6UoYonK9BOKVSx82UuUyVH9oKN75pZ5OpkXV3LmwBshnSa2UVquo/1RGlTrD26j3Vj h3qj4aTrYmVBNyz2tpBcAofKiBUFhxY/3JbR/ub7kaMBorLyvQHZ9mzz4HeWzi3gZv80rJ 081C8XutXGMxxy+A56mIObVIPQY41g3VWoW1ysDbQqxd1f3sJFsnJkQSpbp24g== 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 4XwvKh69cpzd6T; Sun, 24 Nov 2024 03:22:48 +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 4AO3MmJl041355; Sun, 24 Nov 2024 03:22:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MmFh041352; Sun, 24 Nov 2024 03:22:48 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:48 GMT Message-Id: <202411240322.4AO3MmFh041352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: e5149ac66c2c - stable/13 - ixgbe: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a commit e5149ac66c2cb809b6ed5fc3ccf09002e481fd6a Author: Michael Tuexen AuthorDate: 2024-11-21 01:18:17 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:16 +0000 ixgbe: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to fix the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Michael notes emperically 82599 has an unexpected middle mask: Chip First Middle Last 82599 0xFF6 0xFF6 0xF7F which should be fixed up to 0xF76 (RFC 3168) in a future commit. Reviewed by: rrs, rscheff Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44258 (cherry picked from commit eea2e089f8dadf850a30ed837edd7a386427a9ed) --- sys/dev/ixgbe/if_ix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 8ddb0315f254..993aa48d51ef 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -204,6 +204,7 @@ static int ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Deferred interrupt tasklets */ static void ixgbe_handle_msf(void *); @@ -2743,6 +2744,24 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, ixgbe_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", @@ -4729,6 +4748,43 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) return (error); } /* ixgbe_sysctl_eee_state */ +static int +ixgbe_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct ixgbe_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IXGBE_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IXGBE_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IXGBE_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IXGBE_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IXGBE_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /************************************************************************ * ixgbe_init_device_features ************************************************************************/ From nobody Sun Nov 24 03:22:49 2024 X-Original-To: dev-commits-src-branches@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 4XwvKk2f50z5dL12; Sun, 24 Nov 2024 03:22:50 +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 4XwvKk0Tmkz4J8q; Sun, 24 Nov 2024 03:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418570; 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=5UJV/IlOlS7Mqv/F9R6pExmQ7wbuIyPR1bA2HZ/TTWk=; b=uB0M60vsGjFl1OR1Mf4m/G2omcbzg7CrVpmKkE+6z/AlF3UREt3K5RA0DobU1YY59O9Wp0 C+5icJKi2MIp+sSMX3Ze0vAgSuQq+wNKuyOaMMD/GNhrwKAC7eOJBmahcIlA7Zn7SqnqVh pAh0ZsEv/Hk0neadX0HP+i5DJmLSxMRXWKWjOhfAAwGVnBzxG5eZiOxpFsyqGvGAr9y89i 3HYqK+DGUiYMrNumpEmMQmAsMycWSl7b3+nzBS0hIaNyX+IBmuUUzO0QSxcE4vNQw7X8Yb 5put+EC62FU5uA6k2F331NowAKZsYpTn5oOggqoU7Oy9atJ+b/D47+8808uAUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418570; 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=5UJV/IlOlS7Mqv/F9R6pExmQ7wbuIyPR1bA2HZ/TTWk=; b=BIMBzAWJaVDQwKE7ohdCIeBY7mk69Dc6vgnRg0Glb59fXwqctguo/hJa03JNPZx3+VeIx4 A6JodG0Fw/HG3i30UO7CoUqSdrwJKLii6mGpA9ubwC1y6AKRc5VFUh3Ssgqlz1iYh+ob0P Q4UfxCssemj9/604sr7cdBMzrQvQ1CGZrgrabjhQXIR/0aFNJXmEjPQytsTHj7I7nOnbzn FgYm/KGr37lE7EunYjMMH6G9uE9w/6/aq73Ke4uEMXOn6jeNN5L0BbHSffRgf7q6lfgUDP mAQki7cRJ/+EglFWe/c/rv1/x18knJkpSENC46rzHnrpfogBEEZWDRAo9S4kag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418570; a=rsa-sha256; cv=none; b=KZSMnFrBLwpSboPWwbBFhXctfL8FKc4bo9RGLpmSF6BLICjuSL+rw4lvDXKEoOCaupIwLr sCEO/eaB2hTl5lwVqmKRsOJHEV+M1/hYC698BuzL+RbCEYR97WXCKEaUpbHQPcXMZNRAPR fEDY6GNSALCu6v7XG0/MAve7lMue3hAnoJOLjhA7m2NIsBtZw+S3cZ8ldR58KuOSXRjawQ QPvLHXBu1IyPVln9ZacEOUqi7sRMCRF5g57i20G2mHmDGxssaXQqTvOrPyCcTm3UzhZq9g 562GqgM2g0omZRFc5k/AnWd6Y0Al/LPDrHYrH3yjJ4XFdZ8vFeY4+v8fOmCyeg== 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 4XwvKk05qJzcds; Sun, 24 Nov 2024 03:22:50 +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 4AO3MnfJ041406; Sun, 24 Nov 2024 03:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MnNQ041403; Sun, 24 Nov 2024 03:22:49 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:49 GMT Message-Id: <202411240322.4AO3MnNQ041403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 367e42ab984d - stable/13 - e1000: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 367e42ab984dc8d06e0b7d662642b8560527cf4b Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=367e42ab984dc8d06e0b7d662642b8560527cf4b commit 367e42ab984dc8d06e0b7d662642b8560527cf4b Author: Michael Tuexen AuthorDate: 2024-11-21 02:22:10 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:28 +0000 e1000: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Reviewed by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D44259 (cherry picked from commit 90853dfac851afa9e8840f5a38383256d75458b6) --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e000343eb4b4..537faf046bca 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -333,6 +333,7 @@ static int em_is_valid_ether_addr(u8 *); static void em_newitr(struct e1000_softc *, struct em_rx_queue *, struct tx_ring *, struct rx_ring *); static bool em_automask_tso(if_ctx_t); +static int em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); static void em_add_int_delay_sysctl(struct e1000_softc *, const char *, const char *, struct em_int_delay_info *, int, int); @@ -878,6 +879,24 @@ em_if_attach_pre(if_ctx_t ctx) igb_sysctl_dmac, "I", "DMA Coalesce"); } + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, + "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, em_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -5184,6 +5203,43 @@ em_sysctl_int_delay(SYSCTL_HANDLER_ARGS) return (0); } +static int +em_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = E1000_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = E1000_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = E1000_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = E1000_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + E1000_WRITE_REG(&sc->hw, reg, val); + return (0); +} + static void em_add_int_delay_sysctl(struct e1000_softc *sc, const char *name, const char *description, struct em_int_delay_info *info, From nobody Sun Nov 24 03:22:51 2024 X-Original-To: dev-commits-src-branches@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 4XwvKl2rj3z5dLdS; Sun, 24 Nov 2024 03:22:51 +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 4XwvKl1X3Wz4JPy; Sun, 24 Nov 2024 03:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418571; 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=PlPTpHY9LhZzHCZKa5I4/Jp0JoCCnD+zgg6dO6M1KE0=; b=uX+GNaJ0VfhURdAf42RKrxCN3xfrO/MkJqGrxgZdnPhqWw9HF+9l1TgYzRhKXfMtg8rVb0 BFoVr7E0VBearxLdt+cJsmSpr9W1jJiMk8jOxOjqRzdwjSL0dt/tRwOizEvq4BlpZVxO+Q rHl/N8pubN1sTUexWFieNkWV3nugWB3u3k1eyIM6IixYRXQcHceXq4D5E99rd7v9AU4GZH ftSRr7EYI/MbfcFVk2RqrTZAIeACl7TigP7ZekpundekOlIHkFnAPG3ZHDzN+F89cplbSO Nv/j3jYUW2rfZcO3bKo3OnSipLsM0Z5sO/7UysrYhqptLavOCrZDl0MDBEJfOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732418571; 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=PlPTpHY9LhZzHCZKa5I4/Jp0JoCCnD+zgg6dO6M1KE0=; b=n24K91pm8y+5KHihz0OpTJ5A7esKI+8o3QXL21S8rcr3ESJTmt9dFzbLpmKQyKezg9ZfMD 3NddOx3QQ09vuzlpN8q1LYCJsGOq9MJD/mDqIk9c0S258dI+BKCXjS4ZbkqhjiW5+fmPIM TrdHdlusLiz8quZ24p77C/1vUG0caoRLvwYdsCiayhrf+KOWYX9forSLm5CkJ+3diqpWK4 R63Os7ANiQKzr3iM3JpGrI9ZJSjna3YEF+cRiLV420FhjFq86KPMl0swtXog22lEFE2NV8 1vRthpilJ/93yfRPrvXknj/y0O6lMcR6sb85wXPZwQ7oUOd3D+Oml7O9D+zKqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732418571; a=rsa-sha256; cv=none; b=GngRch0S7R5ssqy/RuarmwuE9GdyED9nQPGkfXHS7DIuRiCve7E8+SPDgZLjMABlxWKg7T Vm8WrNqkHEucUEsxLPa49xiUxos5otF9Risy+9YbOlu1hbwux3FyjKSLM4m0S+F+5+BBpW DfmEmr5diJxBzDrNCaW7XHFr+CxcMav0wWzz1B0r3vMPUotsf7imbAaRgo2ympPZe+z5sD Ca34l4XSKVZUFnCJGH80Cfl/wSYfwTo59oUOP/SV7xfQsTacZOhdpmEFFaXVx7BhNm+oXP 5zbCz1rak9lpWTR7KqlVn1VF2dGiX2sLiTm+1ncn9F9ahfTIsz3woNWgLpvpeQ== 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 4XwvKl17m8zdJJ; Sun, 24 Nov 2024 03:22:51 +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 4AO3MpdO041457; Sun, 24 Nov 2024 03:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO3MpjJ041454; Sun, 24 Nov 2024 03:22:51 GMT (envelope-from git) Date: Sun, 24 Nov 2024 03:22:51 GMT Message-Id: <202411240322.4AO3MpjJ041454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 27f62dfa4447 - stable/13 - igc: sysctl for TCP flag handling during TSO List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27f62dfa4447442c97c776c2267d6ec677a30f23 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=27f62dfa4447442c97c776c2267d6ec677a30f23 commit 27f62dfa4447442c97c776c2267d6ec677a30f23 Author: Kevin Bowling AuthorDate: 2024-11-21 02:38:01 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 03:22:39 +0000 igc: sysctl for TCP flag handling during TSO Add tso_tcp_flags_mask_first_segment, tso_tcp_flags_mask_middle_segment, and tso_tcp_flags_mask_last_segment sysctl-variables to control the handling of TCP flags during TSO. This allows to change the masks appropriate for classical ECN and to configure appropriate masks for accurate ECN. Sponsored by: Netflix (cherry picked from commit ab540d44ba3201ff8313b90ba0096004603b2e34) --- sys/dev/igc/if_igc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_regs.h | 2 ++ 2 files changed, 61 insertions(+) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index 5851b715b932..9ecb1d3fc44d 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -127,6 +127,7 @@ static void igc_print_debug_info(struct igc_softc *); static int igc_is_valid_ether_addr(u8 *); static void igc_neweitr(struct igc_softc *, struct igc_rx_queue *, struct tx_ring *, struct rx_ring *); +static int igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_softc *); static void igc_release_hw_control(struct igc_softc *); @@ -498,6 +499,27 @@ igc_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW, sc, 0, igc_sysctl_dmac, "I", "DMA Coalesce"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_first_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 0, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for first segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_middle_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 1, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for middle segment"); + + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "tso_tcp_flags_mask_last_segment", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + sc, 2, igc_sysctl_tso_tcp_flags_mask, "IU", + "TSO TCP flags mask for last segment"); + /* Determine hardware and mac info */ igc_identify_hardware(ctx); @@ -3014,6 +3036,43 @@ igc_print_nvm_info(struct igc_softc *sc) printf("\n"); } +static int +igc_sysctl_tso_tcp_flags_mask(SYSCTL_HANDLER_ARGS) +{ + struct igc_softc *sc; + u32 reg, val, shift; + int error, mask; + + sc = oidp->oid_arg1; + switch (oidp->oid_arg2) { + case 0: + reg = IGC_DTXTCPFLGL; + shift = 0; + break; + case 1: + reg = IGC_DTXTCPFLGL; + shift = 16; + break; + case 2: + reg = IGC_DTXTCPFLGH; + shift = 0; + break; + default: + return (EINVAL); + break; + } + val = IGC_READ_REG(&sc->hw, reg); + mask = (val >> shift) & 0xfff; + error = sysctl_handle_int(oidp, &mask, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (mask < 0 || mask > 0xfff) + return (EINVAL); + val = (val & ~(0xfff << shift)) | (mask << shift); + IGC_WRITE_REG(&sc->hw, reg, val); + return (0); +} + /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index 26614dc33df6..17fa89e492e8 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -145,6 +145,8 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ +#define IGC_DTXTCPFLGL 0x0359C /* DMA Tx Control flag low - RW */ +#define IGC_DTXTCPFLGH 0x035A0 /* DMA Tx Control flag high - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Nov 24 16:46:10 2024 X-Original-To: dev-commits-src-branches@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 4XxF8g1Gvyz5fLxK; Sun, 24 Nov 2024 16:46: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 4XxF8g0rCSz4BHM; Sun, 24 Nov 2024 16:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466771; 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=owhQP3//vbrce5UzxRbafmLdsvdCN1PuWubFhYfAUCs=; b=PovlNiNDc86kCbRw/LsIXg/JgdFOt45IiMU4DxE3N0472/JIxOP4JJXfRiHl6pssbJykJC 0kYDqskQnG5dhT/vh9nEFp70KpPa61lOKzwxAXjk0yLis6hVY6dA5Lrnup3Y9d0tl/FlY8 qA1i/488K1hRFQOVF6DDVyVICDuj3ooI9KiPIP5+PXE0ntnjbxX51MMMjhf+74iJETxQ9Y Dlb/gtveM8bGtQrIgOmMHVdl5DNGbcb2ZFfSE/PVQZMrsbxTML2cLnbIUG1j1GkiJYEOK/ YRYkI3qAbWBgs6MrYrBfufWmifHzXQ3qw+8uMA4DRjgCHTSi9DtlLvN7dd8qsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466771; 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=owhQP3//vbrce5UzxRbafmLdsvdCN1PuWubFhYfAUCs=; b=JDoN/4erhhEb9WuGg2VvD657TwqAgSGM4Cqddcchr5CKFAOS7janY7KlvlqbbphRYUvwHN TJunYGCNTh0ud37+I7CSJ+Kn4AR/ZgRifUne/rgDK2cTUSnoT1MG0TGYlIAInbGE2fAHUC oIj79apumwfxgL7btNPYzZaZMHPJPRrrWgrWA520vRa0VfMmV+EjXZ5o6QlAup3G7e2UFS T6UWpRU2eb5Iyvm7Qq6st2UDOnmbUNc5Fb8ct8Wfg6clckpS0a00kM3/34/4DumVlXriOm 3HMY9NpX+D9DF/eZh6N+guNIbsH/eWDycqbOvbNWpa3JgITYugV6x6VT03yeeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732466771; a=rsa-sha256; cv=none; b=hJAzo1PU4iK5GJPsxnBr6XY8URjXwhNbO13xROf75eDHXxa+TehnpaTYpSjj4e46QcDoaj PIMMeO9vgr6Iia0edsNaNYX5/D+6b1YgQHu7eQtXK64lxNAzonbdNa0Vg20NhygdtKSbEl SjtG8JLxoEMVX7YQTwoDDR2YEp5qGqU7WjyCqFGGfgniLa9NH9Wg8B0Ruf38JdA6/v0FRN CDN32moVYLJ0NC1R5kMFvlwKt+NhFVR63yroeyOqENSbS6RNu87tyqKuik+QbRla4zz6RG utqUrT2ofWuubzb3mWeBQsPBUrX9w8fZRssoyzgRQ/zQGHibA97O/Hb2pQcYXw== 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 4XxF8g0QmSz12VQ; Sun, 24 Nov 2024 16:46: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 4AOGkAGg038300; Sun, 24 Nov 2024 16:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOGkApr038297; Sun, 24 Nov 2024 16:46:10 GMT (envelope-from git) Date: Sun, 24 Nov 2024 16:46:10 GMT Message-Id: <202411241646.4AOGkApr038297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 28092a8bc72e - stable/14 - mac_bsdextended: Remove \n from sysctl descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 28092a8bc72e969d3736ff064ad3f1ca7d80ce0b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=28092a8bc72e969d3736ff064ad3f1ca7d80ce0b commit 28092a8bc72e969d3736ff064ad3f1ca7d80ce0b Author: Ed Maste AuthorDate: 2024-11-21 15:22:27 +0000 Commit: Ed Maste CommitDate: 2024-11-24 16:46:00 +0000 mac_bsdextended: Remove \n from sysctl descriptions sysctl(8) prints a newline after the description; the description should not end with one itself. Sponsored by: The FreeBSD Foundation (cherry picked from commit 6b62e00da4ad0624fce5e6f0b5b39a6f44c8ba60) --- sys/security/mac_bsdextended/mac_bsdextended.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index d143901330a1..95efc537735a 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -88,11 +88,11 @@ static int rule_slots = 0; static int rule_version = MB_VERSION; SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); + &rule_count, 0, "Number of defined rules"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); + &rule_slots, 0, "Number of used rule slots"); SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, - &rule_version, 0, "Version number for API\n"); + &rule_version, 0, "Version number for API"); /* * This is just used for logging purposes, eventually we would like to log From nobody Sun Nov 24 16:46:27 2024 X-Original-To: dev-commits-src-branches@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 4XxF8z5025z5fLv4; Sun, 24 Nov 2024 16:46:27 +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 4XxF8z2wJCz4Ch6; Sun, 24 Nov 2024 16:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466787; 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=vKNH2QWVigGudlyFNuJGYdexfcx3BvxKEpPRqzagras=; b=OkCVtx8wE96Bccb7TchRONzeOb+wzBJVnOSSjo9nB4g7dtEi5pv/CKdk28s1HxVs9+746L LqV1+wXqbGGMl4xii5zzsUXpWUoGv1o0lwf7rENtor6u8rTqNk+yjGjUPdP+CSETs/3pHR sB/cS8RQHclX2EOvzjvO2kQkjSG1XpYctTivTm9iW3gVqi36Hj5KGPgQbdbJzV6nQ5UfI+ ns5UfODW7kWmQin6R0VS1scOc/LwcCZj3u1GCwvcQM0hcy1HG87ZpFzzsbvKVY6JNvjpEP 3Rs6d7UEXyH7b6+1kiAJP0f6VRrPds3kieQLRqnuONT4G6tfTHQ6izWZCSt4bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732466787; 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=vKNH2QWVigGudlyFNuJGYdexfcx3BvxKEpPRqzagras=; b=XxKQe7c9ZbSCv1u2/Rsr97nwqhFwQntEFufLaFLwAA1i9mKYF0rKeyeUK7YbDCsADY/OUl KH8fPZN8i18l4bkePKJQz3PJDoj5bNiT82YI1QZIbreQRjSQxKuLQajoD2x0wlJkzoNKIz PEMz2bqz8OOVC3t7chGayYQAKTLeP9EPieLU+Jptqr7JStrfXo7K4H3zh8mw+qoLJPcXkx 7sQYAGJGwoYrGW4XpjEzihJKtOUGYxGrXg/62rzUSu+SDzJhE6tDdgECINj1nH/Ry7C4zo B5Alty17ZNQZW1UYbV0D+IVl+4VDaoocmBwL39EEKHxF5bY1vNwGjHnFlnra0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732466787; a=rsa-sha256; cv=none; b=BzOuzSivinX3dFf0DJrUE5J2T2CIwrue0fr8FGnPX7gGJG/tZSa5WccYMGcrgmfQDMkzvg XE8OlvwxL/4LvHTxmGWAiWHpzcdm8v+Ndcqh95WLR+3qty7dKuKKPeueePuq2aYeUcitop 0lAZrh1X4hz9l8Qpl33uQdFYaX1MRg0q+SC7DtFb6AmZsZe50BQLp6Kg/xHp2VLxIsEuQF ujd2mYEhWL/un9I2mIM521YUpj1HU0EuZWAf1tNxWBzJ3W8c5eJyiTxO4f2i1D3EDQqOfE 4Jh0hgAZstRqYEn8yT9d7WNOBiubkM/wrhvHDcDE1PT+N5BBKEzcYo08HTve+w== 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 4XxF8z2JqZz12VR; Sun, 24 Nov 2024 16:46:27 +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 4AOGkRSV038487; Sun, 24 Nov 2024 16:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AOGkRb9038484; Sun, 24 Nov 2024 16:46:27 GMT (envelope-from git) Date: Sun, 24 Nov 2024 16:46:27 GMT Message-Id: <202411241646.4AOGkRb9038484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 93a321b60750 - stable/14 - libc: Note that getentropy is nearly POSIX 2024 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 93a321b60750df2900e0a856c5e7210276147816 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=93a321b60750df2900e0a856c5e7210276147816 commit 93a321b60750df2900e0a856c5e7210276147816 Author: Ed Maste AuthorDate: 2024-11-15 02:29:49 +0000 Commit: Ed Maste CommitDate: 2024-11-24 16:46:00 +0000 libc: Note that getentropy is nearly POSIX 2024 Our implementation currently diverges from POSIX 2024 in a couple of ways, as now noted in the BUGS section. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47589 (cherry picked from commit 95b71a659a9bdc6e9071d80c7369a935c2bc16f4) --- lib/libc/gen/getentropy.3 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/getentropy.3 b/lib/libc/gen/getentropy.3 index 0a3ba3e25610..5bbbc80e2414 100644 --- a/lib/libc/gen/getentropy.3 +++ b/lib/libc/gen/getentropy.3 @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 24, 2018 +.Dd November 20, 2024 .Dt GETENTROPY 3 .Os .Sh NAME @@ -69,10 +69,8 @@ Too many bytes requested, or some other fatal error occurred. .Xr random 4 .Sh STANDARDS .Fn getentropy -is non-standard. -It is present on -.Ox -and Linux. +nearly conforms to +.St -p1003.1-2024 . .Sh HISTORY The .Fn getentropy @@ -82,3 +80,9 @@ The .Fx libc compatibility shim first appeared in .Fx 12.0 . +.Sh BUGS +.In limits.h +does not define +.Dv GETENTROPY_MAX . +Some error values do not match +.St -p1003.1-2024 .