From nobody Mon Jun 15 01:47:09 2026 X-Original-To: dev-commits-src-all@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 4gdtKG4Cgfz6gBC1 for ; Mon, 15 Jun 2026 01:47: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gdtKG3Qp1z49dh for ; Mon, 15 Jun 2026 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781488034; 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=b2da4ssSC/XrD7wXbhMS3zqa0dxM10o5nHf37gG7Y00=; b=Ascsha7E7/Oe/BQZ0+IhaBYf4ai2gkzoosMjJ4wjByFrVTIv/rDe8skvpem7awZe58H9F4 D5jC9s5HEWXB0GHO7kRswSwuIw9Q++OkNHFUhHUfKwXbbLu5RMNqu7mhMgOCUzTP4ImPgo 7O9xobxlp3x8Hu4N7W68hzdKX7XBqib+Jfwrx4XM7I9hQZ3PixB5v1uuw3fbZd6HPViS94 20Hsv8DxOL+SUnEcI2iRvxY9waQ3W+e4hThrzGf2MYngh+ZBfsUxHQLEEi++OoIAS9i2ib 5ry41hVHMWxDWmtKAhG5+7wr6dGIE7S8sx69Ig/3HOS+xh6WOHxBr5a8R+U3uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781488034; a=rsa-sha256; cv=none; b=XQxWpqNqFyC2TsXk+qQLVYx27vWf+qqm0nS914zHWIQTAfQ4yJe5jodfekLJLpk3m+JNoy UhkabXJ4dMrYxfXbn8INigplXIS7pkzZ2jycc7nHTdgr3sB/+L5wL1tPBV4ZhHFY5vvoc9 obOVzVlbQD82nCitInOAA1DAiyiznc4E905ml2/hEw7qpwg1ammj43gHUPPmaT5vIhcs9W 0wuNg9tjOyAyEcXvhKiAW4ABB1sX7FzRe3ccK0O8Y2xJdaVDNIhmA7yYJuKt4vaANiw/nW Ngi36aNhdhbsEaNZqogqyRkm+bu6foavIfD56Z6CIc1GJuiCvo+BD8JMHDgVXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781488034; 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=b2da4ssSC/XrD7wXbhMS3zqa0dxM10o5nHf37gG7Y00=; b=dWKQnh3RNtQS3LPe1RkVpcAFVN2iJ3zFrWZ5KSqoN/W9FNMXbKAYeHjqu06LxcNZvcd38h rV7Uyex2yvNu8zPIEcnHkj/Mmzw/VNrzDeA9XkE+a+3uKe47LMlmgk9t1EGgMuCdc1dD8L ucHj6J6EPL1sN5rGMDDXN6lGHl00HiPFgk5inzfTTEmA4MPxABSxXILejGBzNWsjdoBPUs 84U6rEHh6YGhd0SyqBe5tFK54CdCCUAePs43E3RTdfGuGU2FKc16xDSMBwS4SN5WIsyG+T ckWyO0IJ+Kz5XXHGwaSwD+NwmEm6Y4PGi6kHuPpgqUits8XlkeJoTAvMq1uMRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gdtKG31HmzbMQ for ; Mon, 15 Jun 2026 01:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 264d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 01:47:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Lo Subject: git: fa75c1cc2426 - main - mwl: return ENOMEM when rx buffer allocation fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevlo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa75c1cc242665d123ef5bf2f4ced2e076b35450 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 01:47:09 +0000 Message-Id: <6a2f599d.264d7.1185c1d0@gitrepo.freebsd.org> The branch main has been updated by kevlo: URL: https://cgit.FreeBSD.org/src/commit/?id=fa75c1cc242665d123ef5bf2f4ced2e076b35450 commit fa75c1cc242665d123ef5bf2f4ced2e076b35450 Author: Kevin Lo AuthorDate: 2026-06-15 01:43:57 +0000 Commit: Kevin Lo CommitDate: 2026-06-15 01:43:57 +0000 mwl: return ENOMEM when rx buffer allocation fails The malloc() failure path returned error, which is 0 at this point, so callers would treat the allocation failure as success. Return ENOMEM instead to correctly propagate the out-of-memory condition. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D42282 --- sys/dev/mwl/if_mwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 87e2679778db..3dc44ba20ee4 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -2165,7 +2165,7 @@ mwl_rxdma_setup(struct mwl_softc *sc) bf = malloc(bsize, M_MWLDEV, M_NOWAIT | M_ZERO); if (bf == NULL) { device_printf(sc->sc_dev, "malloc of %u rx buffers failed\n", bsize); - return error; + return ENOMEM; } sc->sc_rxdma.dd_bufptr = bf; From nobody Mon Jun 15 08:55:41 2026 X-Original-To: dev-commits-src-all@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 4gf3qd5qnzz6hB8X for ; Mon, 15 Jun 2026 08:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf3qd1Vjfz40D3 for ; Mon, 15 Jun 2026 08:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781513741; 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=FzTIDMWAupW6cN9GqI/XD9kYYY2Fjv1stGeKQbDFeOY=; b=ogOieFcNYENjNGtXHqguw/5hHCylunmieCy04kt36FHNpUDnQx+tx2aO0/Fb1RcKjal8eU augZ5GsR3BRmxfIEiWdKYuP8YkdUn/pEGa/fAXaSENYfUjDxREXE0/GmQZ3g/HwlXETWMj 8wA+w6QBKy79T3NxC/Apbnikc20Q4meYXsdAToba+lA2wp3QPTHqcpRvwMEaICkkuJ1gcR N3fKDZMVwsBgLha0vUCwGFRMQAZpUYHISX2yf8nCeVoXymnH8e7keSImI20nG5rPareP8u FuzYTaVayB7pHgBakg+3wQbag8OkqZwHd6h1e1CoO3JzRVNkST3egjU8cP4LmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781513741; a=rsa-sha256; cv=none; b=s2PqJtk1FbyoeD7GQJ6WQCfIUbfiILT7/+whYXg48JTLJBj55jAEWr+rAJvVa0qc2lZvB9 vz4biEELMR54SsOdg7MY+68FPf0vkGm2aF3YB7qwwmvfam8YCUFD1GvfANnPigqT4ff80r JDlZDzRJti47KMQOmH70h4axmbZnJdXQo6XIoIs9lNtmv37ea+3/ch8fk3xbAmOZdI9eyW MN95OaJUvRDQu7TO1J0xo1Fic6f/sS57X+vauFwc5MpLolH4bvufdw0OSV9wmKvf5L6jjM 0RhuQGEWZXcLI1AW4j1c77O4lb64AFRCkBZ6soEZ1GDyVNUz2Kdp/UK5DHN7KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781513741; 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=FzTIDMWAupW6cN9GqI/XD9kYYY2Fjv1stGeKQbDFeOY=; b=RfLmVHDgs0LH/DTvXaKu2Oq9mFBqzUSq5h7RaKdxBC0gNy0Ej6y6rjgz1WTZj2hjE5SU92 fEB43GhIGBUK0Qn7YSgDQH1xCE5xID4ymFBlnhmE3xAS4Uyll47r1v+UjeTMOTHTgv+sqn F+hY+mB6YAxdCM5YObk19VeSg7AVIADYtdk4AygQ/yTpHU5WnB7HgyjKb+saxFl0wdlguz A0v9BQhoi5LhZtxlHmo1jYGC0e2qjCPiC4N14FP0NZ4hGqyONxXLF5KaS9q55dfG3ddyKI RO85ey/+bfwLL4wN6vTKBinilbfWFzf7FvXfq8WNU9ohQzjgQ6mfz+xPa+RKzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf3qd0ZmYzpS9 for ; Mon, 15 Jun 2026 08:55:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3335b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 08:55:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: d32b6065fd7b - stable/15 - loader.efi.8: Address mandoc -Tlint errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d32b6065fd7bb8d2d54a2fa1a970b670d5f9c896 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 08:55:41 +0000 Message-Id: <6a2fbe0d.3335b.6e2b5e60@gitrepo.freebsd.org> The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=d32b6065fd7bb8d2d54a2fa1a970b670d5f9c896 commit d32b6065fd7bb8d2d54a2fa1a970b670d5f9c896 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-06-12 12:27:04 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-06-15 08:55:26 +0000 loader.efi.8: Address mandoc -Tlint errors MFC after: 3 days (cherry picked from commit 8e1f5baa62d7f442a6cbd62d84dd4b4c80920153) --- stand/man/loader.efi.8 | 51 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index d9ee55ee192e..0c6f7a98429d 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -2,7 +2,7 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2019-2022 Netflix, Inc -.\" Copyright (c) 2022 Mateusz Piotrowski <0mp@FreeBSD.org> +.\" Copyright (c) 2022-2026 Mateusz Piotrowski <0mp@FreeBSD.org> .\" Copyright 2022 The FreeBSD Foundation .\" .\" Part of this documentation was written by @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 11, 2026 +.Dd June 8, 2026 .Dt LOADER.EFI 8 .Os .Sh NAME @@ -50,13 +50,15 @@ when installed as the default EFI boot program as described in or when configured as an EFI boot entry with .Xr efibootmgr 8 . .Pp -On systems upgraded from FreeBSD 10 or earlier, the EFI System Partition (ESP) +On systems upgraded from +.Fx 10 +or earlier, the EFI System Partition (ESP) can be too small to accommodate .Nm . In such cases, .Xr boot1.efi 8 -may be retained as the firmware boot program. It -will chain-load the current +may be retained as the firmware boot program. +It will chain-load the current .Pa /boot/loader.efi , which is updated during the .Cm installworld @@ -159,7 +161,7 @@ with the proper port address. PCI or memory mapped ports are beyond the scope of this man page. .Pp The serial ports are assigned as follows on IBM PC compatible systems: -.Bl -column -offset indent ".Sy Windows Name" ".Sy I/O Port Address" ".Sy Typical FreeBSD device" +.Bl -column -offset indent "Windows Name" "I/O Port Address" "Typical FreeBSD device" .It Sy Windows Name Ta Sy I/O Port Address Ta Sy Typical FreeBSD device .It COM1 Ta 0x3f8 Ta Pa /dev/uart0 .It COM2 Ta 0x2f8 Ta Pa /dev/uart1 @@ -172,7 +174,6 @@ Though and .Dv COM4 can vary. -.Pp .Ss Primary Console The primary console is set using the boot flags. These command line arguments set corresponding flags for the kernel. @@ -185,8 +186,8 @@ Boot flags may be set on the command line to the boot command. Inside the kernel, the RB_ flags are used to control behavior, sometimes in architecturally specific ways and are included to aid in discovery of any behavior not covered in this document. -.Bl -column -offset indent ".Sy boot flag" ".Sy loader variable" ".Sy Kernel RB_ flag" -.It Sy boot flag Ta Sy loader variable Ta Sy Kernel RB_ flag +.Bl -column -offset indent "boot flag" "loader variable" "Kernel RB_ flag" +.It Sy Boot Flag Ta Sy Loader Variable Ta Sy Kernel RB_ Flag .It Fl a Ta Dv boot_askme Ta Va RB_ASKNAME .It Fl c Ta Dv boot_cdrom Ta Va RB_CDROM .It Fl d Ta Dv boot_ddb Ta Va RB_KDB @@ -202,7 +203,7 @@ of any behavior not covered in this document. .El .Pp And the following flags determine the primary console: -.Bl -column -offset xxx "Flags" "RB_SERIAL | RB_MULTIPLE" "Kernel Consoles" "Primary Console" +.Bl -column -offset indent "Flags" "RB_SERIAL | RB_MULTIPLE" "Kernel Consoles" "Primary Console" .It Sy Flags Ta Sy Kernel Flags Ta Sy Kernel Consoles Ta Sy Primary Console .It none Ta 0 Ta Video Ta Video .It Fl h Ta RB_SERIAL Ta Serial Ta Serial @@ -220,7 +221,9 @@ serial console otherwise. can set variables early in startup from a file on the EFI partition. By default, that file is .Pa /efi/freebsd/loader.env . -It can be changed by setting the FreeBSD EFI variable +It can be changed by setting the +.Fx +EFI variable .Va LoaderEnv , as in: .Bd -literal -offset indent @@ -317,9 +320,8 @@ Riscv, 32-bit arm and arm64 have always loaded at any .Ad 2MB aligned location, so do not provide .Ic copy_staging . -.Pp .Bd -ragged -offset indent -.Sy Note. +.Sy Note . BIOS loaders on i386 and amd64 put the staging area starting at the physical address .Ad 2M , @@ -378,7 +380,8 @@ The location of the UEFI kernel loader within the system. .El .Ss EFI System Partition .Nm -is installed on the ESP (EFI System Partition) in one of the following locations: +is installed on the ESP (EFI System Partition) +in one of the following locations: .Bl -tag -width "efi/freebsd/loader.efi" .It Pa efi/boot/bootXXX.efi The default location for any EFI loader @@ -470,7 +473,9 @@ However, care must be taken: some multiple-boot environments rely on a special to function. Before updating a .Pa bootXXX.efi -file, make sure it is the FreeBSD boot loader before updating it: +file, make sure it is the +.Fx +boot loader before updating it: .Bd -literal -offset indent # strings /boot/efi/EFI/BOOT/BOOTX64.EFI | grep FreeBSD | grep EFI FreeBSD/amd64 EFI loader, Revision 3.0 @@ -523,12 +528,18 @@ In addition, .Pa efibootmgr is not supported on armv7 or riscv. In these instances, the user has to understand what was booted to update -it properly (and in most cases, it will be the FreeBSD path and the UEFI default +it properly (and in most cases, it will be the +.Fx +path and the UEFI default so just copy loader.efi there if there are loaders there). -Typically in these embedded situations, there is only one .efi file (loader.efi -or a copy of loader.efi). +Typically in these embedded situations, there is only one +.Pa .efi +file ( +.Pa loader.efi +or a copy of +.Pa loader.efi ) . The path to this file is typically the default removable path above. .Pp -Managing booting multiple OSes on UEFI varies greatly, so extra caution is required +Managing booting multiple OSes on UEFI varies greatly, +so extra caution is required when updating the UEFI default loader. -.Pp From nobody Mon Jun 15 08:55:39 2026 X-Original-To: dev-commits-src-all@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 4gf3qj61Trz6hBH5 for ; Mon, 15 Jun 2026 08:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf3qj1dJZz40Q0 for ; Mon, 15 Jun 2026 08:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781513745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NMaUGsu5uVghhyNXBFrCIxhZs/nipuy35vvhMTFDdjc=; b=AeGh2hsyxGCWTYYucit6akSYSmg+mKjsGjaI6tywKODEfXBlDLxmRwsujCRtuSFMouiyfm 9buxZjOzjYMHP/akJY6XpGzLiHl/gNvQe9hHOmWpQaVxmjGnzC/re3qFuN00zLbd/++5xy drmK3HL1j2wfarCiqLSRjWAO28lNVXVe2f6t1oQ8O5t+wefHj/5q4mE7UGhAlnm5oVuRbg z6jBzGv5XCCu5gc6uvNO6U6DM+vE6BxEdFV4pBU55rnMHT7ybpOso6xZmwfEpIQZDP0yfE E5nceMxn8K0Yyw967ro8Gw8HEppfRLne+Nfjq8dRQ4FtJoDtYNqbCZkCuax5Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781513745; a=rsa-sha256; cv=none; b=tzpgH8t3PKUnQXFzKA6YkfwRmrbzbic6tCjBTRJl3XYClaXDBXOv3096lfevKZpQid2vRn w7m0GNXQUUWa2ATbpoJmVvfVpYuv/vfnue896vT/Gd9WYhBQwoqw74Hp6l7kxYYr30WKwI x9OA6mpnxhOtlfbmvzTVjzQ3sp4yMSOVMc72skCXbtdKNBb/KhCdnzeGy8MfC9wRIv5JIk knSp7/MreoL1FZJffYQkzWP3RWSnnXlctyNzdFl7DhMPdDnO+ldqTrof0PkP89UsmY86vp zCV+5XZwoAachroV881hT4xvvi2m8mfVybXWBZKq0v6viE6LDEmT2cHRrP48Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781513745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NMaUGsu5uVghhyNXBFrCIxhZs/nipuy35vvhMTFDdjc=; b=QA72j/W3m2d06EKJ3hnf1N6gxXeMHWuh7PNetb4/dIEBNMY0PiunUyHXwsQqZTjlPeztWS X7Ng3pGoCwa6WM5qwadMLVeW+itm13kPO+vujns4gTesViIQFOcmzH6MQJ2DGWWZfBnsxz 1JeQlfi6rQQHeGpSrG5j0+drzbvA038mwoj8GiVRYZvG70HQ22xVPlPxrUtfYm1D7Q98/v EGPO19YRtSSomJ9s84QbOHer7HNaUPOlSk+6+vzghvI2dgNqGYEDr07oljUyGChCQOhp9s tm/1XctGFYYIl2N5MfXV7DRcZ8j/uosFW9Wz03koz7Eguf0ajArtKIWxeuF2xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf3qj16YWzpfN for ; Mon, 15 Jun 2026 08:55:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3448f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 08:55:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Paarth Shirsat From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 3bd3b6b9fe4f - stable/15 - loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3bd3b6b9fe4f221a90a1bea2817d6c4a5f0b51a3 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 08:55:39 +0000 Message-Id: <6a2fbe0b.3448f.6edff488@gitrepo.freebsd.org> The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=3bd3b6b9fe4f221a90a1bea2817d6c4a5f0b51a3 commit 3bd3b6b9fe4f221a90a1bea2817d6c4a5f0b51a3 Author: Paarth Shirsat AuthorDate: 2026-04-25 15:10:27 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-06-15 08:55:26 +0000 loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables Describe how the LoaderEnv and NextLoaderEnv variables can be used. PR: 293054 Reviewed by: imp Sponsored by: Wiesbaden Hackathon 202604 Differential Revision: https://reviews.freebsd.org/D56633 (cherry picked from commit 4137c673fa963fdf409eba2f48d615350c988ffe) --- stand/man/loader.efi.8 | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 9ff31b02dcb6..d9ee55ee192e 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -217,14 +217,47 @@ functionality where we use the video console if a keyboard is connected and a serial console otherwise. .Ss Additional Environment Variables .Nm -loads some extra variables early in startup from -.Pa /efi/freebsd/loader.env -from the EFI partition. -Only simple variables can be set here. +can set variables early in startup from a file on the EFI partition. +By default, that file is +.Pa /efi/freebsd/loader.env . +It can be changed by setting the FreeBSD EFI variable +.Va LoaderEnv , +as in: +.Bd -literal -offset indent +echo -n /efi/freebsd/alt.env | efivar -w -t 7 \\ + -n cfee69ad-a0de-47a9-93a8-f63106f8ae99-LoaderEnv +.Ed +.Pp +After that is executed, the file +.Pa /efi/freebsd/alt.env +is used instead of +.Pa /efi/freebsd/loader.env . +See +.Xr efivar 8 +for more information on setting EFI variables. +.Pp +The EFI variable +.Va NextLoaderEnv +can be set to the pathname of a second startup file. +That variable is deleted immediately after its value is retrieved, +so setting it will affect only the next boot attempt. +For either variable, a missing file is silently ignored. +.Pp +Only simple variables can be set in the startup file. It can be useful to specify the root filesystem: .Bd -literal -offset indent rootdev=disk0s1a .Ed +.Pp +The startup file contains a series of assignments separated by spaces, +tabs, or newlines. +Quotes are not given any special treatment. +If no +.Li =value +is given, the value +.Li 1 +is used. +Invalid syntax and the like are silently ignored. .Ss Staging Slop The kernel must parse the firmware memory map tables to know what memory it can use. From nobody Mon Jun 15 09:09:46 2026 X-Original-To: dev-commits-src-all@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 4gf47z2tcSz6hCJq for ; Mon, 15 Jun 2026 09:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf47z2J58z41vF for ; Mon, 15 Jun 2026 09:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514591; 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=gbKwHK/6GLzX2QMcySkUXjd7z7NeR/PacnXLjWtRneQ=; b=ZviLNUbV5VsjPaLQDOT6X8ZBLz+ctCG2yGwQHd109ip55/1oE+4fEopMRCAu47N4phV4yS 0rZM9tmI0OMcO+5MRSCuExGa3Rr6MyXs4LmCHuKc48RHjd4CYANU/vCt7MbBZVnNXXNV6k dQIhM0tkoJPQAtQSnReoOgNSAVbQf0kZ+GWShazDXXGxGjEwEKOx74rXj3FTq0cmpGuyi8 WPQJ5ZC3E5zo0oPtQcCh/ZLTGsVCac5z4sj1DBVCNENHLelo1HkbI+AzulIZBXtRpRw+Nt CpTTx5PCe3GY6EOEuKs196Rz4pZBCO7OB8umE1hk4ekmS6m8z57jMTjDSbUZig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781514591; a=rsa-sha256; cv=none; b=IjBcCsAFKs97TB2zDxroeu3Z3DzgpxBQ+kZpAqQuxuKSZ+JEdKQAe2zZ/9w+Q7ttxWDoPk w8gVNLlAGsOGXvcEAIW27Sd4Ck7hd71KUMVJyHJmJVbpa9IB2KGhDdTvT/unJwbgF17RQ2 KQMKSatn8Ruhpm63EOGsiilmQZUFIHMUkVFfPJ7Ry56PIz1N7zJ29oT0B7NbAKs2Z6CfkY IGzPvWq3s+a9d2keg4RVXLFOHBHpkADqqz63bPoLkiTUcPZrPhLl8+bbjscR9na2t/HvaH +z5x7iaVanoQTA88+QEj4hBfaLgMwgCrc4cI4yZeTejwzbCS7qPgNqvOeTftOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514591; 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=gbKwHK/6GLzX2QMcySkUXjd7z7NeR/PacnXLjWtRneQ=; b=Yci/OKPtONlpbiPSuT/ShZB1SbCu/nkp/V9EAam1S84ZAtULvQGpq+elfHj1Q7QpDPlTRp XROKK5uWi+qO1wdxUa2rwZXegz3gKmaKe7LYaNK1jUFgCGrzsYg71R6IKJyhkJPDkm1XxJ ob3h0hL0mx+WiALjtNNUIbeFHNoH9qevX/mYHK/o75kGLrKVZ+q1D/5bBSWjGvHpRvT7zh TmvEl0rlwpuSaWXvCKp/RAABsFbjQTYtUzklbTaU+zu52c4JbWLbC+9lPraD09+moKY4/Y jGfNj4G0MZFhDuH+m0NWpq2LP2+145C/sJtYh97+c0jVocfhxHsH0vxL+QRolQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf47z1snXzpmf for ; Mon, 15 Jun 2026 09:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3357c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 09:09:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d9e0452f0c8a - main - jail.8: Fix two typos in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9e0452f0c8af6b0c03b0bb2e3b824095021e168 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 09:09:46 +0000 Message-Id: <6a2fc15a.3357c.2d357069@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=d9e0452f0c8af6b0c03b0bb2e3b824095021e168 commit d9e0452f0c8af6b0c03b0bb2e3b824095021e168 Author: Gordon Bergling AuthorDate: 2026-06-15 09:07:24 +0000 Commit: Gordon Bergling CommitDate: 2026-06-15 09:07:24 +0000 jail.8: Fix two typos in the manual page - s/Similarily/Similarly/ - s/passtrough/passthrough/ MFC after: 5 days --- usr.sbin/jail/jail.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index adba3f34101b..3fc396824b58 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -683,7 +683,7 @@ to in the .Xr rc.conf 5 file outside of the jails. -Similarily, if the +Similarly, if the .Xr gssd 8 is to be run in a jail, either the kernel .Sy KGSSAPI @@ -834,7 +834,7 @@ This flag is only available when the .Xr vmm 4 kernel module is loaded. .It Va allow.vmm_ppt -The jail may configure PCI passtrough devices for use by +The jail may configure PCI passthrough devices for use by .Xr vmm 4 virtual machine guests. This allows privileged users inside the jail to manipulate physical devices From nobody Mon Jun 15 09:12:36 2026 X-Original-To: dev-commits-src-all@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 4gf4CF1xB9z6hCTJ for ; Mon, 15 Jun 2026 09:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf4CF0yvyz42hp for ; Mon, 15 Jun 2026 09:12:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514761; 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=KcS0s0aV4/vekXXLXJI8Nx8drGhbF3O0fWe9JmEcdPg=; b=A6e+45pJp582AwnXQLC4BHVM+SNwkjXCXfG50OMedFSZJqe7ftGcM9PmEAqH7v2OK9MLtz 5WpKurK5UxfnI8jH2opFn+XrURpyn8uUcrXW8RLUQXOzo1ZCpj5fXp7qYxWY0Cd4krmGAx Q68Vj+H+6h35J+h6XuxmFhQarTsM5ybuBfV4zElILjeePAOjNBgAMyy0crMKADSEIn3fo7 vhJUSh5mRflWGQA/tVaCzK/9oS7zodTcidB/okHNJ0HeuaRTFjhYYv5B5R8gXRsjBt3wHY LnZ5cR1R8tWjQG87xgLyXqYShl2lulGxdnm0kDPWSwuP+u68sswGIYdP9DhNTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781514761; a=rsa-sha256; cv=none; b=Cb5E7Wr3mmGRjtG6cek98dyMP0aHgb+PTUyD+68qqjX/bejJdz0IKp2ILNkhp0saeIdH9l G9b5FnlmOewk80VtLaxWA/vbg0mUrM+8q/s9xvR9JoLVHc9d/EafE4LK1T6WdqIvb9kepR JTzS9a7oJIysF7b+TMJVJsphFFt6EfZMEhwBxgVNEZ+mFYC459iFEu3mvycLMC+iSKtEy3 cqlLb+M8JXRtUdA6qvOFlNfxZ2bkEQUWbbkkfbVqkG6AnPYjobr5EtX1pI2xcAEKjT0p6s u6c59DnyMHEa0W6N7ei6OZ42AR6GQXnmAoNTONH7DiB8EHo9ndu0j42jLXvVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514761; 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=KcS0s0aV4/vekXXLXJI8Nx8drGhbF3O0fWe9JmEcdPg=; b=wlisohPCYM3y0f4ohwGPYGwSJLCt8UTGnBHt45WvkDIo96LNR6PTm06iwPwo+6nWEStw1a l9K96r1jlvS3spQA6L66Cg70Ll0eLdtygoVD2xmoym6awdShi1zsB6KAZB2/cYOmN3pp7f wNJb2t+j8UqDSj8GTihQ+iE+nZDhvtZC0QygFwjJl6f9EGxeWKn89vzuY9HE0e3yDV5lyj mMdNV7BKHcF/U7kxMxKc9unjC9A5/XhP95Gi98jPKYdTjLyg+Vtd1t59fYY5ks6lBqubMT cRHKhSw2qfkiYqtqBdt6973hhbJ5VZCVMma87LSHuvYiQZqpng8It8zWwoWO3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf4CF0Ww7zpTv for ; Mon, 15 Jun 2026 09:12:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 370c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 09:12:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 10b1a35d1186 - main - mixer.8: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10b1a35d11866462b5e776015a1b79f4f8f704a6 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 09:12:36 +0000 Message-Id: <6a2fc204.370c4.1e895694@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=10b1a35d11866462b5e776015a1b79f4f8f704a6 commit 10b1a35d11866462b5e776015a1b79f4f8f704a6 Author: Gordon Bergling AuthorDate: 2026-06-15 09:10:52 +0000 Commit: Gordon Bergling CommitDate: 2026-06-15 09:10:52 +0000 mixer.8: Fix a typo in the manual page - s/thet/the/ MFC after: 5 days --- usr.sbin/mixer/mixer.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8 index 2d12e6057797..2ba6cf031eb0 100644 --- a/usr.sbin/mixer/mixer.8 +++ b/usr.sbin/mixer/mixer.8 @@ -140,7 +140,7 @@ current settings by the amount specified. Note that relative percentages are still relative to 1.0, not to the current value. If the volume is currently 0.40 and an adjustment of +20% is specified, then -thet final volume will be set to 0.60. +the final volume will be set to 0.60. .Pp Volume can also be set using the shorthand .Ar dev Ns Cm =value . From nobody Mon Jun 15 09:16:18 2026 X-Original-To: dev-commits-src-all@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 4gf4HR0SX2z6hCyN for ; Mon, 15 Jun 2026 09:16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf4HQ6vbhz43Hv for ; Mon, 15 Jun 2026 09:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514979; 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=2yqMJqhxJejW5iSt2lerRXVdtO/PCtzuT47XwwyYZqs=; b=Eb+ewEdr6tVoofLjrgrwKUDz27eMgJ1tXuwjZ25PFpPv4U8wk8BCoC8rAl+rrq/u7qPLob VSjM/xUBOWBHgb/ZhV5TCYu3F1abR72jJvVTu1fTVHBUOy9syBccddrzxN9OVntOiHnUQD IkTc0atXsaeEZOrPnrF/jnkj3ndfUVqg53UuzTij8KWGWNg2ZNYnG+1+KpvxrFHpjA/XAy tKP3XCEGV3zRhYswboPz77/Egp0h7Z2KKeyaBB8Prifx2mYEhuFWql4Gupmf3q6O7DlKCT wmmil9cd9+4B2g6hGH+NGWVdHC8j0YUdn14EhXE5I0FL/D5jOxkY/w6UCRfRyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781514979; a=rsa-sha256; cv=none; b=YOohM0ZJ/BeW49VNLWHcj7nRD2lwebm5aAHeLDjV2LaED7ljotKBE3tl0r6teyZ6zTh/Vc WYYyGTLaFlGN4T8PgKpqR+rnutt7hlaf7z8vY1Vjow7qQbukuVLebmSbiP3MAYILBMGASO DMQFALba3n0c8KuP+SzI5TNXIOnwdFP9B/P9drUQhZhheodpkgvpE+oh+lxbaZPGxRgPRX 1tLG7GnUhN6DKpiyWkRbQaw9CUa3CpgZUzE9QelPRb31iUxV8XM5yaVpzz0BpTAOe1D7nF vkw99ZJMz/kqFD6jv06Cmxrz9+3+jDn1EIjzxyOKVPhrY30EiqCY50Vg1MphCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781514979; 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=2yqMJqhxJejW5iSt2lerRXVdtO/PCtzuT47XwwyYZqs=; b=RVxglx7a5FaJcli/+sozddBsZOy4X5HI1qwZzxYZJoMJFyRsuVfZjABmslxWJeofuMIOKb csrlXng+xHluKc6GnR5KfEvYqgj7s78AtgdLUGetb8QsRMXgHyERQiVST9znfRpHahhmoy ikZgqyXpwUJfVl6sCSMDVItrwMl3a/HGBDGLG/V7clRBBVjysvuUXdW2tB/dnqyndUaogG tCNwErBPJRMfZMuIeCVzC24Gn3SJSnjO2/oevvQJ+xz91fuIi+cA/hZlc0/YN//H5LM5P8 qzSS8LGY4XtLKELyqs/6O0vrVwpF7moeJP7QRrqIhglyt8lh66TyDstRDdLSHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf4HQ6NjXzpQr for ; Mon, 15 Jun 2026 09:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37705 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 09:16:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: f930d8a65406 - main - pnfs.4: Fix a typo in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f930d8a6540648423288567ff473123ff5647484 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 09:16:18 +0000 Message-Id: <6a2fc2e2.37705.696c3d5c@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=f930d8a6540648423288567ff473123ff5647484 commit f930d8a6540648423288567ff473123ff5647484 Author: Gordon Bergling AuthorDate: 2026-06-15 09:14:20 +0000 Commit: Gordon Bergling CommitDate: 2026-06-15 09:14:20 +0000 pnfs.4: Fix a typo in the manual page - s/Wihout/Without/ MFC after: 5 days --- usr.sbin/nfsd/pnfs.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/nfsd/pnfs.4 b/usr.sbin/nfsd/pnfs.4 index babd221a6d5a..d9818c051df4 100644 --- a/usr.sbin/nfsd/pnfs.4 +++ b/usr.sbin/nfsd/pnfs.4 @@ -215,7 +215,7 @@ set the sysctl .Dq vfs.nfsd.flexlinuxhack to one so that it works around the Linux client driver's limitations. -Wihout this sysctl being set, there will be access errors, since the Linux +Without this sysctl being set, there will be access errors, since the Linux client will use the authenticator in the layout (uid=999, gid=999) and not the authenticator specified in the RPC header. .Pp From nobody Mon Jun 15 11:35:35 2026 X-Original-To: dev-commits-src-all@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 4gf7N741y6z6hBpm for ; Mon, 15 Jun 2026 11:35:35 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf7N72t4sz3Jjy for ; Mon, 15 Jun 2026 11:35:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JDEpAsCqdRI/e716XI6h5cqJpTF+zZAHdFllN5scnRs=; b=WKtARarGaqdDR5NSIQTuE9n8LqhxuGYk2El2ZT5gd3fEAN3o3jrtOOScYEZXaJ2NphHqvn QU1MvyElk+jLVcVRRaOaTVbMk5/iTI04GEmxeqtKI5LwzLAxM9cv3DxHkg4W5r4DvvxEW3 vfJlbNMdMFhfBJVzRiCVW6W/Mut9lvGD+2tIsJXAVV37eCkDPfQutYyiO15gAMgkepf/Go nFlVXqnObQyoWbwgfoWF8rvBpHojdRzPd/Vzetl/b/P8/GrzU9YtS+rWGHGcXha2U5JtCU CWENWDNj3J/xs9kI72oCZGk16/TuDLnGbt07cr43YghPHfH9o34M4URqpHWe/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781523335; a=rsa-sha256; cv=none; b=oQGYE3uNHKxqwpCpubRWcTqI7htrZHHeZiM4Yt4SCngKKm4Gz/q5RXN/WvHkyRGnnHN/uB 4mt0sZ5DVgaAeyq5cJXUF+Ysa6wWNdEIYLA7Mg2qSSd4IPCFrtoM6kNMtdNfi2Wa5qChrp EgS8Hj1NahpRbHBNaKzISJDhdM0tK1mHakmO+xg3H1h4mKVKEaUwCVP7NLFgKTJwjSUVh6 Yt/9wnqffoNwmqprqqB1A+aDAAjm0b4b6M8MXNEmIZhMNiS+J4HfiloZ0TQqziV8Dw0lqj 8Zudvxpape88RnP4Hz6Z5vWgLaJLogE7aj3Uw4oTvEcGCsL4tLAGoErXSWoZjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JDEpAsCqdRI/e716XI6h5cqJpTF+zZAHdFllN5scnRs=; b=EZ7IxPSsG40zwV+RdKno0EwFThyDQMyZiSwlaL+4g6eXznvOwRSrBYMILEu08KO46HQKuy EF9VPWm4/pI9ULJQYujbN4nmamtpCYPgUCtnREdOjt2TRGOvTJ4DtbQ/FNAkN2YXC7CMoR CAUHS9gPcrrrHxTjfQm9ahYuGCCeVeSum3UbDy5NXFwf3IOAbsOdMC3r3it79W7X6eHVwn uZGzP7X2Pn5CnIQeS0Edv1lURH/3f0/R5iaFp878wcQ2dYqYdhLyQeb4BEEuMGsChknqi4 feg68QKkJ8681lk/sxiMVDNHKAjnUqmePMjMm1K9nWIYZVlXKoTPYIHtOV6JHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf7N72HTrztbM for ; Mon, 15 Jun 2026 11:35:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ec98 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 11:35:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 308784bebe79 - main - if_bnxt/bnxt_re: Update hsi headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 308784bebe796cbdaccf7ef259caf7d87f874d02 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 11:35:35 +0000 Message-Id: <6a2fe387.1ec98.564976e8@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=308784bebe796cbdaccf7ef259caf7d87f874d02 commit 308784bebe796cbdaccf7ef259caf7d87f874d02 Author: Sreekanth Reddy AuthorDate: 2026-06-15 09:43:01 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 11:31:04 +0000 if_bnxt/bnxt_re: Update hsi headers Update hsi headers MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56683 --- sys/dev/bnxt/bnxt_en/hsi_struct_def.h | 10642 +++++++++++++++++++++++++++++--- sys/dev/bnxt/bnxt_re/qplib_fp.c | 2 - sys/dev/bnxt/bnxt_re/qplib_fp.h | 1 - 3 files changed, 9668 insertions(+), 977 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/hsi_struct_def.h b/sys/dev/bnxt/bnxt_en/hsi_struct_def.h index 5914c70ce671..1bbc7b3962b9 100644 --- a/sys/dev/bnxt/bnxt_en/hsi_struct_def.h +++ b/sys/dev/bnxt/bnxt_en/hsi_struct_def.h @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright (c) 2025 Broadcom, All Rights Reserved. + * Copyright (c) 2026 Broadcom, All Rights Reserved. * The term Broadcom refers to Broadcom Limited and/or its subsidiaries * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); /* - * Copyright(c) 2001-2025, Broadcom. All rights reserved. The + * Copyright(c) 2001-2026, Broadcom. All rights reserved. The * term Broadcom refers to Broadcom Inc. and/or its subsidiaries. * Proprietary and Confidential Information. * @@ -119,6 +119,14 @@ typedef struct hwrm_resp_hdr { #define TLV_TYPE_QUERY_ROCE_CC_GEN2 UINT32_C(0x6) /* RoCE slow path command to modify CC Gen2 support. */ #define TLV_TYPE_MODIFY_ROCE_CC_GEN2 UINT32_C(0x7) +/* RoCE slow path command to query CC Gen1_ext support. */ +#define TLV_TYPE_QUERY_ROCE_CC_GEN1_EXT UINT32_C(0x8) +/* RoCE slow path command to modify CC Gen1_ext support. */ +#define TLV_TYPE_MODIFY_ROCE_CC_GEN1_EXT UINT32_C(0x9) +/* RoCE slow path command to query CC Gen2_ext support. */ +#define TLV_TYPE_QUERY_ROCE_CC_GEN2_EXT UINT32_C(0xa) +/* RoCE slow path command to modify CC Gen2_ext support. */ +#define TLV_TYPE_MODIFY_ROCE_CC_GEN2_EXT UINT32_C(0xb) /* Engine CKV - The Alias key EC curve and ECC public key information. */ #define TLV_TYPE_ENGINE_CKV_ALIAS_ECC_PUBLIC_KEY UINT32_C(0x8001) /* Engine CKV - Initialization vector. */ @@ -370,9 +378,11 @@ typedef struct hwrm_short_input { ((x) == 0x63 ? "HWRM_RING_QCFG": \ ((x) == 0x64 ? "HWRM_RESERVED5": \ ((x) == 0x65 ? "HWRM_RESERVED6": \ + ((x) == 0x66 ? "HWRM_PORT_ADSM_QSTATES": \ + ((x) == 0x67 ? "HWRM_PORT_EVENTS_LOG": \ ((x) == 0x70 ? "HWRM_VNIC_RSS_COS_LB_CTX_ALLOC": \ ((x) == 0x71 ? "HWRM_VNIC_RSS_COS_LB_CTX_FREE": \ - "Unknown decode" ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \ + "Unknown decode" ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \ (((x) < 0x100) ? \ ((x) == 0x80 ? "HWRM_QUEUE_MPLS_QCAPS": \ ((x) == 0x81 ? "HWRM_QUEUE_MPLSTC2PRI_QCFG": \ @@ -420,7 +430,7 @@ typedef struct hwrm_short_input { ((x) == 0xb7 ? "HWRM_PORT_PHY_MDIO_BUS_ACQUIRE": \ ((x) == 0xb8 ? "HWRM_PORT_PHY_MDIO_BUS_RELEASE": \ ((x) == 0xb9 ? "HWRM_PORT_QSTATS_EXT_PFC_WD": \ - ((x) == 0xba ? "HWRM_RESERVED7": \ + ((x) == 0xba ? "HWRM_PORT_QSTATS_EXT_PFC_ADV": \ ((x) == 0xbb ? "HWRM_PORT_TX_FIR_CFG": \ ((x) == 0xbc ? "HWRM_PORT_TX_FIR_QCFG": \ ((x) == 0xbd ? "HWRM_PORT_ECN_QSTATS": \ @@ -461,6 +471,10 @@ typedef struct hwrm_short_input { ((x) == 0xe1 ? "HWRM_REG_POWER_QUERY": \ ((x) == 0xe2 ? "HWRM_CORE_FREQUENCY_QUERY": \ ((x) == 0xe3 ? "HWRM_REG_POWER_HISTOGRAM": \ + ((x) == 0xe4 ? "HWRM_MONITOR_PAX_HISTOGRAM_START": \ + ((x) == 0xe5 ? "HWRM_MONITOR_PAX_HISTOGRAM_COLLECT": \ + ((x) == 0xe6 ? "HWRM_STAT_QUERY_ROCE_STATS": \ + ((x) == 0xe7 ? "HWRM_STAT_QUERY_ROCE_STATS_EXT": \ ((x) == 0xf0 ? "HWRM_WOL_FILTER_ALLOC": \ ((x) == 0xf1 ? "HWRM_WOL_FILTER_FREE": \ ((x) == 0xf2 ? "HWRM_WOL_FILTER_QCFG": \ @@ -474,7 +488,7 @@ typedef struct hwrm_short_input { ((x) == 0xfa ? "HWRM_CFA_METER_INSTANCE_CFG": \ ((x) == 0xfd ? "HWRM_CFA_VFR_ALLOC": \ ((x) == 0xfe ? "HWRM_CFA_VFR_FREE": \ - "Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \ + "Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) : \ (((x) < 0x180) ? \ ((x) == 0x100 ? "HWRM_CFA_VF_PAIR_ALLOC": \ ((x) == 0x101 ? "HWRM_CFA_VF_PAIR_FREE": \ @@ -596,10 +610,9 @@ typedef struct hwrm_short_input { ((x) == 0x1b1 ? "HWRM_FUNC_LAG_UPDATE": \ ((x) == 0x1b2 ? "HWRM_FUNC_LAG_FREE": \ ((x) == 0x1b3 ? "HWRM_FUNC_LAG_QCFG": \ - ((x) == 0x1c2 ? "HWRM_FUNC_TIMEDTX_PACING_RATE_ADD": \ - ((x) == 0x1c3 ? "HWRM_FUNC_TIMEDTX_PACING_RATE_DELETE": \ - ((x) == 0x1c4 ? "HWRM_FUNC_TIMEDTX_PACING_RATE_QUERY": \ - "Unknown decode" ))))))))))))))))))))))))))))))))))))))) : \ + ((x) == 0x1c3 ? "HWRM_FUNC_TTX_PACING_RATE_PROF_QUERY": \ + ((x) == 0x1c4 ? "HWRM_FUNC_TTX_PACING_RATE_QUERY": \ + "Unknown decode" )))))))))))))))))))))))))))))))))))))) : \ (((x) < 0x280) ? \ ((x) == 0x200 ? "HWRM_SELFTEST_QLIST": \ ((x) == 0x201 ? "HWRM_SELFTEST_EXEC": \ @@ -628,8 +641,11 @@ typedef struct hwrm_short_input { ((x) == 0x218 ? "HWRM_STAT_GENERIC_QSTATS": \ ((x) == 0x219 ? "HWRM_MFG_PRVSN_EXPORT_CERT": \ ((x) == 0x21a ? "HWRM_STAT_DB_ERROR_QSTATS": \ + ((x) == 0x21b ? "HWRM_MFG_TESTS": \ + ((x) == 0x21c ? "HWRM_MFG_WRITE_CERT_NVM": \ ((x) == 0x230 ? "HWRM_PORT_POE_CFG": \ ((x) == 0x231 ? "HWRM_PORT_POE_QCFG": \ + ((x) == 0x232 ? "HWRM_PORT_PHY_FDRSTAT": \ ((x) == 0x258 ? "HWRM_UDCC_QCAPS": \ ((x) == 0x259 ? "HWRM_UDCC_CFG": \ ((x) == 0x25a ? "HWRM_UDCC_QCFG": \ @@ -642,7 +658,9 @@ typedef struct hwrm_short_input { ((x) == 0x261 ? "HWRM_QUEUE_PFCWD_TIMEOUT_QCAPS": \ ((x) == 0x262 ? "HWRM_QUEUE_PFCWD_TIMEOUT_CFG": \ ((x) == 0x263 ? "HWRM_QUEUE_PFCWD_TIMEOUT_QCFG": \ - "Unknown decode" ))))))))))))))))))))))))))))))))))))))))) : \ + ((x) == 0x264 ? "HWRM_QUEUE_ADPTV_QOS_RX_QCFG": \ + ((x) == 0x265 ? "HWRM_QUEUE_ADPTV_QOS_TX_QCFG": \ + "Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))) : \ (((x) < 0x300) ? \ ((x) == 0x2bc ? "HWRM_TF": \ ((x) == 0x2bd ? "HWRM_TF_VERSION_GET": \ @@ -709,7 +727,10 @@ typedef struct hwrm_short_input { ((x) == 0x399 ? "HWRM_TFC_IF_TBL_GET": \ ((x) == 0x39a ? "HWRM_TFC_TBL_SCOPE_CONFIG_GET": \ ((x) == 0x39b ? "HWRM_TFC_RESC_USAGE_QUERY": \ - "Unknown decode" )))))))))))))))))))))))))))) : \ + ((x) == 0x39c ? "HWRM_TFC_GLOBAL_ID_FREE": \ + ((x) == 0x39d ? "HWRM_TFC_TCAM_PRI_UPDATE": \ + ((x) == 0x3a0 ? "HWRM_TFC_HOT_UPGRADE_PROCESS": \ + "Unknown decode" ))))))))))))))))))))))))))))))) : \ (((x) < 0x480) ? \ ((x) == 0x400 ? "HWRM_SV": \ "Unknown decode" ) : \ @@ -747,7 +768,9 @@ typedef struct hwrm_short_input { ((x) == 0xff2c ? "HWRM_DBG_COREDUMP_CAPTURE": \ ((x) == 0xff2d ? "HWRM_DBG_PTRACE": \ ((x) == 0xff2e ? "HWRM_DBG_SIM_CABLE_STATE": \ - "Unknown decode" ))))))))))))))))))))))))))))))))) : \ + ((x) == 0xff2f ? "HWRM_DBG_TOKEN_QUERY_AUTH_IDS": \ + ((x) == 0xff30 ? "HWRM_DBG_TOKEN_CFG": \ + "Unknown decode" ))))))))))))))))))))))))))))))))))) : \ (((x) <= UINT16_MAX) ? \ ((x) == 0xffea ? "HWRM_NVM_GET_VPD_FIELD_INFO": \ ((x) == 0xffeb ? "HWRM_NVM_SET_VPD_FIELD_INFO": \ @@ -891,6 +914,8 @@ typedef struct cmd_nums { #define HWRM_RESERVED5 UINT32_C(0x64) /* Reserved for future use. */ #define HWRM_RESERVED6 UINT32_C(0x65) + #define HWRM_PORT_ADSM_QSTATES UINT32_C(0x66) + #define HWRM_PORT_EVENTS_LOG UINT32_C(0x67) #define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC UINT32_C(0x70) #define HWRM_VNIC_RSS_COS_LB_CTX_FREE UINT32_C(0x71) #define HWRM_QUEUE_MPLS_QCAPS UINT32_C(0x80) @@ -944,8 +969,7 @@ typedef struct cmd_nums { #define HWRM_PORT_PHY_MDIO_BUS_ACQUIRE UINT32_C(0xb7) #define HWRM_PORT_PHY_MDIO_BUS_RELEASE UINT32_C(0xb8) #define HWRM_PORT_QSTATS_EXT_PFC_WD UINT32_C(0xb9) - /* Reserved. */ - #define HWRM_RESERVED7 UINT32_C(0xba) + #define HWRM_PORT_QSTATS_EXT_PFC_ADV UINT32_C(0xba) #define HWRM_PORT_TX_FIR_CFG UINT32_C(0xbb) #define HWRM_PORT_TX_FIR_QCFG UINT32_C(0xbc) #define HWRM_PORT_ECN_QSTATS UINT32_C(0xbd) @@ -994,6 +1018,14 @@ typedef struct cmd_nums { #define HWRM_REG_POWER_QUERY UINT32_C(0xe1) #define HWRM_CORE_FREQUENCY_QUERY UINT32_C(0xe2) #define HWRM_REG_POWER_HISTOGRAM UINT32_C(0xe3) + /* Start a PAX latency histogram measurement */ + #define HWRM_MONITOR_PAX_HISTOGRAM_START UINT32_C(0xe4) + /* Collect PAX latency histogram data and optionally stop measurement. */ + #define HWRM_MONITOR_PAX_HISTOGRAM_COLLECT UINT32_C(0xe5) + /* This command returns RoCE statistics for the function. */ + #define HWRM_STAT_QUERY_ROCE_STATS UINT32_C(0xe6) + /* This command returns Extended RoCE statistics for the function. */ + #define HWRM_STAT_QUERY_ROCE_STATS_EXT UINT32_C(0xe7) #define HWRM_WOL_FILTER_ALLOC UINT32_C(0xf0) #define HWRM_WOL_FILTER_FREE UINT32_C(0xf1) #define HWRM_WOL_FILTER_QCFG UINT32_C(0xf2) @@ -1257,18 +1289,16 @@ typedef struct cmd_nums { #define HWRM_FUNC_LAG_FREE UINT32_C(0x1b2) /* The command is used to query a link aggr group. */ #define HWRM_FUNC_LAG_QCFG UINT32_C(0x1b3) - /* This command is use to add TimeTX packet pacing rate. */ - #define HWRM_FUNC_TIMEDTX_PACING_RATE_ADD UINT32_C(0x1c2) /* - * This command is use to delete TimeTX packet pacing rate - * from the rate table. + * This command is used to retrieve all the TimeTX pacing rate + * profiles that are supported. */ - #define HWRM_FUNC_TIMEDTX_PACING_RATE_DELETE UINT32_C(0x1c3) + #define HWRM_FUNC_TTX_PACING_RATE_PROF_QUERY UINT32_C(0x1c3) /* * This command is used to retrieve all the TimeTX pacing rates * from the rate table that have been added for the function. */ - #define HWRM_FUNC_TIMEDTX_PACING_RATE_QUERY UINT32_C(0x1c4) + #define HWRM_FUNC_TTX_PACING_RATE_QUERY UINT32_C(0x1c4) /* Experimental */ #define HWRM_SELFTEST_QLIST UINT32_C(0x200) /* Experimental */ @@ -1347,6 +1377,10 @@ typedef struct cmd_nums { #define HWRM_MFG_PRVSN_EXPORT_CERT UINT32_C(0x219) /* Query the statistics for doorbell drops due to various error conditions. */ #define HWRM_STAT_DB_ERROR_QSTATS UINT32_C(0x21a) + /* This command is used to select and run manufacturing tests */ + #define HWRM_MFG_TESTS UINT32_C(0x21b) + /* This command is used to write a cert chain from production firmware */ + #define HWRM_MFG_WRITE_CERT_NVM UINT32_C(0x21c) /* * The command is used to enable/disable the power on ethernet for * a particular I/O expander port. @@ -1357,6 +1391,8 @@ typedef struct cmd_nums { * is enabled/disabled for a particular I/O expander port. */ #define HWRM_PORT_POE_QCFG UINT32_C(0x231) + /* Tells the fw to run fdrstat on a given port. */ + #define HWRM_PORT_PHY_FDRSTAT UINT32_C(0x232) /* * This command returns the capabilities related to User Defined * Congestion Control on a function. @@ -1393,6 +1429,16 @@ typedef struct cmd_nums { * timeout value. */ #define HWRM_QUEUE_PFCWD_TIMEOUT_QCFG UINT32_C(0x263) + /* + * This command is used to query the current configured RX cos mbuf related + * values for a port + */ + #define HWRM_QUEUE_ADPTV_QOS_RX_QCFG UINT32_C(0x264) + /* + * This command is used to query the current configured TX cos mbuf related + * values for a port + */ + #define HWRM_QUEUE_ADPTV_QOS_TX_QCFG UINT32_C(0x265) /* Experimental */ #define HWRM_TF UINT32_C(0x2bc) /* Experimental */ @@ -1515,6 +1561,12 @@ typedef struct cmd_nums { #define HWRM_TFC_TBL_SCOPE_CONFIG_GET UINT32_C(0x39a) /* TruFlow command to query the resource usage state. */ #define HWRM_TFC_RESC_USAGE_QUERY UINT32_C(0x39b) + /* TruFlow command to free resources for a global id. */ + #define HWRM_TFC_GLOBAL_ID_FREE UINT32_C(0x39c) + /* TruFlow command to update the priority of one tcam entry. */ + #define HWRM_TFC_TCAM_PRI_UPDATE UINT32_C(0x39d) + /* TruFlow command to process hot upgrade requests. */ + #define HWRM_TFC_HOT_UPGRADE_PROCESS UINT32_C(0x3a0) /* Experimental */ #define HWRM_SV UINT32_C(0x400) /* Run a PCIe or Ethernet serdes test and retrieve test data. */ @@ -1588,6 +1640,15 @@ typedef struct cmd_nums { * or removal. */ #define HWRM_DBG_SIM_CABLE_STATE UINT32_C(0xff2e) + /* + * This command is called to obtain a board's debug authorization id (DAI) + * and token nonce (cti aka CWT ID used to prevent replay) from a NIC. + * This is the data from the device required to produce a debug enable + * token which is tied specifically to an individual NIC. + */ + #define HWRM_DBG_TOKEN_QUERY_AUTH_IDS UINT32_C(0xff2f) + /* This API is used to enable or disable a debug enable token. */ + #define HWRM_DBG_TOKEN_CFG UINT32_C(0xff30) #define HWRM_NVM_GET_VPD_FIELD_INFO UINT32_C(0xffea) #define HWRM_NVM_SET_VPD_FIELD_INFO UINT32_C(0xffeb) #define HWRM_NVM_DEFRAG UINT32_C(0xffec) @@ -1722,6 +1783,11 @@ typedef struct ret_codes { * requested by the host is not present or does not exist. */ #define HWRM_ERR_CODE_ENTITY_NOT_PRESENT UINT32_C(0x13) + /* + * This error code is reported by Firmware when the secure soc is not + * responding. + */ + #define HWRM_ERR_CODE_SECURE_SOC_ERROR UINT32_C(0x14) /* * This value indicates that the HWRM response is in TLV format and * should be interpreted as one or more TLVs starting with the @@ -1760,7 +1826,8 @@ typedef struct ret_codes { ((x) == 0x11 ? "RESOURCE_LOCKED": \ ((x) == 0x12 ? "PF_UNAVAILABLE": \ ((x) == 0x13 ? "ENTITY_NOT_PRESENT": \ - "Unknown decode" )))))))))))))))))))) : \ + ((x) == 0x14 ? "SECURE_SOC_ERROR": \ + "Unknown decode" ))))))))))))))))))))) : \ (((x) < 0x8080) ? \ ((x) == 0x8000 ? "TLV_ENCAPSULATED_RESPONSE": \ "Unknown decode" ) : \ @@ -1848,8 +1915,8 @@ typedef struct hwrm_err_output { #define HWRM_VERSION_MINOR 10 #define HWRM_VERSION_UPDATE 3 /* non-zero means beta version */ -#define HWRM_VERSION_RSVD 61 -#define HWRM_VERSION_STR "1.10.3.61" +#define HWRM_VERSION_RSVD 147 +#define HWRM_VERSION_STR "1.10.3.147" /**************** * hwrm_ver_get * @@ -2158,6 +2225,12 @@ typedef struct hwrm_ver_get_output { * feature. */ #define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_SOC_CAPABLE UINT32_C(0x10000) + /* + * If set to 1, then firmware is able to support secure debug tokens + * to enable debug on release builds. + * If set to 0, then firmware does not support debug tokens. + */ + #define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_DEBUG_TOKEN_SUPPORTED UINT32_C(0x20000) /* * This field represents the major version of RoCE firmware. * A change in major version represents a major release. @@ -9850,8 +9923,10 @@ typedef struct hwrm_async_event_cmpl { * the coredump has been captured. */ #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HOST_COREDUMP UINT32_C(0x50) + /* Used to notify invalid adaptive QoS configuration events. */ + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ADPTV_QOS UINT32_C(0x51) /* Maximum Registrable event id. */ - #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_MAX_RGTR_EVENT_ID UINT32_C(0x51) + #define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_MAX_RGTR_EVENT_ID UINT32_C(0x52) /* * A trace log message. This contains firmware trace logs string * embedded in the asynchronous message. This is an experimental @@ -9932,8 +10007,9 @@ typedef struct hwrm_async_event_cmpl { ((x) == 0x4e ? "REPRESENTOR_PAIR_CHANGE": \ ((x) == 0x4f ? "VF_STAT_CHANGE": \ ((x) == 0x50 ? "HOST_COREDUMP": \ - ((x) == 0x51 ? "MAX_RGTR_EVENT_ID": \ - "Unknown decode" )))))))))))))))))))))))))))))))))))))))))))))))))) : \ + ((x) == 0x51 ? "ADPTV_QOS": \ + ((x) == 0x52 ? "MAX_RGTR_EVENT_ID": \ + "Unknown decode" ))))))))))))))))))))))))))))))))))))))))))))))))))) : \ (((x) < 0x100) ? \ ((x) == 0xfe ? "FW_TRACE_MSG": \ ((x) == 0xff ? "HWRM_ERROR": \ @@ -12432,8 +12508,8 @@ typedef struct hwrm_async_event_cmpl_dbg_buf_producer { * value of 8192. This field rolls over to zero once the firmware * writes the last page of the host buffer */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_MASK UINT32_C(0xffffffff) - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_SFT 0 + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURR_OFF_MASK UINT32_C(0xffffffff) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURR_OFF_SFT 0 uint8_t opaque_v; /* * This value is written by the NIC such that it will be different @@ -12451,31 +12527,35 @@ typedef struct hwrm_async_event_cmpl_dbg_buf_producer { /* Event specific data */ uint32_t event_data1; /* Type of trace buffer that has been updated. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_MASK UINT32_C(0xffff) #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SFT 0 - /* SRT trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT_TRACE UINT32_C(0x0) - /* SRT2 trace. */ + /* SRT or APE trace. */ + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT_TRACE UINT32_C(0x0) + /* SRT2 or AFM/Kong trace. */ #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT2_TRACE UINT32_C(0x1) - /* CRT trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT_TRACE UINT32_C(0x2) - /* CRT2 trace. */ + /* CRT or ChiMP trace. */ + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT_TRACE UINT32_C(0x2) + /* CRT2 or Bono trace. */ #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT2_TRACE UINT32_C(0x3) /* RIGP0 trace. */ #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_RIGP0_TRACE UINT32_C(0x4) - /* L2 HWRM trace. */ + /* L2 or ChiMP HWRM trace. */ #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_L2_HWRM_TRACE UINT32_C(0x5) - /* RoCE HWRM trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE UINT32_C(0x6) + /* RoCE or Bono HWRM trace. */ + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE UINT32_C(0x6) /* Context Accelerator CPU 0 trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA0_TRACE UINT32_C(0x7) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA0_TRACE UINT32_C(0x7) /* Context Accelerator CPU 1 trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA1_TRACE UINT32_C(0x8) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA1_TRACE UINT32_C(0x8) /* Context Accelerator CPU 2 trace. */ - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA2_TRACE UINT32_C(0x9) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CA2_TRACE UINT32_C(0x9) /* RIGP1 trace. */ #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_RIGP1_TRACE UINT32_C(0xa) - #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_RIGP1_TRACE + /* AFM/Kong HWRM trace. */ + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_AFM_KONG_HWRM_TRACE UINT32_C(0xb) + /* ctxm error QPC trace. */ + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ERR_QPC_TRACE UINT32_C(0xc) + #define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ERR_QPC_TRACE } hwrm_async_event_cmpl_dbg_buf_producer_t, *phwrm_async_event_cmpl_dbg_buf_producer_t; /* hwrm_async_event_cmpl_peer_mmap_change (size:128b/16B) */ @@ -12743,7 +12823,32 @@ typedef struct hwrm_async_event_cmpl_error_report_base { * on this board. */ #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED UINT32_C(0x6) - #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED + /* + * In UDCC per-QP mode, NIC detects that a new QP being created has + * the same destination as an existing UDCC session. The UDCC session + * for the new QP will not be created in this error situation. + * This error normally occurs when the peer reuses the QPN of + * a destroyed QP for creating a new QP before the NIC frees + * the destroyed QP locally. + */ + #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUP_UDCC_SES UINT32_C(0x7) + /* + * NIC detects that a doorbell has been dropped by hardware. + * This error normally occurs when the doorbell is mal-formatted + * by the driver or using values out of supported range by hardware. + */ + #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DB_DROP UINT32_C(0x8) + /* + * Indicates the module temperature has crossed one of the thermal + * thresholds. + */ + #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_MD_TEMP UINT32_C(0x9) + /* + * Indicates to the host that the VNIC hw context has gone into the + * error state. + */ + #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_VNIC_ERR UINT32_C(0xa) + #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_VNIC_ERR } hwrm_async_event_cmpl_error_report_base_t, *phwrm_async_event_cmpl_error_report_base_t; #define GET_ERROR_REPORT_TYPE(x) \ @@ -12755,7 +12860,11 @@ typedef struct hwrm_async_event_cmpl_error_report_base { ((x) == 0x4 ? "DOORBELL_DROP_THRESHOLD": \ ((x) == 0x5 ? "THERMAL_THRESHOLD": \ ((x) == 0x6 ? "DUAL_DATA_RATE_NOT_SUPPORTED": \ - "Unknown decode" ))))))) : \ + ((x) == 0x7 ? "DUP_UDCC_SES": \ + ((x) == 0x8 ? "DB_DROP": \ + ((x) == 0x9 ? "MD_TEMP": \ + ((x) == 0xa ? "VNIC_ERR": \ + "Unknown decode" ))))))))))) : \ "Unknown decode" ) @@ -13154,6 +13263,333 @@ typedef struct hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported { #define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED } hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported_t, *phwrm_async_event_cmpl_error_report_dual_data_rate_not_supported_t; +/* hwrm_async_error_report_dup_udcc_ses (size:128b/16B) */ + +typedef struct hwrm_async_error_report_dup_udcc_ses { + uint16_t type; + /* + * This field indicates the exact type of the completion. + * By convention, the LSB identifies the length of the + * record in 16B units. Even values indicate 16B + * records. Odd values indicate 32B + * records. + */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_TYPE_ASYNC_EVENT UINT32_C(0x2e) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_TYPE_ASYNC_EVENT + /* Identifiers of events. */ + uint16_t event_id; + /* + * This async notification message is used to inform + * the driver that an error has occurred which may need + * the attention of the administrator. + */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_EVENT_ID_ERROR_REPORT UINT32_C(0x45) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_EVENT_ID_LAST HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_EVENT_ID_ERROR_REPORT + /* Event specific data. */ + uint32_t event_data2; + /* Destination QPN of the QP being created */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_DST_QPN_MASK UINT32_C(0xffffff) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_DST_QPN_SFT 0 + uint8_t opaque_v; + /* + * This value is written by the NIC such that it will be different + * for each pass through the completion queue. The even passes + * will write 1. The odd passes will write 0. + */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_OPAQUE_SFT 1 + /* 8-lsb timestamp (100-msec resolution) */ + uint8_t timestamp_lo; + /* 16-lsb timestamp (100-msec resolution) */ + uint16_t timestamp_hi; + /* Event specific data */ + uint32_t event_data1; + /* Indicates the type of error being reported. */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_ERROR_TYPE_MASK UINT32_C(0xff) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_ERROR_TYPE_SFT 0 + /* + * In UDCC per-QP mode, NIC detects that a new QP being created has + * the same destination as an existing UDCC session. The UDCC session + * for the new QP will not be created in this error situation. + * This error normally occurs when the peer reuses the QPN of + * a destroyed QP for creating a new QP before the NIC frees + * the destroyed QP locally. + */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_ERROR_TYPE_DUP_SES UINT32_C(0x7) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_ERROR_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_ERROR_TYPE_DUP_SES + /* Source QPN of the QP being created */ + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_SRC_QPN_MASK UINT32_C(0xffffff00) + #define HWRM_ASYNC_ERROR_REPORT_DUP_UDCC_SES_SRC_QPN_SFT 8 +} hwrm_async_error_report_dup_udcc_ses_t, *phwrm_async_error_report_dup_udcc_ses_t; + +/* hwrm_async_error_report_db_drop (size:128b/16B) */ + +typedef struct hwrm_async_error_report_db_drop { + uint16_t type; + /* + * This field indicates the exact type of the completion. + * By convention, the LSB identifies the length of the + * record in 16B units. Even values indicate 16B + * records. Odd values indicate 32B + * records. + */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_TYPE_ASYNC_EVENT UINT32_C(0x2e) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_DB_DROP_TYPE_ASYNC_EVENT + /* Identifiers of events. */ + uint16_t event_id; + /* + * This async notification message is used to inform + * the driver that an error has occurred which may need + * the attention of the administrator. + */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_EVENT_ID_ERROR_REPORT UINT32_C(0x45) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_EVENT_ID_LAST HWRM_ASYNC_ERROR_REPORT_DB_DROP_EVENT_ID_ERROR_REPORT + /* Event specific data. */ + uint32_t event_data2; + uint8_t opaque_v; + /* + * This value is written by the NIC such that it will be different + * for each pass through the completion queue. The even passes + * will write 1. The odd passes will write 0. + */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_OPAQUE_SFT 1 + /* 8-lsb timestamp (100-msec resolution) */ + uint8_t timestamp_lo; + /* 16-lsb timestamp (100-msec resolution) */ + uint16_t timestamp_hi; + /* Event specific data */ + uint32_t event_data1; + /* Indicates the type of error being reported. */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_ERROR_TYPE_MASK UINT32_C(0xff) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_ERROR_TYPE_SFT 0 + /* + * NIC detects that a doorbell has been dropped by hardware. + * This error normally occurs when the doorbell is mal-formatted + * by the driver or using values out of supported range by hardware. + */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_ERROR_TYPE_DB_DROP UINT32_C(0x8) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_ERROR_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_DB_DROP_ERROR_TYPE_DB_DROP + /* + * The doorbell drops debug info. Encoded with device specific hardware + * block ID and event ID. + */ + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_DROP_DEBUG_INFO_MASK UINT32_C(0xffffff00) + #define HWRM_ASYNC_ERROR_REPORT_DB_DROP_DROP_DEBUG_INFO_SFT 8 +} hwrm_async_error_report_db_drop_t, *phwrm_async_error_report_db_drop_t; + +/* hwrm_async_error_report_md_temp (size:128b/16B) */ + +typedef struct hwrm_async_error_report_md_temp { + uint16_t type; + /* + * This field indicates the exact type of the completion. + * By convention, the LSB identifies the length of the + * record in 16B units. Even values indicate 16B + * records. Odd values indicate 32B + * records. + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TYPE_HWRM_ASYNC_EVENT + /* Identifiers of events. */ + uint16_t event_id; + /* + * This async notification message is used to inform + * the driver that an error has occurred which may need + * the attention of the administrator. + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_ID_ERROR_REPORT UINT32_C(0x45) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_ID_LAST HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_ID_ERROR_REPORT + /* Event specific data. */ + uint32_t event_data2; + /* Current temperature. In Celsius */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_CUR_TEMP_MASK UINT32_C(0xff) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_CUR_TEMP_SFT 0 + /* + * The temperature setting of the threshold that was just crossed. + * In Celsius + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_THR_TEMP_MASK UINT32_C(0xff00) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_THR_TEMP_SFT 8 + /* Indicates the module on which this temperature change occurred */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_MODULE_MASK UINT32_C(0xff0000) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_EVENT_DATA2_MODULE_SFT 16 + uint8_t opaque_v; + /* + * This value is written by the NIC such that it will be different + * for each pass through the completion queue. The even passes + * will write 1. The odd passes will write 0. + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_OPAQUE_SFT 1 + /* 8-lsb timestamp (100-msec resolution) */ + uint8_t timestamp_lo; + /* 16-lsb timestamp (100-msec resolution) */ + uint16_t timestamp_hi; + /* Event specific data */ + uint32_t event_data1; + /* Indicates the type of error being reported. */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_ERROR_TYPE_MASK UINT32_C(0xff) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_ERROR_TYPE_SFT 0 + /* + * There was module thermal event. The type will be specified + * in the threshold_type. event_data2 will contain the current + * temperature and the configured value for the threshold that + * was just crossed. The threshold values are lower thresholds, + * so the event will trigger with an active flag when the + * temperature is on an increasing trajectory. + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_ERROR_TYPE_MD_TEMP UINT32_C(0x9) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_ERROR_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_MD_TEMP_ERROR_TYPE_MD_TEMP + /* The specific type of thermal threshold error */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_MASK UINT32_C(0xff00) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_SFT 8 + /* Warning thermal threshold was crossed */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_SFP_WARN (UINT32_C(0x0) << 8) + /* Alarm thermal threshold was crossed */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_SFP_ALM (UINT32_C(0x1) << 8) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_LAST HWRM_ASYNC_ERROR_REPORT_MD_TEMP_TTYPE_SFP_ALM + /* + * Indicates if the thermal crossing occurs while the temperature is + * increasing or decreasing. + */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_DIR UINT32_C(0x10000) + /* Threshold is crossed while the temperature is falling. */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_DIR_FALL (UINT32_C(0x0) << 16) + /* Threshold is crossed while the temperature is rising. */ + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_DIR_RISE (UINT32_C(0x1) << 16) + #define HWRM_ASYNC_ERROR_REPORT_MD_TEMP_DIR_LAST HWRM_ASYNC_ERROR_REPORT_MD_TEMP_DIR_RISE +} hwrm_async_error_report_md_temp_t, *phwrm_async_error_report_md_temp_t; + +/* hwrm_async_error_report_vnic_err (size:128b/16B) */ + +typedef struct hwrm_async_error_report_vnic_err { + uint16_t type; + /* + * This field indicates the exact type of the completion. + * By convention, the LSB identifies the length of the + * record in 16B units. Even values indicate 16B + * records. Odd values indicate 32B + * records. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_TYPE_HWRM_ASYNC_EVENT + /* Identifiers of events. */ + uint16_t event_id; + /* + * This async notification message is used to inform + * the driver that an error has occurred which may need + * the attention of the administrator. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_ID_ERROR_REPORT UINT32_C(0x45) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_ID_LAST HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_ID_ERROR_REPORT + /* Event specific data. */ + uint32_t event_data2; + /* + * The VNIC ID that was reported to the driver by firmware in + * response to HWRM_VNIC_ALLOC. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_DATA2_VNIC_ID_MASK UINT32_C(0xffff) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_DATA2_VNIC_ID_SFT 0 + /* + * The internal firmware identifier for the VNIC + * context ID + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_DATA2_CTXM_XID_MASK UINT32_C(0xffff0000) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_EVENT_DATA2_CTXM_XID_SFT 16 + uint8_t opaque_v; + /* + * This value is written by the NIC such that it will be different + * for each pass through the completion queue. The even passes + * will write 1. The odd passes will write 0. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_OPAQUE_SFT 1 + /* 8-lsb timestamp (100-msec resolution) */ + uint8_t timestamp_lo; + /* 16-lsb timestamp (100-msec resolution) */ + uint16_t timestamp_hi; + /* Event specific data */ + uint32_t event_data1; + /* Indicates the type of error being reported. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_ERROR_TYPE_MASK UINT32_C(0xff) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_ERROR_TYPE_SFT 0 + /* + * Indicates to the host that the VNIC hw context has gone into the + * error state. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_ERROR_TYPE_VNIC_ERR UINT32_C(0xa) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_ERROR_TYPE_LAST HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_ERROR_TYPE_VNIC_ERR + /* The hardware specific error state reason. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_MASK UINT32_C(0xff00) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_SFT 8 + /* No error. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_NO_ERR (UINT32_C(0x0) << 8) + /* + * A load error occurred on an attempt to load the Ring + * Table Context. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_RT_LOAD_ERR (UINT32_C(0x1) << 8) + /* Rx Ring is not in the valid state. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_RX_RING_ERR (UINT32_C(0x12) << 8) + /* + * Agg ring is not in the valid state and an attempt was + * made to use jumbo, HDS, or statistics ejection + * placement. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_AGG_RING_ERR (UINT32_C(0x13) << 8) + /* + * Completion error. No space available on completion ring, + * or completion ring not in VALID state. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_CMP_ERR (UINT32_C(0x14) << 8) + /* + * Problem was found in the format of a BD on the rx or agg + * ring. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_BD_FORMAT_ERR (UINT32_C(0x16) << 8) + /* A packet did not fit in the buffer(s) provided. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_DID_NOT_FIT_ERR (UINT32_C(0x17) << 8) + /* A load error occurred on an attempt to load the CQ Context. */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_CQ_LOAD_ERR (UINT32_C(0x18) << 8) + /* + * A load error occurred on an attempt to load the context for + * the rx ring, or the context loaded but the type is not l2. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_RX_RING_LOAD_ERR (UINT32_C(0x19) << 8) + /* + * A load error occurred on the context load for the agg ring, + * or the context loaded but the type is not l2. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_AGG_RING_LOAD_ERR (UINT32_C(0x1a) << 8) + /* + * A fatal error was detected on an attempt to read from or + * write to PCIe on the receive side. + */ + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_PCI_ERR (UINT32_C(0x1b) << 8) + #define HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_LAST HWRM_ASYNC_ERROR_REPORT_VNIC_ERR_VNIC_ERR_REASON_PCI_ERR +} hwrm_async_error_report_vnic_err_t, *phwrm_async_error_report_vnic_err_t; + /* hwrm_async_event_cmpl_vf_stat_change (size:128b/16B) */ typedef struct hwrm_async_event_cmpl_vf_stat_change { @@ -13262,6 +13698,59 @@ typedef struct hwrm_async_event_cmpl_host_coredump { uint32_t event_data1; } hwrm_async_event_cmpl_host_coredump_t, *phwrm_async_event_cmpl_host_coredump_t; +/* hwrm_async_event_cmpl_adptv_qos (size:128b/16B) */ + +typedef struct hwrm_async_event_cmpl_adptv_qos { + uint16_t type; + /* + * This field indicates the exact type of the completion. + * By convention, the LSB identifies the length of the + * record in 16B units. Even values indicate 16B + * records. Odd values indicate 32B + * records. + */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_TYPE_MASK UINT32_C(0x3f) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_TYPE_SFT 0 + /* HWRM Asynchronous Event Information */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_TYPE_HWRM_ASYNC_EVENT UINT32_C(0x2e) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_TYPE_LAST HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_TYPE_HWRM_ASYNC_EVENT + /* Identifiers of events. */ + uint16_t event_id; + /* + * Used to notify adaptive QoS configuration events. + * Firmware fallback to default settings. + */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_ID_ADPTV_QOS UINT32_C(0x51) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_ID_LAST HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_ID_ADPTV_QOS + /* Event specific data */ + uint32_t event_data2; + uint8_t opaque_v; + /* + * This value is written by the NIC such that it will be different + * for each pass through the completion queue. The even passes + * will write 1. The odd passes will write 0. + */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_V UINT32_C(0x1) + /* opaque is 7 b */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_OPAQUE_MASK UINT32_C(0xfe) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_OPAQUE_SFT 1 + /* 8-lsb timestamp (100-msec resolution) */ + uint8_t timestamp_lo; + /* 16-lsb timestamp (100-msec resolution) */ + uint16_t timestamp_hi; + /* Event specific data */ + uint32_t event_data1; + /* Indicates the type of invalid adaptive QoS configuration. */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_DATA1_INVAL_MASK UINT32_C(0xff) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_DATA1_INVAL_SFT 0 + /* + * This value indicates that the PFC headroom factor threshold value + * is out of bounds. + */ + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_DATA1_INVAL_HEADROOM UINT32_C(0x0) + #define HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_DATA1_INVAL_LAST HWRM_ASYNC_EVENT_CMPL_ADPTV_QOS_EVENT_DATA1_INVAL_HEADROOM +} hwrm_async_event_cmpl_adptv_qos_t, *phwrm_async_event_cmpl_adptv_qos_t; + /* metadata_base_msg (size:64b/8B) */ typedef struct metadata_base_msg { @@ -14758,6 +15247,52 @@ typedef struct hwrm_func_vf_cfg_output { uint8_t valid; } hwrm_func_vf_cfg_output_t, *phwrm_func_vf_cfg_output_t; +/* hwrm_func_vf_cfg_cmd_err (size:64b/8B) */ + +typedef struct hwrm_func_vf_cfg_cmd_err { + /* + * command specific error codes for the command + * hwrm_func_vf_cfg. + */ + uint8_t code; + /* Unknown error. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0) + /* Failed to perform TX ring asset test. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_TX_RING_ASSET_TEST_FAILED UINT32_C(0x1) + /* Failed to update TX ring PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_TX_RING_RES_UPDATE_FAILED UINT32_C(0x2) + /* Failed to perform RSSCOS context asset test. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RSS_CTXT_ASSET_TEST_FAILED UINT32_C(0x3) + /* Failed to update RSSCOS context PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RSS_CTXT_RES_UPDATE_FAILED UINT32_C(0x4) + /* Failed to perform completion ring asset test. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_CMPL_RING_ASSET_TEST_FAILED UINT32_C(0x5) + /* Failed to update completion ring PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_CMPL_RING_RES_UPDATE_FAILED UINT32_C(0x6) + /* Failed to perform RX ring asset test. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RX_RING_ASSET_TEST_FAILED UINT32_C(0x7) + /* Failed to update RX ring PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RX_RING_RES_UPDATE_FAILED UINT32_C(0x8) + /* Failed to perform VNIC asset test. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_VNIC_ASSET_TEST_FAILED UINT32_C(0x9) + /* Failed to update VNIC ring PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_VNIC_RES_UPDATE_FAILED UINT32_C(0xa) + /* Failed to sync and start STATS thread. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_SYNC_STATS_THREAD_FAILED UINT32_C(0xb) + /* Not enough l2_ctxt_entries available for the VF. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_L2_CTXT_RES_ALLOC_FAILED UINT32_C(0xc) + /* Failed to update TX KTLS PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_TX_KTLS_RES_UPDATE_FAILED UINT32_C(0xd) + /* Failed to update RX KTLS PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RX_KTLS_RES_UPDATE_FAILED UINT32_C(0xe) + /* Failed to update TX QUIC PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_TX_QUIC_RES_UPDATE_FAILED UINT32_C(0xf) + /* Failed to update RX QUIC PF reservation. */ + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RX_QUIC_RES_UPDATE_FAILED UINT32_C(0x10) + #define HWRM_FUNC_VF_CFG_CMD_ERR_CODE_LAST HWRM_FUNC_VF_CFG_CMD_ERR_CODE_RX_QUIC_RES_UPDATE_FAILED + uint8_t unused_0[7]; +} hwrm_func_vf_cfg_cmd_err_t, *phwrm_func_vf_cfg_cmd_err_t; + /******************* * hwrm_func_qcaps * *******************/ @@ -15075,9 +15610,7 @@ typedef struct hwrm_func_qcaps_output { /* * The maximum number of VFs that can be * allocated to the function. This is valid only on the - * PF with SR-IOV enabled. 0xFF... (All Fs) if this - * command is called on a PF with SR-IOV disabled or - * on a VF. + * PF with SR-IOV enabled. */ uint16_t max_vfs; /* @@ -15687,8 +16220,88 @@ typedef struct hwrm_func_qcaps_output { * if the driver tries to set the reservation to be less than the * number of allocated resources. */ - #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_RM_RSV_WHILE_ALLOC_CAP UINT32_C(0x1) - uint8_t unused_3[7]; + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_RM_RSV_WHILE_ALLOC_CAP UINT32_C(0x1) + /* + * When this bit is '1', the PF requires an L2 filter to be + * allocated by the driver using HWRM_CFA_L2_FILTER_ALLOC after + * bringing the interface up, before traffic is sent. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_REQUIRE_L2_FILTER UINT32_C(0x2) + /* + * When set to 1, indicates the field max_roce_vfs in the structure + * is valid. If this bit is 0, the driver should not use the + * 'max_roce_vfs' field. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_MAX_ROCE_VFS_SUPPORTED UINT32_C(0x4) + /* + * When set to 1, indicates the field 'rx_rate_profile_sel' in + * RING_ALLOC can specify a valid RX rate profile when allocating + * RX or RX aggregation rings. If this bit is 0, the driver + * should not use the 'rx_rate_profile_sel' field. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_RX_RATE_PROFILE_SEL_SUPPORTED UINT32_C(0x8) + /* + * When set to 1, indicates that the device is capable of supporting + * the RoCE bi-directional optimization feature. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_BIDI_OPT_SUPPORTED UINT32_C(0x10) + /* + * When set to 1, indicates that the device is capable of supporting + * port mirroring on RoCE device. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_MIRROR_ON_ROCE_SUPPORTED UINT32_C(0x20) + /* + * When set to 1, indicates that the PF is capable of supporting + * dynamic distribution of RoCE resources amongst its VFs + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_ROCE_VF_DYN_ALLOC_SUPPORT UINT32_C(0x40) + /* + * When set to 1, indicates that the device supports changing UDP + * source port of RoCEv2 packets + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_CHANGE_UDP_SRCPORT_SUPPORT UINT32_C(0x80) + /* + * When set to 1, indicates that the device supports enabling or + * disabling pcie compliance. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_PCIE_COMPLIANCE_SUPPORTED UINT32_C(0x100) + /* + * When this bit is '1', it indicates that, when rx/tx/cq/nq l2 + * rings are allocated, each ring can be associated with a + * non-common doorbell page index. When '0', a common doorbell + * page is used for all rings on a PF. This bit is only set on a + * PF. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_MULTI_L2_DB_SUPPORTED UINT32_C(0x200) + /* + * When this bit is '1', it indicates that the firmware supports + * PCIe secure ATS solution. + */ + #define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_PCIE_SECURE_ATS_SUPPORTED UINT32_C(0x400) + /* *** 12097 LINES SKIPPED *** From nobody Mon Jun 15 11:35:36 2026 X-Original-To: dev-commits-src-all@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 4gf7N868l3z6hBHT for ; Mon, 15 Jun 2026 11:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf7N83XDdz3Jmc for ; Mon, 15 Jun 2026 11:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpFXZdYt6lulZ2/pKhg2eBTFy0DR/OYm0BO7N7FpZbg=; b=hDWeJAVMeddRx2MVhDRPMeqkBmbk5vlzibx4RMvZUNj/rPkn8OcoKbaUdb7nFO90UJ6rdw MAkhYJcZ1mPYjudozg+J1MeZGcYx/i/g1aUndflb7a+FzpS6X3GWVh6MrV9J/hz9gFuVkG lIb33l4gXR/HQXvrqsbt8lqx43o5852ZbmOUz9877ULDoGU/4wCvj5yV9Z4TNXxW8PnhaD n7f8sbOw9wgd4YYzmLwniWoGH7PDqmkDuDzmi/4XYfH61L1iD6vmx7vzNL7b+PBZ62mSa6 QKWoGMFEMDAOLYxzRVbCa8jcu68g+8o7Ogki2uh9v4grldGHfXrxNuPJYLBz2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781523336; a=rsa-sha256; cv=none; b=JoqZ47bexAF5vJ5A2TzP9Ha/p2cgv3m6gFrN6mP9VgL+sMgjueZg/z7Io0XyJPVp19AEpU yW6rzxd7XFVHJ4iGd5Tw/D9g+h4x/C9JJS9vt+0G7iV42ICG+b4U8ygOksZx0U8Z2sgyXg xcELfQnsHbkWQbAaz+H/wQm8dDsGtzGzO6B4HdR60ctXhBpnvMO/jvYuCUQUH4qz5rIAPG 2t00rMIs81yjm5o49xQ0XLLycV+7jToLxqLwxz0iOF+2UbXhzaluNB2S4ffqQR3HPY3RvJ +fOk3YBNHq1spaqa54uqazdqNnXdqxIFLAU+ouG9j+oYHXKwbx6wKE0ISHgt1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpFXZdYt6lulZ2/pKhg2eBTFy0DR/OYm0BO7N7FpZbg=; b=nTH+noao6Upgf04KEvjNpSjEqDySYkKAJBYI4IpFJK4eYjYuB536sj055MYzneURGL3kEr LDpZ/yl3U12LfryXJn63xtiXD0oRcL/aUn6c4EM3AlR8iUdofCIvaP6bCSqTxHnLCHUATZ hGfBGsN+6GZmUwnSItWpJpNWJPShSnpW1CW25fWOmjsv6mnNpFSsIO4U0mAFEaesM9Ln6/ d5H9SwjQFmnhq2OOmYBV8JdV2mX8kYeP5szYLxMTMVH8T3VN7/QM6LOS2xxXFP+oW0oGoJ tIxunJs9iczsmTjlztTHjRNHpZHqoe/5qSvHeePmf5uR+MveFacyYFGqAFE21g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf7N833lZzsx3 for ; Mon, 15 Jun 2026 11:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ec9f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 11:35:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 03839879a2dd - main - if_bnxt: Add Firmware crashdump collection support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03839879a2dd2505eab80b99211b0637ebdc9d32 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 11:35:36 +0000 Message-Id: <6a2fe388.1ec9f.2de835f@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=03839879a2dd2505eab80b99211b0637ebdc9d32 commit 03839879a2dd2505eab80b99211b0637ebdc9d32 Author: Sreekanth Reddy AuthorDate: 2026-06-15 09:46:51 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 11:33:51 +0000 if_bnxt: Add Firmware crashdump collection support This patch adds support for DDR-based firmware coredump memory handling. It detects firmware coredump capability, allocates host DDR (DMA) memory for crash dumps, and programs the firmware with the allocated memory during attach. The allocated memory is released during driver detach. Also, This patch adds functions to retrieve crash dump data from host DDR memory. The implementation handles data copying from page tables and checks dump availability. Main function bnxt_get_coredump() copies stored crash dump data from DDR memory to the application buffer. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56684 --- sys/dev/bnxt/bnxt_en/bnxt.h | 20 ++++- sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 120 ++++++++++++++++++++++++++++++ sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 151 ++++++++++++++++++++++++++++++++++++++ sys/dev/bnxt/bnxt_en/bnxt_mgmt.h | 29 +++++++- sys/dev/bnxt/bnxt_en/if_bnxt.c | 48 ++++++++++-- sys/modules/bnxt/bnxt_en/Makefile | 1 + 6 files changed, 362 insertions(+), 7 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index 554e24563db6..dfbf1d8f03d3 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -1129,6 +1129,18 @@ struct bnxt_softc { uint16_t hwrm_cmd_seq; uint32_t hwrm_cmd_timeo; /* milliseconds */ + + /* DDR Crash Dump Support */ + struct bnxt_ctx_pg_info *fw_crash_mem; + uint32_t fw_crash_len; + uint32_t fw_dbg_cap; + #define BNXT_FW_DBG_CAP_CRASHDUMP_SOC 0x00000001 + #define BNXT_FW_DBG_CAP_CRASHDUMP_HOST 0x00000002 + uint16_t dump_flag; + #define BNXT_DUMP_LIVE 0 + #define BNXT_DUMP_CRASH 1 + #define BNXT_DUMP_DRIVER 2 + #define BNXT_DUMP_LIVE_WITH_CTX_L1_CACHE 3 struct iflib_dma_info hwrm_cmd_resp; struct iflib_dma_info hwrm_short_cmd_req_addr; /* Interrupt info for HWRM */ @@ -1220,6 +1232,7 @@ struct bnxt_softc { struct sysctl_oid *dcb_oid; struct bnxt_ver_info *ver_info; + struct hwrm_ver_get_output ver_resp; struct bnxt_nvram_info *nvm_info; bool wol; bool is_dev_init; @@ -1439,5 +1452,10 @@ int bnxt_dcb_ieee_listapp(struct bnxt_softc *softc, struct bnxt_dcb_app *app, size_t nitems, int *num_inputs); void bnxt_set_flags_by_devid(struct bnxt_softc *softc); int bnxt_hwrm_reserve_rings(struct bnxt_softc *softc); - +void bnxt_free_ctx_pg_tbls(struct bnxt_softc *softc, + struct bnxt_ctx_pg_info *ctx_pg); +int bnxt_alloc_ctx_pg_tbls(struct bnxt_softc *softc, + struct bnxt_ctx_pg_info *ctx_pg, + uint32_t mem_size, uint8_t depth, + struct bnxt_ctx_mem_type *ctxm); #endif /* _BNXT_H */ diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c index b89a44e4677b..5964511f8276 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c @@ -33,6 +33,7 @@ #include "bnxt.h" #include "bnxt_hwrm.h" #include "hsi_struct_def.h" +#include "bnxt_coredump.h" static int bnxt_hwrm_err_map(uint16_t err); static inline int _is_valid_ether_addr(uint8_t *); @@ -889,6 +890,8 @@ bnxt_hwrm_ver_get(struct bnxt_softc *softc) if (rc) goto fail; + memcpy(&softc->ver_resp, resp, sizeof(struct hwrm_ver_get_output)); + snprintf(softc->ver_info->hwrm_if_ver, BNXT_VERSTR_SIZE, "%d.%d.%d", resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b, resp->hwrm_intf_upd_8b); softc->ver_info->hwrm_if_major = resp->hwrm_intf_maj_8b; @@ -3327,3 +3330,120 @@ void bnxt_hwrm_ring_info_get(struct bnxt_softc *softc, uint8_t ring_type, return; } + +/* Query debug capabilities */ +void +bnxt_hwrm_dbg_qcaps(struct bnxt_softc *softc) +{ + hwrm_dbg_qcaps_input_t req = {0}; + hwrm_dbg_qcaps_output_t *resp; + uint32_t flags; + int rc; + + softc->fw_dbg_cap = 0; + if (!(softc->fw_cap & BNXT_FW_CAP_DBG_QCAPS)) + return; + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_DBG_QCAPS); + req.fid = htole16(0xffff); + resp = (hwrm_dbg_qcaps_output_t *)(void *) + softc->hwrm_cmd_resp.idi_vaddr; + rc = hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + return; + + flags = le32toh(resp->flags); + if (flags & HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_SOC_DDR) + softc->fw_dbg_cap |= BNXT_FW_DBG_CAP_CRASHDUMP_SOC; + if (flags & HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_HOST_DDR) + softc->fw_dbg_cap |= BNXT_FW_DBG_CAP_CRASHDUMP_HOST; +} + +/* Configure firmware with DDR crash dump memory */ +int +bnxt_hwrm_crash_dump_mem_cfg(struct bnxt_softc *softc) +{ + hwrm_dbg_crashdump_medium_cfg_input_t req = {0}; + uint16_t page_attr = 0; + int rc; + + if (!(softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_HOST)) + return (0); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_DBG_CRASHDUMP_MEDIUM_CFG); + + if (BNXT_PAGE_SIZE == 0x2000) + page_attr = HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_8K; + else if (BNXT_PAGE_SIZE == 0x10000) + page_attr = HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_64K; + else + page_attr = HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_4K; + + req.pg_size_lvl = htole16(page_attr | + softc->fw_crash_mem->ring_mem.depth); + + if (softc->fw_crash_mem->ring_mem.depth > 1) + req.pbl = htole64( + softc->fw_crash_mem->ring_mem.pg_tbl.idi_paddr); + else + req.pbl = htole64( + softc->fw_crash_mem->ring_mem.pg_arr[0].idi_paddr); + + req.size = htole32(softc->fw_crash_len); + req.output_dest_flags = htole16( + HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_TYPE_DDR); + + rc = hwrm_send_message(softc, &req, sizeof(req)); + return (rc); +} + +/* Get dump length from firmware */ +int +bnxt_hwrm_get_dump_len(struct bnxt_softc *softc, uint16_t dump_type, + uint32_t *dump_len) +{ + hwrm_dbg_qcfg_output_t *resp; + hwrm_dbg_qcfg_input_t req = {0}; + int rc; + + if (!(softc->fw_cap & BNXT_FW_CAP_DBG_QCAPS) || + dump_type == BNXT_DUMP_DRIVER) + return (-EOPNOTSUPP); + + if (dump_type == BNXT_DUMP_CRASH && + !(softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_SOC || + (softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_HOST))) + return (-EOPNOTSUPP); + + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_DBG_QCFG); + + req.fid = htole16(0xffff); + if (dump_type == BNXT_DUMP_CRASH) { + if (softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_SOC) + req.flags = htole16( + HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_SOC_DDR); + else + req.flags = htole16( + HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_HOST_DDR); + } + + resp = (hwrm_dbg_qcfg_output_t *)(void *)softc->hwrm_cmd_resp.idi_vaddr; + rc = hwrm_send_message(softc, &req, sizeof(req)); + if (rc) + goto get_dump_len_exit; + + if (dump_type == BNXT_DUMP_CRASH) { + if (softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_SOC) + *dump_len = BNXT_CRASH_DUMP_LEN; + else + *dump_len = le32toh(resp->crashdump_size); + } else { + *dump_len = le32_to_cpu(resp->coredump_size); + } + if (*dump_len <= 0) + rc = -EINVAL; + +get_dump_len_exit: + return (rc); +} + diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index fd6d7b904dca..0a12bea17ead 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -29,6 +29,7 @@ #include "bnxt_mgmt.h" #include "bnxt.h" #include "bnxt_hwrm.h" +#include "bnxt_coredump.h" #include "bnxt_log.h" #include #include @@ -266,6 +267,152 @@ bnxt_get_ctx_coredump(struct bnxt_softc *softc, void *buf) } } +/* DDR Crash Dump IOCTL handler */ +static int +bnxt_mgmt_crash_dump(struct cdev *dev, u_long cmd, caddr_t data, + int flag, struct thread *td) +{ + struct bnxt_softc *softc = NULL; + struct bnxt_mgmt_crash_dump mgmt_crash_dump = {0}; + void *user_ptr; + int ret = 0; + void *dump_buf = NULL; + uint32_t dump_len; + + memcpy(&user_ptr, data, sizeof(user_ptr)); + if (copyin(user_ptr, &mgmt_crash_dump, sizeof(mgmt_crash_dump))) { + printf("%s: %s:%d Failed to copy data from user\n", + DRIVER_NAME, __func__, __LINE__); + return (-EFAULT); + } + softc = bnxt_find_dev(mgmt_crash_dump.hdr.domain, + mgmt_crash_dump.hdr.bus, + mgmt_crash_dump.hdr.devfn, NULL); + if (!softc) { + printf("%s: %s:%d unable to find softc reference\n", + DRIVER_NAME, __func__, __LINE__); + return (-ENODEV); + } + + switch (mgmt_crash_dump.op) { + case BNXT_MGMT_SET_DUMP_FLAG: + if (mgmt_crash_dump.req.set_flag.dump_flag > + BNXT_DUMP_LIVE_WITH_CTX_L1_CACHE) { + device_printf(softc->dev, + "Supports only Live(0), Crash(1), Driver(2), " + "Live with cached context(3) dumps.\n"); + ret = -EINVAL; + break; + } + + if (mgmt_crash_dump.req.set_flag.dump_flag == BNXT_DUMP_CRASH) { + if (softc->fw_dbg_cap & BNXT_FW_DBG_CAP_CRASHDUMP_SOC) { + device_printf(softc->dev, + "Cannot collect crash dump as TEE is not supported.\n"); + ret = -ENOTSUP; + break; + } else if (!(softc->fw_dbg_cap & + BNXT_FW_DBG_CAP_CRASHDUMP_HOST)) { + device_printf(softc->dev, + "FW does not support crash dump collection.\n"); + ret = -ENOTSUP; + break; + } + } + + softc->dump_flag = mgmt_crash_dump.req.set_flag.dump_flag; + break; + + case BNXT_MGMT_GET_DUMP_FLAG: + if (softc->hwrm_spec_code < 0x10801) { + ret = -ENOTSUP; + break; + } + + /* Build FW version - same as Linux bnxt_get_dump_flag() */ + mgmt_crash_dump.req.get_flag.version = + (softc->ver_resp.hwrm_fw_maj_8b << 24) | + (softc->ver_resp.hwrm_fw_min_8b << 16) | + (softc->ver_resp.hwrm_fw_bld_8b << 8) | + (softc->ver_resp.hwrm_fw_rsvd_8b); + + mgmt_crash_dump.req.get_flag.dump_flag = softc->dump_flag; + mgmt_crash_dump.req.get_flag.dump_len = + bnxt_get_coredump_length(softc, softc->dump_flag); + break; + + case BNXT_MGMT_GET_DUMP_DATA: + if (softc->hwrm_spec_code < 0x10801) { + ret = -ENOTSUP; + break; + } + + dump_len = bnxt_get_coredump_length(softc, + mgmt_crash_dump.req.get_data.dump_flag); + if (dump_len == 0) { + device_printf(softc->dev, "No dump data available\n"); + ret = -ENOENT; + break; + } + + if (mgmt_crash_dump.req.get_data.buffer_size < dump_len) { + device_printf(softc->dev, + "Buffer too small: need %u bytes, got %zu bytes\n", + dump_len, mgmt_crash_dump.req.get_data.buffer_size); + mgmt_crash_dump.req.get_data.dump_len = dump_len; + ret = -ENOSPC; + break; + } + + dump_buf = malloc(dump_len, M_BNXT, M_WAITOK); + if (!dump_buf) { + ret = -ENOMEM; + break; + } + + ret = bnxt_get_coredump(softc, + mgmt_crash_dump.req.get_data.dump_flag, + dump_buf, &dump_len); + if (ret) { + device_printf(softc->dev, + "Failed to get coredump: %d\n", ret); + free(dump_buf, M_BNXT); + break; + } + + if (copyout(dump_buf, + mgmt_crash_dump.req.get_data.dump_buffer, dump_len)) { + device_printf(softc->dev, + "%s:%d Failed to copy dump data to user\n", + __func__, __LINE__); + ret = -EFAULT; + free(dump_buf, M_BNXT); + break; + } + + mgmt_crash_dump.req.get_data.dump_len = dump_len; + mgmt_crash_dump.req.get_data.dump_flag = softc->dump_flag; + free(dump_buf, M_BNXT); + break; + + default: + device_printf(softc->dev, "%s:%d Invalid op 0x%x\n", + __func__, __LINE__, mgmt_crash_dump.op); + ret = -EFAULT; + break; + } + + if (!ret && copyout(&mgmt_crash_dump, user_ptr, + sizeof(mgmt_crash_dump))) { + device_printf(softc->dev, + "%s:%d Failed to copy response to user\n", + __func__, __LINE__); + ret = -EFAULT; + } + + return (ret); +} + /* * This function is called by the kld[un]load(2) system calls to * determine what actions to take when a module is loaded or unloaded. @@ -693,6 +840,10 @@ bnxt_mgmt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, case IOW_BNXT_MGMT_OPCODE_DRV_DUMP: ret = bnxt_mgmt_drv_dump(dev, cmd, data, flag, td); break; + case IO_BNXT_MGMT_OPCODE_CRASH_DUMP: + case IOW_BNXT_MGMT_OPCODE_CRASH_DUMP: + ret = bnxt_mgmt_crash_dump(dev, cmd, data, flag, td); + break; default: printf("%s: Unknown command 0x%lx\n", DRIVER_NAME, cmd); ret = -EINVAL; diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h index cdd6964158ee..272fb0e298cb 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h @@ -44,11 +44,13 @@ #define IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IOW(0, 1, 0) #define IOW_BNXT_MGMT_OPCODE_DCB_OPS _IOW(0, 2, 0) #define IOW_BNXT_MGMT_OPCODE_DRV_DUMP _IOW(0, 3, 0) +#define IOW_BNXT_MGMT_OPCODE_CRASH_DUMP _IOW(0, 4, 0) #define IO_BNXT_MGMT_OPCODE_GET_DEV_INFO _IO(0, 0) #define IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IO(0, 1) #define IO_BNXT_MGMT_OPCODE_DCB_OPS _IO(0, 2) #define IO_BNXT_MGMT_OPCODE_DRV_DUMP _IO(0, 3) +#define IO_BNXT_MGMT_OPCODE_CRASH_DUMP _IO(0, 4) #define BNXT_MGMT_MAX_HWRM_REQ_LENGTH HWRM_MAX_REQ_LEN #define BNXT_MGMT_MAX_HWRM_RESP_LENGTH (512) @@ -81,7 +83,7 @@ struct bnxt_pci_info { } __packed; struct bnxt_dev_info { - struct bnxt_nic_info nic_info; + struct bnxt_nic_info nic_info; struct bnxt_pci_info pci_info; } __packed; @@ -165,6 +167,31 @@ struct bnxt_mgmt_drv_dump { uint32_t buf_size; } __attribute__ ((__packed__)); +struct bnxt_mgmt_crash_dump { + struct bnxt_mgmt_req_hdr hdr; +#define BNXT_MGMT_SET_DUMP_FLAG 0x1 +#define BNXT_MGMT_GET_DUMP_FLAG 0x2 +#define BNXT_MGMT_GET_DUMP_DATA 0x3 +#define BNXT_MGMT_CRASH_DUMP_MAX BNXT_MGMT_GET_DUMP_DATA + uint32_t op; + union { + struct { + uint32_t dump_flag; + } set_flag; + struct { + uint32_t dump_flag; + uint32_t dump_len; + uint32_t version; + } get_flag; + struct { + uint32_t dump_flag; + uint32_t dump_len; + void *dump_buffer; + size_t buffer_size; + } get_data; + } req; +} __attribute__ ((__packed__)); + struct bnxt_driver_segment_record { uint32_t max_entries; uint32_t entry_size; diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 83f339bb045f..c10a66156563 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -73,6 +73,7 @@ #include "bnxt_auxbus_compat.h" #include "bnxt_log.h" #include "bnxt_log_data.h" +#include "bnxt_coredump.h" /* * PCI Device ID Table @@ -269,6 +270,7 @@ static void bnxt_queue_fw_reset_work(struct bnxt_softc *bp, unsigned long delay) void bnxt_queue_sp_work(struct bnxt_softc *bp); void bnxt_fw_reset(struct bnxt_softc *bp); +static int bnxt_crash_dump_init(struct bnxt_softc *softc); /* * Device Interface Declaration */ @@ -1101,9 +1103,10 @@ static int bnxt_alloc_ctx_mem_blk(struct bnxt_softc *softc, return bnxt_alloc_ring(softc, rmem); } -static int bnxt_alloc_ctx_pg_tbls(struct bnxt_softc *softc, - struct bnxt_ctx_pg_info *ctx_pg, u32 mem_size, - u8 depth, struct bnxt_ctx_mem_type *ctxm) +int +bnxt_alloc_ctx_pg_tbls(struct bnxt_softc *softc, + struct bnxt_ctx_pg_info *ctx_pg, uint32_t mem_size, uint8_t depth, + struct bnxt_ctx_mem_type *ctxm) { struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem; int rc; @@ -1161,8 +1164,8 @@ static int bnxt_alloc_ctx_pg_tbls(struct bnxt_softc *softc, return rc; } -static void bnxt_free_ctx_pg_tbls(struct bnxt_softc *softc, - struct bnxt_ctx_pg_info *ctx_pg) +void bnxt_free_ctx_pg_tbls(struct bnxt_softc *softc, + struct bnxt_ctx_pg_info *ctx_pg) { struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem; @@ -2241,6 +2244,8 @@ static int bnxt_open(struct bnxt_softc *bp) if (rc) return rc; + bnxt_hwrm_dbg_qcaps(bp); + /* Register the driver with the FW */ rc = bnxt_drv_rgtr(bp); if (rc) @@ -2388,6 +2393,7 @@ static void bnxt_fw_reset_task(struct work_struct *work) bnxt_ulp_start(bp, 0); clear_bit(BNXT_STATE_FW_ACTIVATE, &bp->state); set_bit(BNXT_STATE_OPEN, &bp->state); + bnxt_crash_dump_init(bp); #ifdef PCI_IOV bnxt_reenable_sriov(bp); #endif @@ -2514,6 +2520,29 @@ bnxt_log_live_data(void *d) bnxt_log_ring_states(bp); } +/* DDR Crash Dump Setup */ +static int +bnxt_crash_dump_init(struct bnxt_softc *softc) +{ + int rc; + + rc = bnxt_alloc_crash_dump_mem(softc); + if (rc) { + device_printf(softc->dev, + "crash dump mem alloc failure rc: %d\n", rc); + return (rc); + } + + rc = bnxt_hwrm_crash_dump_mem_cfg(softc); + if (rc) { + bnxt_free_crash_dump_mem(softc); + device_printf(softc->dev, + "hwrm crash dump mem failure rc: %d\n", rc); + } + + return (rc); +} + /* Device setup and teardown */ static int bnxt_attach_pre(if_ctx_t ctx) @@ -2706,6 +2735,8 @@ bnxt_attach_pre(if_ctx_t ctx) } } + bnxt_hwrm_dbg_qcaps(softc); + /* * Register the driver with the FW * Register the async events with the FW @@ -2893,6 +2924,7 @@ bnxt_attach_pre(if_ctx_t ctx) return (rc); + failed: bnxt_free_sysctl_ctx(softc); init_sysctl_failed: @@ -2952,6 +2984,11 @@ bnxt_attach_post(if_ctx_t ctx) if (BNXT_PF(softc) && BNXT_CHIP_P5_PLUS(softc)) bnxt_sriov_attach(softc); + rc = bnxt_crash_dump_init(softc); + if (rc) + device_printf(softc->dev, + "crash dump init failure rc: %d\n", rc); + failed: return rc; } @@ -2973,6 +3010,7 @@ bnxt_detach(if_ctx_t ctx) bnxt_wol_config(ctx); bnxt_do_disable_intr(&softc->def_cp_ring); bnxt_free_sysctl_ctx(softc); + bnxt_free_crash_dump_mem(softc); bnxt_hwrm_func_reset(softc); bnxt_free_ctx_mem(softc); bnxt_clear_ids(softc); diff --git a/sys/modules/bnxt/bnxt_en/Makefile b/sys/modules/bnxt/bnxt_en/Makefile index 7cb450baac4e..e3cc3e79377c 100644 --- a/sys/modules/bnxt/bnxt_en/Makefile +++ b/sys/modules/bnxt/bnxt_en/Makefile @@ -13,6 +13,7 @@ SRCS += bnxt_sriov.c bnxt_sriov.h SRCS += bnxt_ulp.c bnxt_ulp.h SRCS += bnxt_log.c bnxt_log.h SRCS += bnxt_log_data.c bnxt_log_data.h +SRCS += bnxt_coredump.c bnxt_coredump.h SRCS += ${LINUXKPI_GENSRCS} CFLAGS+= -DIFLIB From nobody Mon Jun 15 11:35:38 2026 X-Original-To: dev-commits-src-all@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 4gf7NC2jLhz6hBl9 for ; Mon, 15 Jun 2026 11:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf7NC05Hsz3Jgm for ; Mon, 15 Jun 2026 11:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM70prObBbTqgUWkSQrA2AgobUW49lXucS0Wm/mluOE=; b=WFHLtpi2Mro7QiqdCkSLPGdfJeU9QBNZe16dw9hR8mZqAPdNsB2FVXHWSzqAUzj4c8ZvY9 gQTpnLmhnm9xvG/6CJFyIyJPWBdp9U7N44DZ5FDNuwuzuFMD7RGq8KMYYXgtryJ//Ny9cz nHXf3dRgxl31I144xhf8BWLpuAc7vI1pj95LtkrIdG3qAvY2PH0ULYC1UR+1LGA+Q++105 mcXJKi1kHEI5fn7LeDziVLD6nUKWLgs0sV0GmOxyBzw9ROL/Pv03f9W8u9+LQ9GSGBR4LX 180EAWZk5XzstSdRhSTvCZCS4G9a8PPo8Auj1i3fJ/pQ+5YUl/TOz8Vx3oreAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781523339; a=rsa-sha256; cv=none; b=OLS70519YJBnZ4V4lBTW2Vy0D81Lvyf1Vgk38+TQi7/bbLu6ljxuyrRoleEde6cIgHgtsh bcVhfgiiFYOBYzAQdWvsn2vtTzKEIaNb0wddE+btV7VNesfejT7RmJP3OucOQmBDD76dDB 14KJ/O6eC5TerKCRxp3DVhIuCOJKPN7DZpULxdt3erWKWhxPp+ibCigeAorD7GFJPfpjeO ogTCFyAIaRzoNj4PfTB2u7wAObjNe6tq6y2iOvYBQoeFcqtf6yIqYVSHeqjZW0lvWfYHgX GRfma5E49VEjCm+TtB6zgvaR7c7zVyXu+43XB0x3JpFS14tLv38E2xGb3cHHqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PM70prObBbTqgUWkSQrA2AgobUW49lXucS0Wm/mluOE=; b=Gy5Qv01LXdfL8Q/AJ6HXQgzUjbq07z0+smxcjSoB//kA14XDUDW7Guhtsqoka9IAUwj2QS 1sYWFvZjL8Cj69fTjXTCL9rP+sDbb6M5REFSKUWcBz0UQTMQsu1rO1yYOt0NRzgMK9o1xk zbsEZnKIVREC1eWFJJx5eCH1evD4fTWbNDlTKVVfRqaWXY9VKuJbs/7Nac6Ge4q/6vkV3W yHSSIIsXBr/FiXPRzcfTLc6oBPLNosZ5CUYW779eoPZ7beybCvIoEjmpL2hPdUhgcSk4f2 fMRI3axzuuyJMgY9HLkO2TNLz9beMRCaw0NLTlPrX6Jya52L4HQW7LTfL1Z6RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf7NB4lg7ztdS for ; Mon, 15 Jun 2026 11:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c475 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 11:35:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 9d87ca8b9f60 - main - if_bnxt: Add support for HWRM passthrough with multiple DMA buffers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d87ca8b9f60bdec0bbc1733920df250a08beb0c Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 11:35:38 +0000 Message-Id: <6a2fe38a.1c475.1aea1c80@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=9d87ca8b9f60bdec0bbc1733920df250a08beb0c commit 9d87ca8b9f60bdec0bbc1733920df250a08beb0c Author: Sreekanth Reddy AuthorDate: 2026-06-15 09:49:40 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 11:34:12 +0000 if_bnxt: Add support for HWRM passthrough with multiple DMA buffers Added support for HWRM passthrough commands with multiple DMA buffers. Also, changed the mgmt_lock to sleepable exclusive lock. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56686 --- sys/dev/bnxt/bnxt_en/bnxt.h | 3 ++ sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 96 ++++++++++++++++++++++++---------------- 2 files changed, 60 insertions(+), 39 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index dfbf1d8f03d3..7e58139f1ab6 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -1397,6 +1397,9 @@ struct bnxt_softc { struct mtx log_lock; /* logging ops lock */ struct callout time_sync_callout; struct bnxt_bs_trace_info bs_trace[BNXT_CTX_TRACE_BUF_COUNT]; + +#define MAX_NUM_DMA_INDICATIONS 10 + struct iflib_dma_info mgmt_dma_data[MAX_NUM_DMA_INDICATIONS]; }; struct bnxt_filter_info { diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index 0a12bea17ead..edf50ac1432f 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -52,7 +52,7 @@ static struct cdevsw bnxt_mgmt_cdevsw = { /* Global vars */ static struct cdev *bnxt_mgmt_dev; -struct mtx mgmt_lock; +struct sx mgmt_lock; MALLOC_DEFINE(M_BNXT, "bnxt_mgmt_buffer", "buffer for bnxt_mgmt module"); @@ -439,11 +439,11 @@ bnxt_mgmt_loader(struct module *m, int what, void *arg) return (error); } - mtx_init(&mgmt_lock, "BNXT MGMT Lock", NULL, MTX_DEF); + sx_init(&mgmt_lock, "BNXT MGMT Lock"); break; case MOD_UNLOAD: - mtx_destroy(&mgmt_lock); + sx_destroy(&mgmt_lock); destroy_dev(bnxt_mgmt_dev); break; default: @@ -526,9 +526,8 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, struct bnxt_softc *softc = NULL; struct bnxt_mgmt_req mgmt_req = {}; struct bnxt_mgmt_fw_msg msg_temp, *msg, *msg2 = NULL; - struct iflib_dma_info dma_data = {}; void *user_ptr, *req, *resp; - int ret = 0; + int ret = 0, num_allocated = 0, i; uint16_t num_ind = 0; memcpy(&user_ptr, data, sizeof(user_ptr)); @@ -558,9 +557,10 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, return -EINVAL; } - if (msg_temp.num_dma_indications > 1) { + if (msg_temp.num_dma_indications > MAX_NUM_DMA_INDICATIONS) { device_printf(softc->dev, "%s:%d Max num_dma_indications " - "supported is 1\n", __func__, __LINE__); + "supported is %d\n", __func__, __LINE__, + MAX_NUM_DMA_INDICATIONS); return -EINVAL; } @@ -594,43 +594,58 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, } msg = msg2; - ret = iflib_dma_alloc(softc->ctx, msg->dma[0].length, &dma_data, - BUS_DMA_NOWAIT); - if (ret) { - device_printf(softc->dev, "%s:%d iflib_dma_alloc" - "failed with ret = 0x%x\n", __func__, - __LINE__, ret); - ret = -ENOMEM; - goto end; - } + for (i = 0; i < num_ind; i++) { - if (!(msg->dma[0].read_or_write)) { - if (copyin((void *)msg->dma[0].data, - dma_data.idi_vaddr, - msg->dma[0].length)) { - device_printf(softc->dev, "%s:%d Failed to copy" - "data from user\n", __func__, - __LINE__); - ret = -EFAULT; + if (msg->dma[i].length == 0) { + device_printf(softc->dev, + "%s:%d i:%d Invalid DMA memory length\n", + __func__, __LINE__, i); + ret = -ENOMEM; + goto end; + } + + memset(&softc->mgmt_dma_data[i], 0, sizeof(struct iflib_dma_info)); + + ret = iflib_dma_alloc(softc->ctx, msg->dma[i].length, &softc->mgmt_dma_data[i], + BUS_DMA_WAITOK); + if (ret) { + device_printf(softc->dev, + "%s:%d iflib_dma_alloc failed with ret = 0x%x\n", + __func__, __LINE__, ret); + ret = -ENOMEM; goto end; } + + num_allocated++; + if (!(msg->dma[i].read_or_write)) { + if (copyin((void *)msg->dma[i].data, + softc->mgmt_dma_data[i].idi_vaddr, + msg->dma[i].length)) { + device_printf(softc->dev, + "%s:%d Failed to copy data from user\n", + __func__, __LINE__); + ret = -EFAULT; + goto end; + } + } + dma_ptr = (void *) ((uint64_t) req + msg->dma[i].offset); + dmap = dma_ptr; + *dmap = htole64(softc->mgmt_dma_data[i].idi_paddr); } - dma_ptr = (void *) ((uint64_t) req + msg->dma[0].offset); - dmap = dma_ptr; - *dmap = htole64(dma_data.idi_paddr); } ret = bnxt_hwrm_passthrough(softc, req, msg->len_req, resp, msg->len_resp, msg->timeout); - if(ret) + if (ret) goto end; - if (num_ind) { - if ((msg->dma[0].read_or_write)) { - if (copyout(dma_data.idi_vaddr, - (void *)msg->dma[0].data, - msg->dma[0].length)) { - device_printf(softc->dev, "%s:%d Failed to copy data" - "to user\n", __func__, __LINE__); + for (i = 0; i < num_ind; i++) { + if ((msg->dma[i].read_or_write)) { + if (copyout(softc->mgmt_dma_data[i].idi_vaddr, + (void *)msg->dma[i].data, + msg->dma[i].length)) { + device_printf(softc->dev, + "%s:%d Failed to copy data to user\n", + __func__, __LINE__); ret = -EFAULT; goto end; } @@ -651,8 +666,11 @@ end: free(resp, M_BNXT); if (msg2) free(msg2, M_BNXT); - if (dma_data.idi_paddr) - iflib_dma_free(&dma_data); + if (num_allocated) { + for (i = 0; i < num_allocated; i++) + if (softc->mgmt_dma_data[i].idi_paddr) + iflib_dma_free(&softc->mgmt_dma_data[i]); + } return ret; } @@ -828,9 +846,9 @@ bnxt_mgmt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, break; case IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM: case IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM: - mtx_lock(&mgmt_lock); + sx_xlock(&mgmt_lock); ret = bnxt_mgmt_process_hwrm(dev, cmd, data, flag, td); - mtx_unlock(&mgmt_lock); + sx_xunlock(&mgmt_lock); break; case IO_BNXT_MGMT_OPCODE_DCB_OPS: case IOW_BNXT_MGMT_OPCODE_DCB_OPS: From nobody Mon Jun 15 11:35:34 2026 X-Original-To: dev-commits-src-all@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 4gf7NC5hSFz6hBmZ for ; Mon, 15 Jun 2026 11:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf7NC1hnmz3JVy for ; Mon, 15 Jun 2026 11:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjwrP4J+VEgE9VMlm5ggJF2AiyVysaoU8UC1IRlML2w=; b=cibbroRaYyDcNAhxu/ws2ypT2RJqtRPGp9KlHa/ohrtRnavsRss1qHrbqrnvzSBqkqOVKr 2xPFMlw10KrOXQO03blZs7Evi/mMWX/RPIjUqXaQpjIZIg6erdmv3pWBYOfSaTY4vHRsja P9qeR/vLn8eZDkyWjDiedfe0sZIauT4BCNvYMMcPGSupqDerUyL+XMR9E0t3tN+cWTkCkm C3+GkmSRYFCAkS9pbMLeyBIZOHzlFfFRa7nGhM+5IDz+kuiFJfPTxg21SD1Zx7qTZjdFR3 R4629WaNoSavdMzvBL/bm9ipku2WQImhbSFA7pOnz+YPNQ6feHuc3sxYRwASBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781523339; a=rsa-sha256; cv=none; b=IxxtfYoAplgXrVpYyBXI89CjZ7C+5U0JhePS/oe/ic5XV1oBJgr45CurWclaDW992c/XYr mbxJZQa1EF4Zhh317N9HqaygfTEzfESCnxQHW+eSKcyL+3QxKuxgJAmqPPAI5sR3qmOmeh pqz5xTa616MZMqu5e0x78diRi8jJBrota3OURwUTF5WmLQvt+UjfL6OM5MVS1IJ+bfdkia N1ASEoCbsDs8qH257kEBygHtBtbe7G0VPU7YdkljNR0k8T9I411jP//oapAZfZUryPAklI a02Lwh/18nsvrayqXCOonhTql8/xnWqORI64XZp6nHI1rEJS1iSRFR0KRQRteg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjwrP4J+VEgE9VMlm5ggJF2AiyVysaoU8UC1IRlML2w=; b=J8pnGYotZqnv/my5T5hLOOop64Lz5knpNC+FIbRAJX+nsn5PA9rOd3KdNNZcQYx7gKoH9L JQNHC1yyJIYWJPaF8Xd5g1cv1s1QRIOAUidcShya2GumkmDdyQ1YPTmdw76YIMVvpzkY6W 79S+T8MXj+I5dwTLG6/Fw6sNnKIKuNBusw6Grvlr9Azc0nNxaIVJ32W5W/edC5dWr9d3uX 5k8q0+mR8jKFLcfGjOlbRapfJiJdJfKIc0afSe4C1mHMdd07bS2KbLOneDAjkvhMV4Hro8 dbVSMESEbOPLee7Bl3hsqo9qRdcHghyhtM6gC4V6QhIdRLi6EGC4RrRHnr31eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf7NC0HYkztPf for ; Mon, 15 Jun 2026 11:35:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de68 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 11:35:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: f85e66e655c9 - main - if_bnxt/bnxt_re: add support for driver snapdump List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f85e66e655c9293ea049814e21ed67ab246a7305 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 11:35:34 +0000 Message-Id: <6a2fe386.1de68.388fda90@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=f85e66e655c9293ea049814e21ed67ab246a7305 commit f85e66e655c9293ea049814e21ed67ab246a7305 Author: Sreekanth Reddy AuthorDate: 2026-06-15 09:40:30 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 11:30:40 +0000 if_bnxt/bnxt_re: add support for driver snapdump Add a logging module which helps to log and collect the driver`s various events and state of device data structures. APIs help modules like l2, RoCE etc. to register and add logs into thg buffers. A segment header is added to the data available in buffers. The final log messages are arranged in following fashion |SegHeader0|Data0|SegHeader1|Data1| Logging module provides two different kinds of buffers: a) A large contiguous memory chunk is used to form circular buffers. Module need to provide a number of buffers while registering to the logging module.Please note that, since memory for the buffers remains with the module as long as it is registered, memory footprints of the driver could be higher so the modules should allocate an appropriate number of buffers. Also, due to limited space, modules should only log important events/messages into the buffer. Modules must use bnxt_log_add_mssg() to add the message into the list. b) Live buffer - They are allocated during coredump retrieval and freed after the coredump data is returned to the user. This helps to collect live data from the driver. Modules must use the bnxt_log_live() function to add the log messages. When coredump is retrieved all the messages available in above buffers are copied into the coredump buffer. Test Plan: Generate the coredump using below niccli command ./niccli.freebsd -i 1 debug --coredump and then verify the coredump contents using the Broadcom's Coredump decoder. MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56682 --- sys/dev/bnxt/bnxt_en/bnxt.h | 44 ++++- sys/dev/bnxt/bnxt_en/bnxt_mgmt.c | 378 +++++++++++++++++++++++++++++++++----- sys/dev/bnxt/bnxt_en/bnxt_mgmt.h | 31 ++++ sys/dev/bnxt/bnxt_en/bnxt_ulp.c | 35 ++++ sys/dev/bnxt/bnxt_en/bnxt_ulp.h | 4 + sys/dev/bnxt/bnxt_en/if_bnxt.c | 82 ++++++++- sys/dev/bnxt/bnxt_re/main.c | 65 +++++++ sys/modules/bnxt/bnxt_en/Makefile | 2 + 8 files changed, 593 insertions(+), 48 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index b15cc65e290e..554e24563db6 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -829,10 +829,34 @@ struct bnxt_ctx_mem_type { #define BNXT_CTX_L2_MAX (BNXT_CTX_FTQM + 1) #define BNXT_CTX_V2_MAX (HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE + 1) -#define BNXT_CTX_SRT_TRACE HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT_TRACE -#define BNXT_CTX_ROCE_HWRM_TRACE HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE + +#define BNXT_CTX_SRT_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT_TRACE + +#define BNXT_CTX_SRT2_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT2_TRACE + +#define BNXT_CTX_CRT_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT_TRACE + +#define BNXT_CTX_CRT2_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT2_TRACE + +#define BNXT_CTX_RIGP0_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_RIGP0_TRACE + +#define BNXT_CTX_L2_HWRM_TRACE \ + HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_L2_HWRM_TRACE + +#define BNXT_CTX_ROCE_HWRM_TRACE \ + HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE + #define BNXT_CTX_INV ((u16)-1) +#define BNXT_CTX_TRACE_BUF_COUNT \ + (BNXT_CTX_ROCE_HWRM_TRACE - BNXT_CTX_SRT_TRACE + 1) + + struct bnxt_ctx_mem_info { u8 tqm_fp_rings_count; @@ -1045,6 +1069,17 @@ struct bnxt_fw_health { #define DB_RING_IDX(ring, idx, bit) (((idx) & (ring)->db_ring_mask) | \ ((bit) << (24))) +struct bnxt_bs_trace_info { + u8 *magic_byte; +#define BNXT_TRACE_BUF_MAGIC_BYTE ((uint8_t)0xBC) + u32 last_offset; + u8 wrapped:1; + u16 ctx_type; + u16 trace_type; +}; + +struct bnxt_logger; + struct bnxt_softc { device_t dev; if_ctx_t ctx; @@ -1344,6 +1379,11 @@ struct bnxt_softc { struct bnxt_fw_health *fw_health; char board_partno[64]; + TAILQ_HEAD(, bnxt_logger) loggers_list; + void *debug_buf; + struct mtx log_lock; /* logging ops lock */ + struct callout time_sync_callout; + struct bnxt_bs_trace_info bs_trace[BNXT_CTX_TRACE_BUF_COUNT]; }; struct bnxt_filter_info { diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c index 98ae9848c42b..fd6d7b904dca 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.c @@ -26,9 +26,10 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#include "bnxt_mgmt.h" +#include "bnxt_mgmt.h" #include "bnxt.h" -#include "bnxt_hwrm.h" +#include "bnxt_hwrm.h" +#include "bnxt_log.h" #include #include #include @@ -54,6 +55,217 @@ struct mtx mgmt_lock; MALLOC_DEFINE(M_BNXT, "bnxt_mgmt_buffer", "buffer for bnxt_mgmt module"); + +static uint32_t +bnxt_get_driver_coredump_len(struct bnxt_softc *softc) +{ + + uint32_t type, i, j, n; + uint32_t buf_size = 0; + int ctx_page_count = 0; + int segment_len = 0; + int driver_segment_record_len = 0; + uint32_t dump_len = 0; + int record_len = sizeof(struct bnxt_driver_segment_record); + struct bnxt_ctx_mem_info *ctx = softc->ctx_mem; + + if (!ctx) + return (dump_len); + + for (type = BNXT_CTX_SRT_TRACE; type <= BNXT_CTX_ROCE_HWRM_TRACE; + type++) { + struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type]; + struct bnxt_ctx_pg_info *ctx_pg = ctxm->pg_info; + + if (!ctx_pg) + continue; + + if (ctxm->instance_bmap) + n = bitcount32(ctxm->instance_bmap); + else + n = 1; + + for (i = 0; i < n; i++) { + struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem; + + if (ctx_pg->nr_pages > MAX_CTX_PAGES || + ctx_pg->ctx_pg_tbl) { + int k = 0, nr_tbls = rmem->nr_pages; + + for (k = 0; k < nr_tbls; k++) { + struct bnxt_ctx_pg_info *pg_tbl; + struct bnxt_ring_mem_info *rmem2; + + pg_tbl = ctx_pg->ctx_pg_tbl[k]; + if (!pg_tbl) + continue; + rmem2 = &pg_tbl->ring_mem; + for (j = 0; j < rmem2->nr_pages; j++) { + if (!rmem2->pg_arr[j].idi_vaddr) + continue; + ctx_page_count++; + } + } + } else { + struct bnxt_ring_mem_info *rmem2 = rmem; + + for (j = 0; j < rmem2->nr_pages; j++) { + if (!rmem2->pg_arr[j].idi_vaddr) + continue; + ctx_page_count++; + } + } + } + segment_len += 64; + driver_segment_record_len += record_len; + } + + buf_size = driver_segment_record_len + segment_len + + (ctx_page_count * 4096); + + return (buf_size); +} + +inline void +bnxt_bs_trace_check_wrapping(struct bnxt_bs_trace_info *bs_trace, + u32 offset) +{ + if (!bs_trace->wrapped && + *bs_trace->magic_byte != BNXT_TRACE_BUF_MAGIC_BYTE) + bs_trace->wrapped = 1; + bs_trace->last_offset = offset; +} + + + +static int +bnxt_hwrm_dbg_log_buffer_flush(struct bnxt_softc *bp, u16 type, u32 flags, + u32 *offset) +{ + int status = 0; + + hwrm_dbg_log_buffer_flush_input_t buff_flush_req; + hwrm_dbg_log_buffer_flush_output_t *buff_flush_resp = + (hwrm_dbg_log_buffer_flush_output_t *)(void *) + bp->hwrm_cmd_resp.idi_vaddr; + bnxt_hwrm_cmd_hdr_init(bp, &buff_flush_req, HWRM_DBG_LOG_BUFFER_FLUSH); + buff_flush_req.type = type; + buff_flush_req.flags = flags; + + status = hwrm_send_message(bp, &buff_flush_req, sizeof(buff_flush_req)); + if (!status) + *offset = buff_flush_resp->current_buffer_offset; + return (status); +} + +static void +bnxt_fill_driver_segment_record(struct bnxt_softc *bp, + struct bnxt_driver_segment_record *drv_seg_rec, + struct bnxt_ctx_mem_type *ctxm, uint16_t type) +{ + struct bnxt_bs_trace_info *bs_trace = &bp->bs_trace[type]; + uint32_t offset; + + if (bnxt_hwrm_dbg_log_buffer_flush(bp, type, 0, &offset) == 0) { + bnxt_bs_trace_check_wrapping(bs_trace, offset); + } + drv_seg_rec->max_entries = ctxm->max_entries; + drv_seg_rec->entry_size = ctxm->entry_size; + drv_seg_rec->offset = bs_trace->last_offset; + drv_seg_rec->wrapped = bs_trace->wrapped; +} + +static void +bnxt_retrieve_driver_coredump(struct bnxt_softc *softc, void *buf, + uint16_t type, uint32_t *seg_len) +{ + struct bnxt_driver_segment_record drv_seg_rec = {0}; + struct bnxt_ctx_mem_info *ctx = softc->ctx_mem; + struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type]; + struct bnxt_ctx_pg_info *ctx_pg = ctxm->pg_info; + uint32_t dump_len, data_offset, record_len, seg_hdr_len; + uint32_t i, j, k, n = 1, nr_tbls; + + dump_len = 0; + + record_len = sizeof(struct bnxt_driver_segment_record); + seg_hdr_len = sizeof(struct bnxt_coredump_segment_hdr); + data_offset = seg_hdr_len + record_len; + + bnxt_fill_driver_segment_record(softc, &drv_seg_rec, ctxm, + (type - BNXT_CTX_SRT_TRACE)); + + for (i = 0; i < n; i++) { + struct bnxt_ring_mem_info *rmem = &ctx_pg->ring_mem; + + if (ctx_pg->nr_pages > MAX_CTX_PAGES || ctx_pg->ctx_pg_tbl) { + nr_tbls = rmem->nr_pages; + for (j = 0; j < nr_tbls; j++) { + struct bnxt_ctx_pg_info *pg_tbl; + struct bnxt_ring_mem_info *rmem2; + + pg_tbl = ctx_pg->ctx_pg_tbl[j]; + if (!pg_tbl) + continue; + rmem2 = &pg_tbl->ring_mem; + for (k = 0; k < rmem2->nr_pages; k++) { + if (!rmem2->pg_arr[k].idi_vaddr) + continue; + memcpy((uint8_t *)buf + data_offset, + rmem2->pg_arr[k].idi_vaddr, + rmem2->page_size); + data_offset += rmem2->page_size; + dump_len += rmem2->page_size; + } + } + } else { + for (k = 0; k < rmem->nr_pages; k++) { + if (!rmem->pg_arr[k].idi_vaddr) + continue; + memcpy((uint8_t *)buf + data_offset, + rmem->pg_arr[k].idi_vaddr, + rmem->page_size); + data_offset += rmem->page_size; + dump_len += rmem->page_size; + } + } + } + memcpy((uint8_t *)buf + seg_hdr_len, &drv_seg_rec, record_len); + *seg_len = dump_len + record_len; +} + +void +bnxt_get_ctx_coredump(struct bnxt_softc *softc, void *buf) +{ + struct bnxt_ctx_mem_info *ctx = softc->ctx_mem; + struct bnxt_coredump_segment_hdr seg_hdr; + uint32_t type = 0, i = 0; + uint32_t seg_hdr_len = 0; + + seg_hdr_len = sizeof(seg_hdr); + for (type = BNXT_CTX_SRT_TRACE, i = DRV_SRT_TRACE_SEG_ID; + type <= BNXT_CTX_ROCE_HWRM_TRACE; type++, i++) { + struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type]; + uint16_t comp_id = DRV_COREDUMP_COMP_ID; + uint16_t seg_id = i; + uint32_t seg_len = 0; + + ctxm = &ctx->ctx_arr[type]; + + if (!(ctxm->flags & BNXT_CTX_MEM_TYPE_VALID) || + !ctxm->mem_valid) + continue; + + bnxt_retrieve_driver_coredump(softc, buf, type, &seg_len); + + bnxt_fill_coredump_seg_hdr(softc, &seg_hdr, NULL, seg_len, + 0, 0, 0, comp_id, seg_id); + + memcpy((uint8_t *)buf, &seg_hdr, seg_hdr_len); + buf = (uint8_t *)buf + seg_hdr_len + seg_len; + } +} + /* * This function is called by the kld[un]load(2) system calls to * determine what actions to take when a module is loaded or unloaded. @@ -76,7 +288,7 @@ bnxt_mgmt_loader(struct module *m, int what, void *arg) if (error != 0) { printf("%s: %s:%s:%d Failed to create the" "bnxt_mgmt device node\n", DRIVER_NAME, - __FILE__, __FUNCTION__, __LINE__); + __FILE__, __func__, __LINE__); return (error); } @@ -107,14 +319,14 @@ bnxt_mgmt_process_dcb(struct cdev *dev, u_long cmd, caddr_t data, memcpy(&user_ptr, data, sizeof(user_ptr)); if (copyin(user_ptr, &mgmt_dcb, sizeof(mgmt_dcb))) { printf("%s: %s:%d Failed to copy data from user\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -EFAULT; } softc = bnxt_find_dev(mgmt_dcb.hdr.domain, mgmt_dcb.hdr.bus, mgmt_dcb.hdr.devfn, NULL); if (!softc) { printf("%s: %s:%d unable to find softc reference\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -ENODEV; } @@ -144,14 +356,14 @@ bnxt_mgmt_process_dcb(struct cdev *dev, u_long cmd, caddr_t data, break; default: device_printf(softc->dev, "%s:%d Invalid op 0x%x\n", - __FUNCTION__, __LINE__, mgmt_dcb.op); + __func__, __LINE__, mgmt_dcb.op); ret = -EFAULT; goto end; } if (copyout(&mgmt_dcb, user_ptr, sizeof(mgmt_dcb))) { device_printf(softc->dev, "%s:%d Failed to copy response to user\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); ret = -EFAULT; goto end; } @@ -173,35 +385,35 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, uint16_t num_ind = 0; memcpy(&user_ptr, data, sizeof(user_ptr)); - if (copyin(user_ptr, &mgmt_req, sizeof(struct bnxt_mgmt_req))) { + if (copyin(user_ptr, &mgmt_req, sizeof(struct bnxt_mgmt_req))) { printf("%s: %s:%d Failed to copy data from user\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -EFAULT; } softc = bnxt_find_dev(mgmt_req.hdr.domain, mgmt_req.hdr.bus, mgmt_req.hdr.devfn, NULL); if (!softc) { printf("%s: %s:%d unable to find softc reference\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -ENODEV; } if (copyin((void*)mgmt_req.req.hreq, &msg_temp, sizeof(msg_temp))) { device_printf(softc->dev, "%s:%d Failed to copy data from user\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); return -EFAULT; } if (msg_temp.len_req > BNXT_MGMT_MAX_HWRM_REQ_LENGTH || msg_temp.len_resp > BNXT_MGMT_MAX_HWRM_RESP_LENGTH) { - device_printf(softc->dev, "%s:%d Invalid length\n", - __FUNCTION__, __LINE__); + device_printf(softc->dev, "%s:%d Invalid length\n", + __func__, __LINE__); return -EINVAL; } if (msg_temp.num_dma_indications > 1) { device_printf(softc->dev, "%s:%d Max num_dma_indications " - "supported is 1 \n", __FUNCTION__, __LINE__); + "supported is 1\n", __func__, __LINE__); return -EINVAL; } @@ -210,7 +422,7 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, if (copyin((void *)msg_temp.usr_req, req, msg_temp.len_req)) { device_printf(softc->dev, "%s:%d Failed to copy data from user\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); ret = -EFAULT; goto end; } @@ -222,35 +434,35 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, void *dma_ptr; uint64_t *dmap; - size = sizeof(struct bnxt_mgmt_fw_msg) + + size = sizeof(struct bnxt_mgmt_fw_msg) + (num_ind * sizeof(struct dma_info)); msg2 = malloc(size, M_BNXT, M_WAITOK | M_ZERO); - if (copyin((void *)mgmt_req.req.hreq, msg2, size)) { + if (copyin((void *)mgmt_req.req.hreq, msg2, size)) { device_printf(softc->dev, "%s:%d Failed to copy" - "data from user\n", __FUNCTION__, __LINE__); + "data from user\n", __func__, __LINE__); ret = -EFAULT; goto end; } msg = msg2; - + ret = iflib_dma_alloc(softc->ctx, msg->dma[0].length, &dma_data, BUS_DMA_NOWAIT); if (ret) { device_printf(softc->dev, "%s:%d iflib_dma_alloc" - "failed with ret = 0x%x\n", __FUNCTION__, + "failed with ret = 0x%x\n", __func__, __LINE__, ret); ret = -ENOMEM; goto end; } if (!(msg->dma[0].read_or_write)) { - if (copyin((void *)msg->dma[0].data, - dma_data.idi_vaddr, + if (copyin((void *)msg->dma[0].data, + dma_data.idi_vaddr, msg->dma[0].length)) { device_printf(softc->dev, "%s:%d Failed to copy" - "data from user\n", __FUNCTION__, + "data from user\n", __func__, __LINE__); ret = -EFAULT; goto end; @@ -260,27 +472,27 @@ bnxt_mgmt_process_hwrm(struct cdev *dev, u_long cmd, caddr_t data, dmap = dma_ptr; *dmap = htole64(dma_data.idi_paddr); } - + ret = bnxt_hwrm_passthrough(softc, req, msg->len_req, resp, msg->len_resp, msg->timeout); if(ret) goto end; - + if (num_ind) { if ((msg->dma[0].read_or_write)) { - if (copyout(dma_data.idi_vaddr, - (void *)msg->dma[0].data, + if (copyout(dma_data.idi_vaddr, + (void *)msg->dma[0].data, msg->dma[0].length)) { device_printf(softc->dev, "%s:%d Failed to copy data" - "to user\n", __FUNCTION__, __LINE__); + "to user\n", __func__, __LINE__); ret = -EFAULT; goto end; } } } - + if (copyout(resp, (void *) msg->usr_resp, msg->len_resp)) { device_printf(softc->dev, "%s:%d Failed to copy response to user\n", - __FUNCTION__, __LINE__); + __func__, __LINE__); ret = -EFAULT; goto end; } @@ -313,14 +525,14 @@ bnxt_mgmt_get_dev_info(struct cdev *dev, u_long cmd, caddr_t data, memcpy(&user_ptr, data, sizeof(user_ptr)); if (copyin(user_ptr, &dev_info, sizeof(dev_info))) { printf("%s: %s:%d Failed to copy data from user\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -EFAULT; } - + softc = bnxt_find_dev(0, 0, 0, dev_info.nic_info.dev_name); if (!softc) { printf("%s: %s:%d unable to find softc reference\n", - DRIVER_NAME, __FUNCTION__, __LINE__); + DRIVER_NAME, __func__, __LINE__); return -ENODEV; } @@ -339,7 +551,7 @@ bnxt_mgmt_get_dev_info(struct cdev *dev, u_long cmd, caddr_t data, dev_info.pci_info.chip_rev_id |= dev_info.pci_info.revision; if (pci_find_extcap(softc->dev, PCIZ_SERNUM, &dev_sn_offset)) { device_printf(softc->dev, "%s:%d device serial number is not found" - "or not supported\n", __FUNCTION__, __LINE__); + "or not supported\n", __func__, __LINE__); } else { dev_sn_lo = pci_read_config(softc->dev, dev_sn_offset + 4, 4); dev_sn_hi = pci_read_config(softc->dev, dev_sn_offset + 8, 4); @@ -354,27 +566,103 @@ bnxt_mgmt_get_dev_info(struct cdev *dev, u_long cmd, caddr_t data, (dev_sn_hi >> 24 ) & 0xFF); strncpy(dev_info.nic_info.device_serial_number, dsn, sizeof(dsn)); } - + if_t ifp = iflib_get_ifp(softc->ctx); dev_info.nic_info.mtu = if_getmtu(ifp); memcpy(dev_info.nic_info.mac, softc->func.mac_addr, ETHER_ADDR_LEN); - + if (pci_find_cap(softc->dev, PCIY_EXPRESS, &capreg)) { device_printf(softc->dev, "%s:%d pci link capability is not found" - "or not supported\n", __FUNCTION__, __LINE__); + "or not supported\n", __func__, __LINE__); } else { lnk = pci_read_config(softc->dev, capreg + PCIER_LINK_STA, 2); dev_info.nic_info.pci_link_speed = (lnk & PCIEM_LINK_STA_SPEED); dev_info.nic_info.pci_link_width = (lnk & PCIEM_LINK_STA_WIDTH) >> 4; } - + if (copyout(&dev_info, user_ptr, sizeof(dev_info))) { device_printf(softc->dev, "%s:%d Failed to copy data to user\n", - __FUNCTION__, __LINE__); - return -EFAULT; + __func__, __LINE__); + return (-EFAULT); + } + + return (0); +} + +static int +bnxt_mgmt_drv_dump(struct cdev *dev, u_long cmd, caddr_t data, + int flag, struct thread *td) +{ + struct bnxt_softc *softc = NULL; + void *buf = NULL; + struct bnxt_logger *logger = NULL, *lg_tmp; + int buf_sz = 0; + struct bnxt_mgmt_drv_dump mgmt_drv_dump = {}; + void *user_ptr; + int ret = 0, offset = 0; + + memcpy(&user_ptr, data, sizeof(user_ptr)); + if (copyin(user_ptr, &mgmt_drv_dump, sizeof(mgmt_drv_dump))) { + printf("%s: %s:%d Failed to copy data from user\n", + DRIVER_NAME, __func__, __LINE__); + return (-EFAULT); + } + softc = bnxt_find_dev(mgmt_drv_dump.hdr.domain, mgmt_drv_dump.hdr.bus, + mgmt_drv_dump.hdr.devfn, NULL); + if (!softc) { + printf("%s: %s:%d unable to find softc reference\n", + DRIVER_NAME, __func__, __LINE__); + return (-ENODEV); + } + + switch (mgmt_drv_dump.op) { + case BNXT_MGMT_GET_DRV_DUMP_SIZE: + mtx_lock(&softc->log_lock); + TAILQ_FOREACH_SAFE(logger, &softc->loggers_list, list, lg_tmp) + buf_sz += logger->buffer_size; + mtx_unlock(&softc->log_lock); + + mgmt_drv_dump.buf_size = buf_sz + + bnxt_get_driver_coredump_len(softc); + if (copyout(&mgmt_drv_dump, user_ptr, sizeof(mgmt_drv_dump))) { + device_printf(softc->dev, + "%s:%d Failed to copy response to user\n", + __func__, __LINE__); + ret = -EFAULT; + } + break; + case BNXT_MGMT_GET_DRV_DUMP: + buf = malloc(mgmt_drv_dump.buf_size, M_BNXT, M_WAITOK); + /*Dump the driver logs */ + memset(buf, 0, mgmt_drv_dump.buf_size); + offset = bnxt_start_logging_driver_coredump(softc, buf); + + if (!offset) { + device_printf(softc->dev, + "%s:%d Drivers logs are empty\n", + __func__, __LINE__); + } + + /* Dump the ctx logs*/ + if (softc->ctx_mem) + bnxt_get_ctx_coredump(softc, (uint8_t *)buf + offset); + + if (copyout(buf, mgmt_drv_dump.buf, mgmt_drv_dump.buf_size)) { + device_printf(softc->dev, + "%s:%d Failed to copy response to user\n", + __func__, __LINE__); + ret = -EFAULT; + } + + free(buf, M_BNXT); + break; + default: + device_printf(softc->dev, "%s:%d Invalid op 0x%x\n", + __func__, __LINE__, mgmt_drv_dump.op); + ret = -EFAULT; } - return 0; + return (ret); } /* @@ -385,7 +673,7 @@ bnxt_mgmt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { int ret = 0; - + switch(cmd) { case IO_BNXT_MGMT_OPCODE_GET_DEV_INFO: case IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO: @@ -401,13 +689,17 @@ bnxt_mgmt_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, case IOW_BNXT_MGMT_OPCODE_DCB_OPS: ret = bnxt_mgmt_process_dcb(dev, cmd, data, flag, td); break; + case IO_BNXT_MGMT_OPCODE_DRV_DUMP: + case IOW_BNXT_MGMT_OPCODE_DRV_DUMP: + ret = bnxt_mgmt_drv_dump(dev, cmd, data, flag, td); + break; default: printf("%s: Unknown command 0x%lx\n", DRIVER_NAME, cmd); ret = -EINVAL; break; } - return ret; + return (ret); } static int diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h index 5b94184b1646..cdd6964158ee 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h @@ -43,10 +43,12 @@ #define IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO _IOW(0, 0, 0) #define IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IOW(0, 1, 0) #define IOW_BNXT_MGMT_OPCODE_DCB_OPS _IOW(0, 2, 0) +#define IOW_BNXT_MGMT_OPCODE_DRV_DUMP _IOW(0, 3, 0) #define IO_BNXT_MGMT_OPCODE_GET_DEV_INFO _IO(0, 0) #define IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IO(0, 1) #define IO_BNXT_MGMT_OPCODE_DCB_OPS _IO(0, 2) +#define IO_BNXT_MGMT_OPCODE_DRV_DUMP _IO(0, 3) #define BNXT_MGMT_MAX_HWRM_REQ_LENGTH HWRM_MAX_REQ_LEN #define BNXT_MGMT_MAX_HWRM_RESP_LENGTH (512) @@ -152,3 +154,32 @@ struct bnxt_mgmt_dcb { struct bnxt_mgmt_app_tlv app_tlv; } req; } __attribute__ ((__packed__)); + +struct bnxt_mgmt_drv_dump { + struct bnxt_mgmt_req_hdr hdr; +#define BNXT_MGMT_GET_DRV_DUMP_SIZE 0x1 +#define BNXT_MGMT_GET_DRV_DUMP 0x2 +#define BNXT_MGMT_DRV_DUMP_MAX BNXT_MGMT_GET_DRV_DUMP + uint32_t op; + void *buf; + uint32_t buf_size; +} __attribute__ ((__packed__)); + +struct bnxt_driver_segment_record { + uint32_t max_entries; + uint32_t entry_size; + uint32_t offset; + uint8_t wrapped:1; + uint8_t reserved[3]; +}; + +#define DRV_COREDUMP_COMP_ID 0xD +#define DRV_SRT_TRACE_SEG_ID 1 +#define DRV_SRT2_TRACE_SEG_ID 2 +#define DRV_CRT_TRACE_SEG_ID 3 +#define DRV_CRT2_TRACE_SEG_ID 4 +#define DRV_RIGP0_TRACE_SEG_ID 5 +#define DRV_LOG_HWRM_L2_TRACE_SEG_ID 6 +#define DRV_LOG_HWRM_ROCE_TRACE_SEG_ID 7 + +void bnxt_get_ctx_coredump(struct bnxt_softc *, void *); diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c index c6d862a36a9a..c38521abd17f 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c @@ -48,6 +48,7 @@ #include "bnxt.h" #include "bnxt_hwrm.h" #include "bnxt_ulp.h" +#include "bnxt_log.h" void bnxt_destroy_irq(struct bnxt_softc *softc); @@ -335,6 +336,40 @@ void bnxt_ulp_irq_stop(struct bnxt_softc *bp) } } +void +bnxt_logger_ulp_live_data(void *d) +{ + struct bnxt_en_dev *edev; + struct bnxt_softc *bp; + + bp = d; + edev = bp->edev; + + if (!edev) + return; + + if (bnxt_ulp_registered(edev, BNXT_ROCE_ULP)) { + struct bnxt_ulp_ops *ops; + struct bnxt_ulp *ulp; + + ulp = edev->ulp_tbl; + //ops = rtnl_dereference(ulp->ulp_ops); + ops = ulp->ulp_ops; + if (!ops || !ops->ulp_log_live) + return; + + ops->ulp_log_live(ulp->handle); + } +} + +void +bnxt_ulp_log_live(struct bnxt_en_dev *edev, u16 logger_id, + const char *format, ...) +{ + bnxt_log_live(if_getsoftc(edev->net), logger_id, format); +} +EXPORT_SYMBOL(bnxt_ulp_log_live); + void bnxt_ulp_async_events(struct bnxt_softc *bp, struct hwrm_async_event_cmpl *cmpl) { u16 event_id = le16_to_cpu(cmpl->event_id); diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h index 53bb51b07135..057e193aa00b 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h @@ -57,6 +57,7 @@ struct bnxt_ulp_ops { void (*ulp_shutdown)(void *); void (*ulp_irq_stop)(void *); void (*ulp_irq_restart)(void *, struct bnxt_msix_entry *); + void (*ulp_log_live)(void *handle); }; struct bnxt_fw_msg { @@ -162,8 +163,11 @@ void bnxt_ulp_shutdown(struct bnxt_softc *bp); void bnxt_ulp_irq_stop(struct bnxt_softc *bp); void bnxt_ulp_irq_restart(struct bnxt_softc *bp, int err); void bnxt_ulp_async_events(struct bnxt_softc *bp, struct hwrm_async_event_cmpl *cmpl); +void bnxt_ulp_log_live(struct bnxt_en_dev *edev, u16 logger_id, + const char *format, ...); struct bnxt_en_dev *bnxt_ulp_probe(struct net_device *dev); void bnxt_aux_dev_release(struct device *dev); int bnxt_rdma_aux_device_add(struct bnxt_softc *bp); int bnxt_rdma_aux_device_del(struct bnxt_softc *bp); +void bnxt_logger_ulp_live_data(void *d); #endif diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 6d82302615e1..83f339bb045f 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -71,6 +71,8 @@ #include "bnxt_mgmt.h" #include "bnxt_ulp.h" #include "bnxt_auxbus_compat.h" +#include "bnxt_log.h" +#include "bnxt_log_data.h" /* * PCI Device ID Table @@ -1243,6 +1245,64 @@ static void bnxt_free_ctx_mem(struct bnxt_softc *softc) softc->ctx_mem = NULL; } +const u16 bnxt_bstore_to_trace[] = { + [BNXT_CTX_SRT_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT_TRACE, + [BNXT_CTX_SRT2_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT2_TRACE, + [BNXT_CTX_CRT_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT_TRACE, + [BNXT_CTX_CRT2_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT2_TRACE, + [BNXT_CTX_RIGP0_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_RIGP0_TRACE, + [BNXT_CTX_L2_HWRM_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_L2_HWRM_TRACE, + [BNXT_CTX_ROCE_HWRM_TRACE] = + HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_ROCE_HWRM_TRACE, +}; + +static void +bnxt_bs_trace_init(struct bnxt_softc *bp, struct bnxt_ctx_mem_type *ctxm) +{ + uint32_t mem_size, pages, rem_bytes, magic_byte_offset; + struct bnxt_ctx_pg_info *ctx_pg = ctxm->pg_info; + struct bnxt_ring_mem_info *rmem, *rmem_pg_tbl; + uint32_t last_pg, n = 1, size = sizeof(uint8_t); + struct bnxt_bs_trace_info *bs_trace; + uint16_t trace_type; + + mem_size = ctxm->max_entries * ctxm->entry_size; + rem_bytes = mem_size % BNXT_PAGE_SIZE; + pages = DIV_ROUND_UP(mem_size, BNXT_PAGE_SIZE); + + last_pg = (pages - 1) & (MAX_CTX_PAGES - 1); + magic_byte_offset = ((rem_bytes ? rem_bytes : BNXT_PAGE_SIZE) - size); + + if (ctxm->instance_bmap) { + if (ctxm->instance_bmap > 1) + return; + n = bitcount32(ctxm->instance_bmap); + } + + rmem = &ctx_pg[n - 1].ring_mem; + trace_type = bnxt_bstore_to_trace[ctxm->type]; + bs_trace = &bp->bs_trace[trace_type]; + bs_trace->ctx_type = ctxm->type; + bs_trace->trace_type = trace_type; + if (pages > MAX_CTX_PAGES) { + int last_pg_directory = rmem->nr_pages - 1; + + rmem_pg_tbl = + &ctx_pg[n - 1].ctx_pg_tbl[last_pg_directory]->ring_mem; + bs_trace->magic_byte = rmem_pg_tbl->pg_arr[last_pg].idi_vaddr; + } else { + bs_trace->magic_byte = rmem->pg_arr[last_pg].idi_vaddr; + } + bs_trace->magic_byte += magic_byte_offset; + *bs_trace->magic_byte = BNXT_TRACE_BUF_MAGIC_BYTE; +} + static int bnxt_backing_store_cfg_v2(struct bnxt_softc *softc, u32 ena) { @@ -1264,7 +1324,7 @@ bnxt_backing_store_cfg_v2(struct bnxt_softc *softc, u32 ena) continue; } /* ckp TODO: this is trace buffer related stuff, so keeping it diabled now. needs revisit */ - //bnxt_bs_trace_init(bp, ctxm, type - BNXT_CTX_SRT_TRACE); + bnxt_bs_trace_init(softc, ctxm); last_type = type; } } @@ -2198,7 +2258,7 @@ static int bnxt_open(struct bnxt_softc *bp) if (BNXT_CHIP_P5_PLUS(bp)) bnxt_hwrm_reserve_rings(bp); - + /* Get the current configuration of this function */ rc = bnxt_hwrm_func_qcfg(bp); if (rc) { @@ -2446,6 +2506,14 @@ bnxt_hwrm_reserve_rings(struct bnxt_softc *softc) return bnxt_hwrm_reserve_vf_rings(softc); } +static void +bnxt_log_live_data(void *d) +{ + struct bnxt_softc *bp = d; + + bnxt_log_ring_states(bp); +} + /* Device setup and teardown */ static int bnxt_attach_pre(if_ctx_t ctx) @@ -2495,6 +2563,11 @@ bnxt_attach_pre(if_ctx_t ctx) goto pci_attach_fail; } + mtx_init(&softc->log_lock, "BNXT LOG Lock", NULL, MTX_DEF); + TAILQ_INIT(&softc->loggers_list); + bnxt_register_logger(softc, BNXT_LOGGER_L2, BNXT_L2_MAX_LOG_BUFFERS, + bnxt_log_live_data, BNXT_L2_MAX_LIVE_LOG_SIZE); + /* HWRM setup/init */ BNXT_HWRM_LOCK_INIT(softc, device_get_nameunit(softc->dev)); rc = bnxt_alloc_hwrm_dma_mem(softc); @@ -2527,7 +2600,7 @@ bnxt_attach_pre(if_ctx_t ctx) if (rc) goto hwrm_short_cmd_alloc_fail; } - + /* Now perform a function reset */ rc = bnxt_hwrm_func_reset(softc); @@ -2931,6 +3004,9 @@ bnxt_detach(if_ctx_t ctx) bnxt_free_hwrm_short_cmd_req(softc); BNXT_HWRM_LOCK_DESTROY(softc); + bnxt_unregister_logger(softc, BNXT_LOGGER_L2); + mtx_destroy(&softc->log_lock); + if (!bnxt_num_pfs && bnxt_pf_wq) destroy_workqueue(bnxt_pf_wq); diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index 01c2710bc3ea..5b1fe2ae0faa 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -52,6 +52,7 @@ #include "ib_verbs.h" #include "bnxt_re-abi.h" #include "bnxt.h" +#include "bnxt_log.h" *** 100 LINES SKIPPED *** From nobody Mon Jun 15 11:35:37 2026 X-Original-To: dev-commits-src-all@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 4gf7NM6lPzz6hBvS for ; Mon, 15 Jun 2026 11:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf7NM4NbDz3Jsg for ; Mon, 15 Jun 2026 11:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0804m+NXnKbh8g3VxCPv3vTXRUzShV4ePT6ldPRIBs=; b=Yq5kzgxxTmvd6e106PshCN7cTg/JtA0OyvfwOp/Ng+DfgaCbAVEuDxnGazyFDxdRNtf9GQ op7lnZISkQHCOypSXgEuMHLIIxnOBE/TtY+zBreihg6ItpBuSbJ0dyQ7xqkiqZ7Xk/EjeM rLPwVoKlhlIhvesB3P8e84ANv7PGWCzl8JfaRjpEmmo8mvD0pQteYu/Vp29ulTb3fHc/sW HFU1mgcc8+iSZkEqE1Zuu9lzRskyfMrSqkzkOozZ32M6FFFjCoxqsnt88Jwzmc+nqEr7VX JgoXQvSX/hJ2EEkTyues7bLBmZrnNhbvfE/ng1Pg8C7CnqzAVkN4vE+uMUYWvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781523347; a=rsa-sha256; cv=none; b=BYkpgr476na0f2HhDBJ/tQHAH3GBZcmK3TAAKtqK86aCUSPm/MgUetFfw9SezSg1rpA+As E3H+lHwz2r+sqd8lQrBilHSlJvmT1rTicMw3jBMZV4OtnJxW1DPPPxNy4YDgdhIqy2xtXq 7VBSinAkTFmfTJBcrS37RBiM6P0O4rcbDqV98GHNeaEwYOi2qmIPTBlXdmXQwMArn4maB5 xGx7VxA32icf1TrmXtV85PwzAQMX844uEorXC9fFtaWNuB8wKeWKoYnEgpVswgOHWdYpE3 ugdKlK8zjBKRJAOZrsW21PiiNW4A/NKKP7us5RLHEG7EbJkant42HA3jZB20AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781523347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u0804m+NXnKbh8g3VxCPv3vTXRUzShV4ePT6ldPRIBs=; b=azf1upeiMa7k43YXKwVqH9+W9O88fkMVirLuy+fc8JHLS08JxADDOVk1B6tUkn+dsy0a7S o6cM2ti72dpBTU1md4SUai/Yg0g4ahKk66QiXzCtAL96vEmACBk3JxsF2LmxSJyf+CmqtE vDP35iNgAW5yIIlH31u8woFDDL4fb3bXTAR/x7FvLAnanWP2XSjeU/o/JfuwemuPq+Drc4 7xXBj/pj1dSleM3obTgZvHh4ZbLDJJtgj902fg+3D/avYiwAgdYWTxK5WpdBSBcUZlJExT Ll6PsXA8zN7Y4neWdmLD4ZneueCPfIPRNTmenuetsNPbXnNPOwpJPg3ui5WfSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf7NM3w8NztdT for ; Mon, 15 Jun 2026 11:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d4b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 11:35:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 3987058a3a94 - main - if_bnxt: Fix the Unknown command 0x80000000 ioctl command error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3987058a3a943c461c27dbebf10dad555b1bb2fa Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 11:35:37 +0000 Message-Id: <6a2fe389.1d4b6.646e7e2f@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=3987058a3a943c461c27dbebf10dad555b1bb2fa commit 3987058a3a943c461c27dbebf10dad555b1bb2fa Author: Sreekanth Reddy AuthorDate: 2026-06-15 09:48:34 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 11:34:12 +0000 if_bnxt: Fix the Unknown command 0x80000000 ioctl command error With the latest niccli version, user will observe below Unknown command command error when try to list the devices. if_bnxt: Unknown command 0x80000000 Here, niccli is issuing command opcode as 0x80000000 but driver is expecting 0x20000000 command opcode. So, replaced _IOW(0,0,0) with the _IOC(IOC_IN,0,0,0). Fixes: d53d7b4 ("bnxt: Fix up ioctl opcodes to support IOC_VOID along with IOC_IN") MFC after: 2 weeks Reviewed by: gallatin, ssaxena Differential Revision: https://reviews.freebsd.org/D56685 --- sys/dev/bnxt/bnxt_en/bnxt_mgmt.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h index 272fb0e298cb..169434633b9a 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_mgmt.h @@ -40,11 +40,11 @@ #define DRIVER_NAME "if_bnxt" -#define IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO _IOW(0, 0, 0) -#define IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IOW(0, 1, 0) -#define IOW_BNXT_MGMT_OPCODE_DCB_OPS _IOW(0, 2, 0) -#define IOW_BNXT_MGMT_OPCODE_DRV_DUMP _IOW(0, 3, 0) -#define IOW_BNXT_MGMT_OPCODE_CRASH_DUMP _IOW(0, 4, 0) +#define IOW_BNXT_MGMT_OPCODE_GET_DEV_INFO _IOC(IOC_IN, 0, 0, 0) +#define IOW_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IOC(IOC_IN, 0, 1, 0) +#define IOW_BNXT_MGMT_OPCODE_DCB_OPS _IOC(IOC_IN, 0, 2, 0) +#define IOW_BNXT_MGMT_OPCODE_DRV_DUMP _IOC(IOC_IN, 0, 3, 0) +#define IOW_BNXT_MGMT_OPCODE_CRASH_DUMP _IOC(IOC_IN, 0, 4, 0) #define IO_BNXT_MGMT_OPCODE_GET_DEV_INFO _IO(0, 0) #define IO_BNXT_MGMT_OPCODE_PASSTHROUGH_HWRM _IO(0, 1) From nobody Mon Jun 15 12:28:49 2026 X-Original-To: dev-commits-src-all@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 4gf8Yg1FKsz6hGHn for ; Mon, 15 Jun 2026 12:28: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf8Yg0NFyz3RC6 for ; Mon, 15 Jun 2026 12:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781526535; 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=viCC8pKQnwr4fVlQnoPdmeisD1TsCM3167l5NrG3gkU=; b=Q+8H2+o5OLz4nr/UKn38UW8JpP7OUdg9hupLtNXLNAOpMiBTW6Hdlt55wchkvkX2KkzqOL +GYytjV4rUlrgJkz9Z7BhX0OaGopzgz6VKEofKHj/7DM34ez7Ehp0GV/55UEgbQGSSNPKE Bp2d4C2aI9+YuYzwuH3rXzyQuR0CtCQ+wXwa1uTpK5JBB8ako3BsQ3sKKcYXPzRsdtSw2x M3LQFv9vYo9tEy6eD+o45WchYsN40SO5n837a3nfCgYTTqwz6vWhx+VRqqA8GqvXS5PV1b gYTUTYrg/FUmdhsKZ3tDg/XKr7ebzUt4JbeZVXcY8V/k6EvlH4Y0vckeh1MxbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781526535; a=rsa-sha256; cv=none; b=j3bgoVmcWA1/l13LZ768d3AYHDU1oUqkRhPSY70s35GQFW+eJq9VLRNS6ofcfQrdCcpPIS 3rh3IJHF0GQDqdCsqJucBW4GzDrsP2QKWixkA1OKe4iBrNtsTl4Zi05tnC4ibhDfnmEupW cN/nnz2t5SlIGM+3e+aXGKUJA4Cvnym+AcqhbVF4MNPbOcCsBIabIPzR/bi9XEVDZwOhfB hhVqFnsU61D7y9c9VgM4TQbhLsgAdxA1/SlmMIHsjemsVjyWsDtWVmEbFis78hOLVUpc6c eg2ZbXRuYqc4/yDsjZ2mYPskPaKBk+L/74gdkvdp4KhxstuFwfQRNCMUo+qySg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781526535; 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=viCC8pKQnwr4fVlQnoPdmeisD1TsCM3167l5NrG3gkU=; b=Fwme6MuqZqfNgwg0HWEj5mg9cwdul+WEgv30kmElkrx/pVs4YQ79oCPH7jChgW2LI31k7F F18xAdXMJHhztTFBskm2vUW5O75m/7zHCjdno5CCLNxMT9gx6FLL22+lwhuwK3cQeobxXD STDc6UrNtI6CMR2IZi8u7VdT9pDtWrWyf9/t3IECgCO4TF/ZsOT7uGuaZwGjjju1/ja10I SlPxkKy8GqdhwHfg1a1h2Pjh6v/KvLWn/RCyiecUhKOsO2+adE4AK/rjLjrunuH4SkXWxQ 6vBQ8RYQ+57qsGu4wAFuvBcwxAYOXFXZugDz9MVPD8fZiKDPjQfxMCU9QXCGOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf8Yf6ZHtzvV4 for ; Mon, 15 Jun 2026 12:28:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23d17 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 12:28:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: 03676cafa882 - main - if_bnxt: add bnxt logger module files to sys/conf/files for built-in kernel builds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03676cafa882c471a29436aae76c8751d451dd07 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 12:28:49 +0000 Message-Id: <6a2ff001.23d17.661deb7a@gitrepo.freebsd.org> The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=03676cafa882c471a29436aae76c8751d451dd07 commit 03676cafa882c471a29436aae76c8751d451dd07 Author: Sumit Saxena AuthorDate: 2026-06-15 12:22:25 +0000 Commit: Sumit Saxena CommitDate: 2026-06-15 12:25:05 +0000 if_bnxt: add bnxt logger module files to sys/conf/files for built-in kernel builds The bnxt snapdump and coredump support patches added bnxt_log/{_data}.c. and listed it in sys/modules/bnxt/bnxt_en/Makefile, but missed to add these files in sys/conf/files. Fix up the issue by adding bnxt_log/{_data}.c in sys/conf/files. Fixes: f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump") --- sys/conf/files | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 324ee35d490d..67f0dcedd346 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1326,6 +1326,8 @@ dev/bnxt/bnxt_en/bnxt_sriov.c optional bnxt iflib pci compile-with "${BNXT_C}" dev/bnxt/bnxt_en/bnxt_sysctl.c optional bnxt iflib pci compile-with "${BNXT_C}" dev/bnxt/bnxt_en/bnxt_txrx.c optional bnxt iflib pci compile-with "${BNXT_C}" dev/bnxt/bnxt_en/bnxt_ulp.c optional bnxt iflib pci compile-with "${BNXT_C}" +dev/bnxt/bnxt_en/bnxt_log.c optional bnxt iflib pci compile-with "${BNXT_C}" +dev/bnxt/bnxt_en/bnxt_log_data.c optional bnxt iflib pci compile-with "${BNXT_C}" dev/bnxt/bnxt_en/if_bnxt.c optional bnxt iflib pci compile-with "${BNXT_C}" dev/bwi/bwimac.c optional bwi dev/bwi/bwiphy.c optional bwi From nobody Mon Jun 15 12:36:32 2026 X-Original-To: dev-commits-src-all@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 4gf8kS64Ywz6hH7W for ; Mon, 15 Jun 2026 12:36:32 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf8kS5Psdz3Swp for ; Mon, 15 Jun 2026 12:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781526992; 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=N060wFbp0FROQ4M2NvcQLhD42mH9tFVlVSqaBtfeofE=; b=BJQ78IrK+WaUH+oSsxsAbDB0IYx2JixhIcomZ59g8u91D0+XbGTGFk09Ttf8clPxmnk2ez Ctq1T9mayNgLcVP4iJWFng8b/S/IcYJI4/YnEm8Bi62xJVOzxWIKa5l9v/2dUduYylZ54L 9KIgeDAVKeqR83VGPyZODNTdtH435Z7cq5ScJjdxwY/ZSd6FQdlGleFYgnudvYwL1J7JEm ghH6KOmtUmcSUo5D4XsrBF0f4xzhosHGSwJih2olMjGZwlyhZ7uW1HpCwEdoaxh03s4+nL PjJcgimSSpx2nUidQDC0I0b1XVvZTC4dv8FXqLNehyQCboHa7YcA5Sq80lq4Kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781526992; a=rsa-sha256; cv=none; b=P0Nl1BXIzfFXMZ++PSeR6JRlpShUQGYtpxr5ziAJdGC/aaIb2+TfcNBTeEzLJD5bNQuDtd nfYY0RVpQz289++Bks995ANOUWq8cdQLZtjWItAc/LcCSZ8QbPFHMdhIkync9Sw9MWShnP 80R8H0Cr4+Md8yxkJOEmC8K/FxNG02ri5QolprEJZgn6IYqcPmKJBvi500GcQRu1SXjrsN bsXgt1yWSlkaVq3Z0Auw5yVpcV5fqNXTSUCCKiRtWwpsWY7wp6PapEmejb2n5jlarKzWw5 QTuV1XUUBvCWidmzMjqD8m8HRrRvUYwW0FJy47cvD5uqVm6x1V8aCk4Z4aGwDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781526992; 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=N060wFbp0FROQ4M2NvcQLhD42mH9tFVlVSqaBtfeofE=; b=F8SkbmW4ScfqjbE8VTl+w3D7gnmcfoXP15jyIrTwI62BMCahPQB0axvSwvCOyyNvxr67oj kWeYj4/Rs8V6Cm5GRSBUwjvN2+Ako0Zy+xRYTveW3zVp/lH9KB/Av9DpM34pi73yrJPe7F t+lD/UOEh99Nbc6z+pSzJpERS1jM/4Is4ErQD4JVTdHM1RQN3eSCEeLYlgUviaDUvCpQs6 cke08xfx9hipjuu0SBBsFqmbkrv0xSnm8ZOjNdPAre5z/clvfjvfJS+4sCybhw5vc4dHxn WTxBgq8QWg6UHVXKG4IxNG1qbDRLrSnJPPaUyQLxd5k9sBnBufUeapQFv3zl7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf8kS4k7Lzw20 for ; Mon, 15 Jun 2026 12:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22ef1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 12:36:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 21a75a85f0e0 - main - netlink: Indicate that ifinfomsg uses IFT_* types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 12:36:32 +0000 Message-Id: <6a2ff1d0.22ef1.718b4901@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=21a75a85f0e0cc328b6e9b437d783ef0c25dc52e commit 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e Author: Ed Maste AuthorDate: 2026-05-29 16:23:17 +0000 Commit: Ed Maste CommitDate: 2026-06-15 12:36:16 +0000 netlink: Indicate that ifinfomsg uses IFT_* types On Linux struct ifinfomsg uses ARPHRD_* values, while we used IFT_* types (which derive from SNMP ifType definitions in RFC 1573). Update the header to reflect this. PR: 272144 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334 --- share/man/man4/rtnetlink.4 | 17 +++++++++++++++-- sys/netlink/route/interface.h | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 index 2161db157234..d756cd031145 100644 --- a/share/man/man4/rtnetlink.4 +++ b/share/man/man4/rtnetlink.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2026 +.Dd June 15, 2026 .Dt RTNETLINK 4 .Os .Sh NAME @@ -275,12 +275,25 @@ All interface configuration messages share the common header: struct ifinfomsg { unsigned char ifi_family; /* not used, set to 0 */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ + unsigned short ifi_type; /* IFT_* */ int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ }; .Ed +.Pp +.Sy Note : +On +.Fx +the +.Va ifi_type +field uses +.Dv IFT_* +constants from +.In net/if_types.h +rather than +.Dv ARPHRD_* +as on Linux. .Ss RTM_NEWLINK Creates a new interface. The only mandatory TLV is diff --git a/sys/netlink/route/interface.h b/sys/netlink/route/interface.h index 0bd06ff1f6d5..e6aef3d702d8 100644 --- a/sys/netlink/route/interface.h +++ b/sys/netlink/route/interface.h @@ -36,8 +36,8 @@ struct ifinfomsg { unsigned char ifi_family; /* not used */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ - int ifi_index; /* Inteface index */ + unsigned short ifi_type; /* IFT_* (net/if_types.h) */ + int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ }; From nobody Mon Jun 15 12:58:43 2026 X-Original-To: dev-commits-src-all@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 4gf9D40520z6hJXv for ; Mon, 15 Jun 2026 12:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9D356jKz3WH0 for ; Mon, 15 Jun 2026 12:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528323; 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=b3OrtNM+N8MX+qQtt9QVrhjvulT1tj5l+GA7hcRdwJU=; b=kWD+9F4aV3Fmn3rmZGv3jVFx/GW7N3gVi7JXVGt422H2x6vEBq6NDUxckAAPzK9jPaSDZD b6wm+JCuyUZPEqvG3QjhO8JlPddYXHrdCEGw8icx7/iIgRc+zqFD+lsYYT1kaSzqurhZZ9 KXlbdZIxBq0cNdCzoRn0DDCVp5mbKd/sRJna8NhF6XGiQWJLlpa+szl+eYA9PQoLhsZgaJ Euac0ZBxz14Td/P4F3C03nkk9qQdLFV0WVnwapVqumfo5RgFf3V2P+sa5HjJtzqy89zwOC AaWDfX8ydw6/TKDi28xklgAlrIaGWA3yCKW+eTFhumu/KIxr5349YpYCM3xNPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781528323; a=rsa-sha256; cv=none; b=yb7HdVsmPMl4vEbAJJ405vCx4FG1uRHjR5NxR31zqRk3oAQHvzuSUajAAkppAaqf3URba8 s8XaBPegAt+k95hdvVHJ8DYU4yZlgGsXEm+4DjkEC6lE8fMRyy1rCBLmh+MMADycn99fIc JyuNthL5wO9KDZXOYFi48micHjidwPJom2QHe9AqgOjBAczZmteK+T3Z2VHre+Wxqn+jao 2EHZQ8aJoEkWRFHv1ECPK3DYSmjErDJxFz1HJFtOrDBGc6MRvbS/tyyM0I5w0A67nubKpY wUzPk/5B4otI7XhNAUOtOGqHtltcDIjoqB1ZIaqDQa7/9pn8q5ds1dRBpZgRiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528323; 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=b3OrtNM+N8MX+qQtt9QVrhjvulT1tj5l+GA7hcRdwJU=; b=i4ev+Zm1ggkGerfc8er46ckom9SjrKDv1dYZWMKdGfJXBDJsLXHluSclKF5KD7Yy4mS7h7 hH//SzBg4DYEXt4h7Q+kFNuGHo0wz9HwbXgcCplfzb0HCzEp59Sj6TXbru3h5ocZjEjVdS o2e1HG9L70BQ3u3oegPDDh7BCR27UEAPaxqCm5aC1+3lMetjl95/zkzsoZozxrarN1nbxO Y0UKk8yOujBw1xH80M07oSHdo/cnxNkQbil4+OD6hBLZQF16zwkjUwSXbpnODLZC+SaFj+ 3BtneJhynM4foO2FLQHRE4gyJZ2PVwyVvtivR483+xCnUT+wvBZuByLeaayivQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9D33sw5zwTQ for ; Mon, 15 Jun 2026 12:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25bd5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 12:58:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 96759ab67a42 - main - ntsync(9): properly handle timeouts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 96759ab67a42226679675e24e35549aea2aa49e0 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 12:58:43 +0000 Message-Id: <6a2ff703.25bd5.10fe416f@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=96759ab67a42226679675e24e35549aea2aa49e0 commit 96759ab67a42226679675e24e35549aea2aa49e0 Author: Konstantin Belousov AuthorDate: 2026-06-15 00:59:46 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-15 12:56:40 +0000 ntsync(9): properly handle timeouts Reported by: Alex S Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/dev/ntsync/ntsync.c | 16 ++++++++++++---- sys/dev/ntsync/ntsyncvar.h | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c index a7b002de7cb6..2d3054e0a4ee 100644 --- a/sys/dev/ntsync/ntsync.c +++ b/sys/dev/ntsync/ntsync.c @@ -215,7 +215,7 @@ ntsync_wait_locked(struct ntsync_wait_state *state, struct thread *td) if (state->ready) break; error = msleep_sbt(state, &state->owner->lock, - PCATCH, "ntsync", state->sb, 0, + PCATCH, "ntsync", state->sb, state->prec, C_ABSOLUTE /* | C_HARDCLOCK XXXKIB */); /* @@ -1195,7 +1195,6 @@ ntsync_wait_state_get(struct ntsync_wait_args *nwa, u_long cmd, { struct ntsync_wait_state *state; struct ntsync_obj *obj; - struct bintime btb; int error, i, j; if (nwa->count > NTSYNC_MAX_WAIT_COUNT) @@ -1270,14 +1269,23 @@ ntsync_wait_state_get(struct ntsync_wait_args *nwa, u_long cmd, } } + state->prec = 0; if (nwa->timeout == UINT64_MAX) { state->sb = 0; } else { state->sb = nstosbt(nwa->timeout); if ((nwa->flags & NTSYNC_WAIT_REALTIME) != 0) { - getboottimebin(&btb); - state->sb += bttosbt(btb); + struct bintime btb; + + bintime(&btb); + state->sb -= bttosbt(btb); + } else { + struct timespec ts; + + nanouptime(&ts); + state->sb -= tstosbt(ts); } + state->sb += sbinuptime(); } *statep = state; diff --git a/sys/dev/ntsync/ntsyncvar.h b/sys/dev/ntsync/ntsyncvar.h index fd875588e889..97828c99bb7d 100644 --- a/sys/dev/ntsync/ntsyncvar.h +++ b/sys/dev/ntsync/ntsyncvar.h @@ -81,6 +81,7 @@ struct ntsync_wait_state { struct ntsync_obj *objs[NTSYNC_MAX_WAIT_COUNT + 1]; struct ntsync_obj_event *alert_event; sbintime_t sb; + sbintime_t prec; int error; int index; bool any; From nobody Mon Jun 15 12:58:44 2026 X-Original-To: dev-commits-src-all@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 4gf9D460Bdz6hJpv for ; Mon, 15 Jun 2026 12:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9D451F2z3WNK for ; Mon, 15 Jun 2026 12:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528324; 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=9p2AiVm+flJu2W4GHCLD2+qEloF3tsBuZuuP4pVM+6Q=; b=NsZq9AX0lLAAMkNw0H7hM7jT5RRwHy3ZBxkXy024BKsBQUiBFxp+IJYHckxCj7V9Gv6/Pu gfoClHhZSydk+BTWkbMO8K5Oif0WUOJnJXzOGZfA12Fu1RdAiP/uJkmnIEuZk/E8ZQGqVm D8iwq7KUiZfcV9kXGI6p4dhoUx5F794L8e9Ct8tDByig6pGUITsnRTaLYT3Y2LCPOh5VxD 7krYDYBSLoBSBBxLAbVcM+mVpZqzzeicwrkqjP3kkMO9+r5yNrP5PGNFjTcazs94fHQzI3 ElCw8jtShkwKoSlZI/NWAEkpSwUhMzRtuUY3kwrsL3V5sEI6HpFjsm2l9St48Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781528324; a=rsa-sha256; cv=none; b=ZzlfhB4Q+hPLJHNC7080CGXUo98mVN23BEjdmOiW3YGaCcQvDxz7uFdHS8UzBmACT2lnSr CwEZNJhQzD7OoZJoexJujr3CzsYJWvRdLp5751YDqYBOWIiJvdIJAmKjMFeH9TmLjBit5h t2AMm0dD7p5naxDg4c26PrUt7tgHXqezF6l3Ox8eSHnartwtdeLhUwlVVqU+Obz8vyV7qA kcqsFNk9de3t/QJTaLbsKmDiR4y3prb8qiON6k5FiI91lEaj2dqugwojIPegnmpKu6SLMG Yqq8B2qqPWglVi6xQUndpTsyWVpxdGTCl54IgKY5mqtc/Q578haKn5bY8fJkVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528324; 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=9p2AiVm+flJu2W4GHCLD2+qEloF3tsBuZuuP4pVM+6Q=; b=EQhFVTUxCZUVj/n5frvdOlIItOVRyqc8qPgx+hrm8chQ4irITmfxxKmyDh03WQ8wIIooBx yrwgVR7/RqFG8IDp8bBcgTSQR569IT640RFn0z99WxdY+ShkNHEmlgp0aSPBGG9BSyZTWQ FQP3IrBhSkA44abaUg2C221cvIKPJ+61XXpAU4DLw9Slv0AEnYmRSCBTf7/gUxHWnSo3RD 4ZJzYj1LnCMCZV8JiQufXVkX7md+HuipakSNpfvPW4lQqQ2g2B5AonYyWqx4uPIm7vEEJc hfokTRTBthTGq3ReOou34XEAlimaZIMH3nuEZRdAv5GW3ny4hLRa+KO9/N0NNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9D44YRVzwYd for ; Mon, 15 Jun 2026 12:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25dc3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 12:58:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 281e350942b2 - main - ntsync(9): free wait state on error from copyin of the object's array List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 281e350942b26b054ba5bc820c6aae4ae0e03a38 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 12:58:44 +0000 Message-Id: <6a2ff704.25dc3.7d0d0514@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=281e350942b26b054ba5bc820c6aae4ae0e03a38 commit 281e350942b26b054ba5bc820c6aae4ae0e03a38 Author: Konstantin Belousov AuthorDate: 2026-06-15 04:31:03 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-15 12:57:25 +0000 ntsync(9): free wait state on error from copyin of the object's array Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/dev/ntsync/ntsync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c index 2d3054e0a4ee..5fba9775be0e 100644 --- a/sys/dev/ntsync/ntsync.c +++ b/sys/dev/ntsync/ntsync.c @@ -1210,7 +1210,7 @@ ntsync_wait_state_get(struct ntsync_wait_args *nwa, u_long cmd, error = copyin((void *)(uintptr_t)nwa->objs, &state->fds[0], nwa->count * sizeof(state->fds[0])); if (error != 0) - return (error); + goto error_ret; i = 0; if (nwa->alert != 0) { @@ -1296,6 +1296,8 @@ error_out: fdrop(state->fps[j], td); if (state->fp_alert != NULL) fdrop(state->fp_alert, td); +error_ret: + free(state, M_NTSYNC); return (error); } From nobody Mon Jun 15 12:58:45 2026 X-Original-To: dev-commits-src-all@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 4gf9D60K25z6hJq1 for ; Mon, 15 Jun 2026 12:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9D55Nmtz3WXn for ; Mon, 15 Jun 2026 12:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528325; 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=urawPso8+REUkabxOX1v19S9E6wzRVR5sivaunL8PRI=; b=DjGBUYvYsVoZH4x8Qwhzp9SuzJg3lhNUt1TA23ug8mWf1HQbKQXUZv+lrh7rF9bNhQUFiY xZSIwM2xlIXW3/jjfd14z6bZgbMzg80/UlLLFj4NZcSBkc0tfqwk0qvkaI2GwxoH/7a1wy mR84Qqfk4VDrNUUOXscfnzLH7JJh9xMkRiZhU5vNR2EL1Iifh7DiUf27YRp7+m8RGRucDu v7Slmo2DEKQ9BLOld+0l3WEnRMqMbjnXkA5m7onEpjs3GeOMCBOMFS8/ZvtiF37h1vJjJT CbY2AJcdwXcwiiMEEaqcxud2xFRrDGJQaBQQuFlwB6Is2Zs2uP7fsdz00uUysQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781528325; a=rsa-sha256; cv=none; b=BGLj0uTWUDnmmrebfd4pW1n0/g8vdWqLqwgWQddp9CFLnDJdFn9/ztWPgOH10eyEiPju3C vik4f1/QUW3PmmI4HyCsTkrLz6retTSZzfK0C6H26gTtuf90Wbc1xeMpzPCR3A8RFPuR0R DZ8PW+91G9BR1sbbGvJq72kcyW1JMVWcxMzg7DPr/av5W/ft6dCLCJs7v35XGPkGhK04+n bTJ9Q7j/wir5F8WLOTgvq78Wb8fRL1gjbl/PIwox/qUptK/tldQ/Huj5Wy78m+6kXjDtrb JNOKlp/85+likDC93ouna7H9vSwGDXZK88l57+Fc/+0NktX2NXVl8urls5xU9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781528325; 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=urawPso8+REUkabxOX1v19S9E6wzRVR5sivaunL8PRI=; b=ZmIj/9DXwM4Bf0st+cJjUIolfjhPviy8pUocfdrBmuGzgOGU3XRfjRnh7TWHK23dmI6KAD QYWQPN5YGlR7c+Ne2UEvIvBGQR6tH2kAzMV9pjBcZ9ks+tAsJh7HmFjcIAbOUix2lV/9DZ 0+mRWvwTAr+xMJZIi14UZWTzwkh7Wtfi4heLdve8iokUsK6/tyR4K5Rgfat96JpxVamVzu GfhN6vGP4BA27FiXyiSgOL+MBJP1oFUdKBk4HGlc4CF1rx3eNdB2+W9Pk0ZZVQvr0mIVYn 2IRdk7pJT5tU9CcLQNy/GpHFlT7OJAsewLuwbo2zyexuqv4Scvh8pyugIHDW+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9D54x5Tzwkx for ; Mon, 15 Jun 2026 12:58:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24d39 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 12:58:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1491ab351b45 - main - ntsync(9): do not double-free obj when finstall() failed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: 1491ab351b45b1c727eeed40027f7b5074b19ff5 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 12:58:45 +0000 Message-Id: <6a2ff705.24d39.46b7366a@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1491ab351b45b1c727eeed40027f7b5074b19ff5 commit 1491ab351b45b1c727eeed40027f7b5074b19ff5 Author: Konstantin Belousov AuthorDate: 2026-06-15 04:41:53 +0000 Commit: Konstantin Belousov CommitDate: 2026-06-15 12:57:41 +0000 ntsync(9): do not double-free obj when finstall() failed Reported by: Alex S Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/dev/ntsync/ntsync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ntsync/ntsync.c b/sys/dev/ntsync/ntsync.c index 5fba9775be0e..2dec2f68aa80 100644 --- a/sys/dev/ntsync/ntsync.c +++ b/sys/dev/ntsync/ntsync.c @@ -297,6 +297,7 @@ ntsync_create_obj(struct ntsync_obj *obj, struct fileops *fops, finit(fp, FREAD | FWRITE, DTYPE_NTSYNC, obj, fops); error = finstall(td, fp, &fd, 0, NULL); if (error != 0) { + finit(fp, FREAD | FWRITE, DTYPE_NONE, NULL, &badfileops); NTSYNC_PRIV_LOCK(priv); MPASS(priv->objs_cnt > 0); priv->objs_cnt--; From nobody Mon Jun 15 13:12:11 2026 X-Original-To: dev-commits-src-all@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 4gf9Wc0LCmz6hKwb for ; Mon, 15 Jun 2026 13:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9Wb5qBNz3ZBV for ; Mon, 15 Jun 2026 13:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529131; 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=0EeSQfjshBw1z65pfhBpqXsVXj3Z+coMzYwnESLOEXo=; b=l6wqPlWwg1KrrX/y8RSsOAM0XSX/TJNmk41P2+KgGRFyglhgb6lIL+0hiY8Q7OBHq0Gqhm Jt5w4Sla7XoOT5jTF0NjKS90ypHIHa6oHOgPNpvKNSPhJ3PWM9KPkRacMRBMBQZU1qcuw0 1z3M8yvZK0ol6aiVXzVRu9859QGgQXE1nGpNNmNK2yTaq6AGMfgj7OeP4+bk5LY0/iL06w IMXvs6Ff45a6m2gFZWNzJ61+b6pEoLb7t+rzWZrmjQCGCXru9Kd1mXxZW6AspTRqlpE9Q3 8et2TqdwApX7QlliUKIfe6Odavi0vJD6OiDr0xXuySYCeBIgvlMELG+NBseJfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781529131; a=rsa-sha256; cv=none; b=MYw0oBdPz7jRuIDKmcQBHTU5R2JRFvbFLjhQ5P6fEMDPfQpHfWBKfWiFTRihKDFtoquBlT 7q0Q7wIt+4sQiqWdDX50bguiyfEhb2RXiROTVNUzXMZVXNIfiZlVvZOw8r4WP5SBy+DPj/ CBQMo4xFRvAba6X5QmAYr1i9YJXaP4kKtH22Q/78vKgM6u04nC3iH/Ujxc/6iWwID7qGQJ eM98lTKyDfLp+qM3IDkGLHkjUm+27qiN795LHfqsOP4Bv350v/l9uVPUSirYhwuj95BvgY H3afmZcR86hTmkR5jXDR/UORhW4RKEzZje+34F70vpsY3vXW31H/kVT3ASE1Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529131; 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=0EeSQfjshBw1z65pfhBpqXsVXj3Z+coMzYwnESLOEXo=; b=G5uRKU8GftuBDvF5ioosivyeoApln8byKFMn/xLx5Ss/QQJ5lacW88sSLCL22au/YHiqH2 IJhzdkRcvYRuYrH+j5lnaC6LfqCBl9bP8t7qaj/QUH6st4Zrp27kbwU+bgfVzUCPRGcqxs isbhmDxlGGuj8gQ8eVtjD96F1+fyn8Regsybb0TTjIZ2/FbxgCEAQ8ofQmrc+0kLM8z6k0 jCeH6zvABoKIz+xx16f9vY5J8ENyeB93C0zi/78dbMzU4PNnKCDZ/rby19WZ43a0n1GlOQ d8blR9XFCJwjGO8PK3ZVPZl9ENkAYpWwErVyzuT19KuEXsu3cJhnKsn+hjB9uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9Wb5KSnzwXQ for ; Mon, 15 Jun 2026 13:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30ee0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:12:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 27691b8b9303 - stable/15 - krb5: Fix reachable assert when importing krb5 names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 27691b8b9303c6fec89a6dcb9c56f8c8f0f5e69c Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:12:11 +0000 Message-Id: <6a2ffa2b.30ee0.1444e6af@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=27691b8b9303c6fec89a6dcb9c56f8c8f0f5e69c commit 27691b8b9303c6fec89a6dcb9c56f8c8f0f5e69c Author: Cy Schubert AuthorDate: 2026-06-02 18:09:43 +0000 Commit: Cy Schubert CommitDate: 2026-06-15 13:11:49 +0000 krb5: Fix reachable assert when importing krb5 names If a name token contains trailing garbage, error out from krb5_gss_import_name() instead of crashing the process with an assertion failure. Commit message details obtained from upstream commit. Obtained from: upstream commit 07818f1fd Reported by: Aisle Research (Ze Sheng, Dmitrijs Trizna, Luigino Camastra, Guido Vranken) to krb5-bugs MFC after: 3 days (cherry picked from commit fce16f60de9718be6b789f00e86141a84cd920d3) --- crypto/krb5/src/lib/gssapi/krb5/import_name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/krb5/src/lib/gssapi/krb5/import_name.c b/crypto/krb5/src/lib/gssapi/krb5/import_name.c index a067d0742331..b4c29b442511 100644 --- a/crypto/krb5/src/lib/gssapi/krb5/import_name.c +++ b/crypto/krb5/src/lib/gssapi/krb5/import_name.c @@ -297,7 +297,8 @@ import_name(OM_uint32 *minor_status, gss_buffer_t input_name_buffer, goto fail_name; cp += length; } - assert(cp == end); + if (cp != end) + goto fail_name; } else { status = GSS_S_BAD_NAMETYPE; goto cleanup; From nobody Mon Jun 15 13:12:09 2026 X-Original-To: dev-commits-src-all@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 4gf9Wg2m2Hz6hKjF for ; Mon, 15 Jun 2026 13:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9Wf6K5xz3ZRG for ; Mon, 15 Jun 2026 13:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529134; 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=pN4Ca8Y54+Xf5Vzqzuu6MySRIXrHX5AQ3cGmSH7LsPQ=; b=vfufAv+GrKaoL7gBMsUot7Bm5QPvudpLKcQNbYt7eq4Jsd93PhoQOWKo/s2T6EejimQuWZ mGZ3Ypr0haptf/4AFFDTweukGw/qInbEgWNTxCi9Y5scgCImoINkmOWT5FtVsGF3pRzbTS Kys90mfI3YEq7+sPRA3KKP2YZXikD9yvENjdIBCXqtJdb06Ppu3kyzAxkDp1+wjfBb7W5E mzFYQg/WFLKqWtuWl5/nqgE9Zs5bO+UdUx/gM0f9I/zN8lX3CcrTokmlsHYpdS9tZfgJXf v88zcrMbxHrDoRYQsb2SZTJAmRBTZwPr2b1saXAaAkedzzhOp2JOfEzhqrcbUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781529134; a=rsa-sha256; cv=none; b=QPcwCelWxI/BPmkFX6nBLTvdHdjhoHMv5SVtwkGvXxuTz9iodLZDTRPPbCx5qXNNsPfO6g cLh/uQ7IuD7YPHLyNsuRgdj04XLJFRcA8mOkCzrKhzGCJQ+ORprYdu8h47OX6XKiZDKKfs 6ATtySAm3lAWEKBvSm3i/4bnQj6wMoRfWDC3mr5RW89vXcWtgQY/cqvnZVMFgeOiZcT44A GqyNmuBkk9A0JTsNMSWTX9nJmY0FykrWh0o3aMF7CP09TNGiRtV/DKaBwybGCJEaQtcTqT MpNoSWiuTw4M1YpBntLNgp17dcFiJ0tOZQugonDNng8X+H2NB+iQSGD9is2VXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529134; 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=pN4Ca8Y54+Xf5Vzqzuu6MySRIXrHX5AQ3cGmSH7LsPQ=; b=N9rej5B2d6W7eWyVEEQ50AU39nsp8VIwxnYqBnAQa3lbky/9BE6YU/6smMyZuI5LqyYRmG f8Of4p8UGRxeOxdx7U8ZR9FRJig7QmzS1zoz/aymL1bdvCbo2vnfy8lvgjKg2o04rKhnM5 g5VN5MhzncSlIBELzagTn2humgbNFGCVRRLZFf+lSyoGkvNLslA2klg4LHHASsLyBvSIQO kc1xuAviL3AR8gB9xaAuEdpnW1/U50eyJ3lRHfqZy/YI/3WFGGyYJJbZ/eGelqfDJEgLrb m7rs65fYucnSSMVAoSudlPJ+jWlJQMeQPVWCoiY/A9STinLyVNrNbCCz8mPnDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9Wf5w4YzxC2 for ; Mon, 15 Jun 2026 13:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30d9d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:12:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 4c3fde8b835d - stable/15 - ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 4c3fde8b835d3a2d96805ce0c6565bce2f0bc731 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:12:09 +0000 Message-Id: <6a2ffa29.30d9d.2c3603f5@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4c3fde8b835d3a2d96805ce0c6565bce2f0bc731 commit 4c3fde8b835d3a2d96805ce0c6565bce2f0bc731 Author: Cy Schubert AuthorDate: 2026-05-29 06:17:39 +0000 Commit: Cy Schubert CommitDate: 2026-06-15 13:11:49 +0000 ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow A PPTP client sending a specially crafted PPTP message with a length smaller than the already processed fixed header can panic the system. This resultes in a negative remaining length (a large unsigned 16-bit number). Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Differential Revision: https://reviews.freebsd.org/D57383 (cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6) --- sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c index dc4c67dc14f0..95eaf78bd575 100644 --- a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c +++ b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c @@ -318,7 +318,9 @@ ipf_p_pptp_nextmessage(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp, int rev) * it should match 1a2b3c4d. Byte order is ignored, * deliberately, when printing out the error. */ - len = MIN(8 - pptps->pptps_bytes, dlen); + if (pptps->pptps_bytes >= 8) + return (-1); + len = MIN((size_t)(8 - pptps->pptps_bytes), dlen); COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr); pptps->pptps_bytes += len; pptps->pptps_wptr += len; @@ -361,7 +363,9 @@ ipf_p_pptp_nextmessage(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp, int rev) } } - len = MIN(pptps->pptps_len - pptps->pptps_bytes, dlen); + if (pptps->pptps_len <= pptps->pptps_bytes) + return (-1); + len = MIN((size_t)(pptps->pptps_len - pptps->pptps_bytes), dlen); COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr); pptps->pptps_bytes += len; pptps->pptps_wptr += len; From nobody Mon Jun 15 13:12:10 2026 X-Original-To: dev-commits-src-all@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 4gf9Wn0d7gz6hKjL for ; Mon, 15 Jun 2026 13:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9Wm6lBhz3Zwd for ; Mon, 15 Jun 2026 13:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529141; 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=YMM4KcflIlYgekOGicb6WCwQjz7jI6s6C1TufaQKWtE=; b=h1jRyv5FIGlpvk6fqofKGbj4RnN97xz/VBGpHRZmkTF76Bevz2IyCTu++FPTFAap9jCYj/ AM1NzvPz5uOsFoqP9KdMaveFhauQ4gMTu8papvD6ykjpOwxGXRZJ5vxDPYXJy7tMVTDMsD GPPQov7csWHsSOwqHyuyIt3OEyjYzL2xDGAYywauIoqtRrcibDRNXHBh0UQet+THsVmYk8 928ybw0jgfHrjhgZif0iS89uC72MeBJZhE+KqloQtJCh2rhBabTo5xy3Ko2keqd5IP8mKZ N/loe+zxMslG7Aa9eV+jLWWgNWBFWHq8Vq3Hw349k5kcP9vbQzL3qLTkP2NRkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781529140; a=rsa-sha256; cv=none; b=Q7hNg7Zt6CYNrhygU0WTsw9QY+WZzUIn1ICn0bdrXJR4ujyfQbTk94eBEJNJ6y/XQvAXoF CJAo0O7KpinIwZ1NUgYOLDHwBpWDKJeTgazPrDwW8fQyeOTn5KR2ZPj2d5amR75Fp2zbs0 M6dWAcDkeWFhhbU3AoRZe6ulK+Phi3c8kJAahEw0L8Vxx8Ysbmdug/PRWHpaNgtxs9sEVD nU+0vBI27v3pHde2IoFNH3qpLXjP67RUAA0Fqm96mFAo9knSuEP2zm74vE5CtkSh8VJoCz VANDdF98ZODPI2LmS79a2Ut0nrf0f/8zDjHq3oZia2Oyhf5e/aNvgHVo319g+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529140; 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=YMM4KcflIlYgekOGicb6WCwQjz7jI6s6C1TufaQKWtE=; b=brXMc4Ru4j8fPseUUYrx6jeSE01jwaCJEVVubvUU57sfyZjJMksb140iEnFv/yOLNwoDlN 6eEnO+1MnGI3zgs+IHTtt28G1a/tzKuXs6Oc9/JJZlAZ6N3/3yiMaJV/LCRUHorq9pON/a 427sJDTmH4eD2zuiNLs1AyzViWx8DoEw/yKEj9922K/jrFffoli7AY9pmMWK3xK80o1Ako 3rAVSWx/cjzqKaRQzZ9u7J2hr8QsFHEvSwiZeR/2GUBG5U8OdjrMVV6/8tniC8Lrxc23EJ m3bzry85BgrdJEQFLeyjBytZT42fcWHDsww0HViOPlUYt/fAO1s6SvlxLn778g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9Wg65swzxFd for ; Mon, 15 Jun 2026 13:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3128f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:12:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 120881b48248 - stable/15 - krb5: Fix null dereference in SPNEGO token processing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: 120881b482480bbe31ff031b3d4792d1b8159d23 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:12:10 +0000 Message-Id: <6a2ffa2a.3128f.45bcd2@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=120881b482480bbe31ff031b3d4792d1b8159d23 commit 120881b482480bbe31ff031b3d4792d1b8159d23 Author: Cy Schubert AuthorDate: 2026-06-02 17:57:17 +0000 Commit: Cy Schubert CommitDate: 2026-06-15 13:11:49 +0000 krb5: Fix null dereference in SPNEGO token processing krb5 1.22.1 erroneously removed a check from get_negTokenResp() for successful decoding of the mechListMIC field. Restore the check to prevent a null pointer dereference. Commit message details obtained from upstream commit. Obtained from: Upstream commit 4ae75cded (cherry picked from commit efb5c07f91c5c11fb9bd32227ac74c2d08adf3cf) --- crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c b/crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c index 4a778364336e..1dd0f170651b 100644 --- a/crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c +++ b/crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c @@ -3517,6 +3517,8 @@ get_negTokenResp(OM_uint32 *minor_status, struct k5input *in, if (k5_der_get_value(&seq, CONTEXT | 0x03, &field)) { *mechListMIC = get_octet_string(&field); + if (*mechListMIC == GSS_C_NO_BUFFER) + return GSS_S_DEFECTIVE_TOKEN; /* Handle Windows 2000 duplicate response token */ if (*responseToken && From nobody Mon Jun 15 13:13:19 2026 X-Original-To: dev-commits-src-all@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 4gf9Xw08s0z6hKjX for ; Mon, 15 Jun 2026 13:13: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gf9Xv6RGwz3bPC for ; Mon, 15 Jun 2026 13:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529199; 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=oGrN969DsYRq4mM1bllLO3XDRZzAx39fsk+mbOE5+pM=; b=LpWsr0WUdpFHLVMWEHZ97m4ikyDwjCDyy2zCtuJEPMFU4StUcrjiEagiSLjQlk+yOT2900 jqi1mF6fnx6blKsILXfqiH3zDfN9qlW29nR4A10FoQqbsNXJPGqTKJHA3sGZ1yDC02daJx 8pd2ISKQA8iO+Zt3koxCFR9G4SjHuHemFvOJC8pouI+7m85jKl/0mBCV9MtbCPOhZ3N9mm sQ3VOWVEHHIle23zhinr6A8NeYtB9wVKXaKUW328zUGQnjmh/hPrfecE4nM190YclW6NMn aPW3pDCXT/VXUm8GrnWgn2jbJWJUwMv6yp+hL4OVj4Fb1PCmS3n7tHfkWdreng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781529199; a=rsa-sha256; cv=none; b=cLrmWjMsgn8SGDdplPZ0ivLmvyWY3sLee5flITtgdaFV0gJYY2jvr7xeE4LgWX4jXtGnL9 VJwbw3JQfW7fIhp/HZg6htDfT1o3snVdAs5edBTLoW3BScgKOINTwPctMBMSYpfT3nwMWb n2thXV73c6n/A8bvfO5eRzy57B8zVI1wW0ih6Mv/o8f6GLklGsEQ1oP1A6EHKgAIg8eazp o2VJbcBtroa4sn6c4NcLHjTCfSZpOc6GIzeJg5dyldkyDuS3cd2fvj4vYj7RcgmaL78OSg ra3JV9Pq5jIMUbUVNO8My9GlaEzpmMcZDEG6mgq7fFqdKH36b1orrMgBePnB/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781529199; 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=oGrN969DsYRq4mM1bllLO3XDRZzAx39fsk+mbOE5+pM=; b=ajCCuuGBoQSE1eRKYogxkueb1aYVceFn9DHB0T9HHPKiyhKEmt/AYP6vE3DSko3pXtjaXD KnDwqsDtsYtk4rUUM7ACQY5RawbwVGvGE2dgYHAC+KDOr/1HCjDNu7UH1ZtjdccV3thOR/ toAsEdcDnDWRVhGqsYxf+G3QSyXkndHV2se1dl4MOlIS3c/GavBw2WyFjrxy9kdXt9Aitq wvShdw6rMuj1dsnaNU71OaSaHqtFjIlWF1+2L55gCjGOyAVFaOQmrmQJub7L78SrIilLmb dIH+skp9TOj0QnPSeLJzrlhrUgVXJg+ScWUaXS9cz2W1N2DEd1EbaD69ITFzHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gf9Xv5tMYzx1P for ; Mon, 15 Jun 2026 13:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30aa2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:13:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 56b680961c10 - stable/14 - ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 56b680961c10af29dc651c3cbbdbc1953dcbd465 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:13:19 +0000 Message-Id: <6a2ffa6f.30aa2.7c9002b8@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=56b680961c10af29dc651c3cbbdbc1953dcbd465 commit 56b680961c10af29dc651c3cbbdbc1953dcbd465 Author: Cy Schubert AuthorDate: 2026-05-29 06:17:39 +0000 Commit: Cy Schubert CommitDate: 2026-06-15 13:13:02 +0000 ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow A PPTP client sending a specially crafted PPTP message with a length smaller than the already processed fixed header can panic the system. This resultes in a negative remaining length (a large unsigned 16-bit number). Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Differential Revision: https://reviews.freebsd.org/D57383 (cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6) --- sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c index 2aafe5bc0b72..d02b71c30794 100644 --- a/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c +++ b/sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c @@ -318,7 +318,9 @@ ipf_p_pptp_nextmessage(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp, int rev) * it should match 1a2b3c4d. Byte order is ignored, * deliberately, when printing out the error. */ - len = MIN(8 - pptps->pptps_bytes, dlen); + if (pptps->pptps_bytes >= 8) + return (-1); + len = MIN((size_t)(8 - pptps->pptps_bytes), dlen); COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr); pptps->pptps_bytes += len; pptps->pptps_wptr += len; @@ -361,7 +363,9 @@ ipf_p_pptp_nextmessage(fr_info_t *fin, nat_t *nat, pptp_pxy_t *pptp, int rev) } } - len = MIN(pptps->pptps_len - pptps->pptps_bytes, dlen); + if (pptps->pptps_len <= pptps->pptps_bytes) + return (-1); + len = MIN((size_t)(pptps->pptps_len - pptps->pptps_bytes), dlen); COPYDATA(fin->fin_m, off, len, pptps->pptps_wptr); pptps->pptps_bytes += len; pptps->pptps_wptr += len; From nobody Mon Jun 15 13:42:43 2026 X-Original-To: dev-commits-src-all@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 4gfBBq2fz5z6hMkq for ; Mon, 15 Jun 2026 13:42: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gfBBq1s8Hz3gG6 for ; Mon, 15 Jun 2026 13:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781530963; 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=laRqxsOYXiaqfVhnf6OaekZ6MOmckxwmZ02Mf/dofWo=; b=GLzDUebMrZNZqiIXqG5Mco+tp+pS9Dif+6G5d0mMl3kthaaQsJ4qyTq7zBnkdkukIUn9Js sJtjhSZfrA098nnTAIzAI6v8HieDYSBfj8wmv1YNGUt3WB4jO0UGaU28FVLmBnDO7hnotc G2oM2DqjNxyG8IX+GXwJFGcgZ36cT3KSp0M51RvZnJcMClewctYabhQ8wEmHQs6Trq9kR0 Qt8U+CgTjjXKiaeP5A9SLj6VZxUe//gc8JTF9pRvfci47EvxcSaPJDo7fwjZmh9x1aAsDW HP4CR5j7JtYUG1FhdOAWqGUezqRENuZQ2RuF/IpX7EGJxfOlH0fmJ3rbHh9dvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781530963; a=rsa-sha256; cv=none; b=DJLXyaDzxGOlh/gsG3DO59DIGwDqDAahfk83EhFSRsDf8DACEIiB4LHGZREaND/T21O0+i //n3TPxUwvvr4LM9tpg0TlNaM54ZyEbnhnVGgSRbuTsGvxpl1irmoiASTF4KusE9duZR6C AfamrdhRYgEVOAsXzrVfDdGhZGeuZl5XApAh2UzHv2pnKc6XmJJBPo95vbGuN8t6+nZIq3 gpIL1seKrmcB2PRyBLtrPNsKZ6tt1N87gGhvOqcDJQ8qeLeH0WuGzHLlnADlYFD9EJGZVV e4PFT5iLABNaoUAv1mT8MpOtQZjZC4NdLGDagdhaTOKPQefZJjwHoQKO10Go0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781530963; 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=laRqxsOYXiaqfVhnf6OaekZ6MOmckxwmZ02Mf/dofWo=; b=V1YixlcUTrY+x2WRTNRxpD6vFr3HmJryLh215zbaOuaOYRTGGR7Oz2vFIqv5XOE2TXwY29 fsLzehbBipnFFj8QnbJAYu+E7q0vhIJ30cZbunrBEG8gOSxQ8uZm1XOYUn3t6hjiq9ldKO hattjnOy4cNcctrCW/NY6Ei2HELdMqkD3EWRERlg0txJlbVBSXawVpsw+YYtKf8pTnO9JP qi4K5exeo1D3sDwaxEUNeOPDtNkDLWxICodCoJzUe84pS5Mo5CMZehk7YVQz951xH7skdQ 2yaPAD1gFt6PIoj+we9UertjuqHZdLVoY7EUZdLMfZL6VTcK9A+OawTe2YP8Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gfBBq1QJ8zxhk for ; Mon, 15 Jun 2026 13:42:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 341ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:42:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 586a5bc03541 - main - pwd.1: Fix a typo in the .dD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 586a5bc03541397c432ce98a1551ebeee7c04ef2 Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:42:43 +0000 Message-Id: <6a300153.341ab.6980c2f2@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=586a5bc03541397c432ce98a1551ebeee7c04ef2 commit 586a5bc03541397c432ce98a1551ebeee7c04ef2 Author: Gordon Bergling AuthorDate: 2026-06-15 13:40:05 +0000 Commit: Gordon Bergling CommitDate: 2026-06-15 13:40:05 +0000 pwd.1: Fix a typo in the .dD - s/Februrary/February/ MFC after: 1 week --- bin/pwd/pwd.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pwd/pwd.1 b/bin/pwd/pwd.1 index 8b03d060bc8e..f27b4aa1bff0 100644 --- a/bin/pwd/pwd.1 +++ b/bin/pwd/pwd.1 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Februrary 6, 2026 +.Dd February 6, 2026 .Dt PWD 1 .Os .Sh NAME From nobody Mon Jun 15 13:47:24 2026 X-Original-To: dev-commits-src-all@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 4gfBJK4zLmz6hNF7 for ; Mon, 15 Jun 2026 13:47: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gfBJK3rD8z3gnp for ; Mon, 15 Jun 2026 13:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781531249; 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=HebHFieGrAHXLwohbuQc60PzZSwxhdA9Q7hL7u7sA4g=; b=V/d5UDkzUn8ivLj2i5ZB1UurjuofHoIJVNM+9aIoZmFFQJimXg1YqwEII/VS3Z2iu86zUu eL2RnemVygkzpDkcLh1xLSImmco+8QXKpbWCk6EiPItliBk9tpWtW2tubszEPeGCqlLBb/ yDBVp7toFzqP87pkVuT3vE8ZDQgQtpRBt6T/AA03KNzD+I5zUeiP3k0gcGSjcG2WHVUW0O Iy4q3JD++Ncf3/l2e/UjvT1I3veM2MU1L4pyxFujK06G33/3phOAzlR7w87OlaQJyQH0dE tmnw952GS8mHsMnLSRJOWbumZDQKa7Mrl2bwjrzfnOLlDV5M6xrM3P6btFBeRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781531249; a=rsa-sha256; cv=none; b=DsAtWGxqKy4DV++Dnci3va1fbe6c/TxzihxAZs4SnOrDmFf0x/KWt++P3exiYV2f55JsSp llZ8NE0vEMxkYpfkzd0LL0XE5312L9QpPD13uicdeEuYkHXdrKiOLArz/qaog3TI5tItYP qT5Pua0TpIIlmNFAz55wRBoyurKZmKm8YSweKyDNtJOlSr7youV6b+xeTJp+8wQVt+2SYX pjGWpSZLKPt/SOJJMVOU50rqbhHo2VaN9IWiq5WhbjhDxdCijNI+5NSGyO5YLwygiNUmj1 KbopXjDaWKHplsMfP77ycaBNHlJgDJTzh5iCLOW8vJ6FFE/hilRpakf8I0zYYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781531249; 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=HebHFieGrAHXLwohbuQc60PzZSwxhdA9Q7hL7u7sA4g=; b=diQGK/kA58T2OazqN+pAkBuyBuTciuFMha88N2aj8euoKJneCaAbBKofmGb7rlDAizLakh IjTi13Gb6beH7N7wjB0VPlYX5FAUN2oQBb4VAAjLCm4pqnLnxmZlY7rcQVziIQzZnoqISr 42cvb1O9aEiqteiX8P9P6J/ZHsFGXSSEeZTITey1AmxgLdDvR2gDOvLm0P8ldYukPTtEj/ U48meaGBuWy/sN70Lwf7wkCv1sSxqc+hheaQ2jIzXUanFx6mkZsBM3yk8sOX4TkeBvwpT+ 4a8wGlE2+82FmSXHB3qlIByh/u2QkTR2ywE+IfRsmF5bJNw1wtWwqOuLXjtCRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gfBJK2yzkzxfB for ; Mon, 15 Jun 2026 13:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ce9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 15 Jun 2026 13:47:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e26c01080991 - stable/15 - linuxulator: Return EINVAL for invalid inotify flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/15 X-Git-Reftype: branch X-Git-Commit: e26c01080991ac8bbd9e8e659600b16840ca063d Auto-Submitted: auto-generated Date: Mon, 15 Jun 2026 13:47:24 +0000 Message-Id: <6a30026c.31ce9.6a4ec956@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e26c01080991ac8bbd9e8e659600b16840ca063d commit e26c01080991ac8bbd9e8e659600b16840ca063d Author: Ed Maste AuthorDate: 2026-06-01 18:22:09 +0000 Commit: Ed Maste CommitDate: 2026-06-15 13:44:59 +0000 linuxulator: Return EINVAL for invalid inotify flags We implement all of the currently-defined Linux inotify mask bits and flags, with the same values as Linux. Return EINVAL for unknown bits, as Linux does. This also moves the translation inline into linux_inotify_add_watch. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57387 (cherry picked from commit f77d37cffdf3951b7f28b97005467241aa27c183) --- sys/compat/linux/linux_file.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 30e79a53ad2a..9a1f21d5feb7 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -2034,23 +2034,17 @@ _Static_assert(LINUX_IN_ONESHOT == IN_ONESHOT, _Static_assert(LINUX_IN_EXCL_UNLINK == IN_EXCL_UNLINK, "IN_EXCL_UNLINK mismatch"); -static int -linux_inotify_watch_flags(int l_flags) -{ - if ((l_flags & ~(LINUX_IN_ALL_EVENTS | LINUX_IN_ALL_FLAGS)) != 0) { - linux_msg(NULL, "inotify_add_watch unsupported flags 0x%x", - l_flags); - } - - return (l_flags); -} - int linux_inotify_add_watch(struct thread *td, struct linux_inotify_add_watch_args *args) { + if ((args->mask & ~(LINUX_IN_ALL_EVENTS | LINUX_IN_ALL_FLAGS)) != 0) { + linux_msg(NULL, "inotify_add_watch unsupported flags 0x%x", + args->mask); + return (EINVAL); + } return (kern_inotify_add_watch(args->fd, AT_FDCWD, args->pathname, - linux_inotify_watch_flags(args->mask), td)); + args->mask, td)); } int