From nobody Mon Nov 24 03:17:22 2025 X-Original-To: net@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 4dF9wy4zs5z6HwDh for ; Mon, 24 Nov 2025 03:17:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dF9wy47q8z3Tsh for ; Mon, 24 Nov 2025 03:17:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954242; 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: in-reply-to:in-reply-to:references:references; bh=+RuJZzm07imtJga7zuuatstyPp29xFjaoqP6qFOsseE=; b=I0+W98ZaUzuQXkPhzgNnDa7V+rSH/RX9rq4qdl8Rb9WKrxNqAC9RTzKUWJ2OywlzmuWVZT rAPxiabSE9gVObpERNjE+jwlB9PEg7x7jyQoxD03rhkYVG7MPLHaGRN1gIeKYkasaGHiB3 81rHa1bymYHQ4kU41y1TtiY7oeSS3DdiD33L0jYr9Nh9IU1tsFUha/RTsba/SfOuoMa/6V 3/QVr4zICdG93zYgKMIspgmF6JnhRmtZsMxiN+Wk36Y9fKaAihyClYlsAGjQbMu7IHSdgs TZu3XEHTPC+jXXlJPMNkL1ssjFcLioI8PQ98c4dQdw3ipr+xqSDpGilcGfdk+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763954242; 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: in-reply-to:in-reply-to:references:references; bh=+RuJZzm07imtJga7zuuatstyPp29xFjaoqP6qFOsseE=; b=qzyw+/F9diDGqVZmlP6odzfoPBDMn8ru6vHBaI0iIXCuCoxpdpHNPtNH7J0nkJ3BaM9Uat 9/oT3noPvh+hxyAJE9KcDXaLeU6apkKBUBSY6O1nTsD4rALE8nmCwTPIvcIuk6cJOoCjlV Yg7anH/qC6IH/C/bRb5F5zwqr5M1LDgI4l+pjjtxLHi7sfA2aHwK1DAQj2+PWwlJUi/Q04 iFCUvXBoKU4iaR7utcucM5LkmBWzBtHte8rJaHWmt2ga6DpWb83FBbPdZx4U1b37QPa0Jz aUPgmE8IUK6v8jUF0ZvS5TQFHVlzpo2YhvEYlDV1C/jeN+x388RbFPIuAlqlSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763954242; a=rsa-sha256; cv=none; b=lh+dJ3MuSa1YP93DGbmumi6S7COequVQ4p0ak49BnS9g6qQoa61IYHRcQdK+jjq7hYUWXv H5YmQh+uWJ5ERHr4RJ174m034vqpl/2wCS2seJag7xQKumoj/R2lGKpgxvt7+heXm5DPHT cSL0yJIJMuOy1rL0aI8YY0euIP6lvGskS/Ynw7mIIkHWWWxVMCXalreN/61B+Ys4PaaL3a fK9CRhG0veCFFaYRIWtobh9WWYAfzODyAHBbPSmbI1KjiFgvFCWpbpPX66iPWaz6R3s5MV QzCcZiE4qe4pjg6V6H3d33FScljV4CLvS0AIOahY8kD3hzunuLO1Ma1uQ+al/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4dF9wy3PX6zwwC for ; Mon, 24 Nov 2025 03:17:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 5AO3HMfJ091699 for ; Mon, 24 Nov 2025 03:17:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5AO3HMVp091698 for net@FreeBSD.org; Mon, 24 Nov 2025 03:17:22 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 290793] iovctl on mlx5en won't work Date: Mon, 24 Nov 2025 03:17:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bz@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D290793 --- Comment #20 from Bjoern A. Zeeb --- With new firmware the LinuxKPI error shows up as well (in addition to my instrumentation). Also the "undo" from mlx5_core in LinuxKPI pci_release_resource() results i= n a panic (assertion) inside pci(4). I do understand the problem and the workaround from the patch seems fine for now. It is the cause but the reasoning is wrong. pci_resource_len() calls lkpi_pci_get_bar() with true, which will create the resource and then in the follow-up bus_alloc_resource_any() fails (hence printing the error). If we make pci_resource_len() call lkpi_pci_get_bar() with false the bar wo= n't be there and the =3D=3D 0 check will fail. So in the end the check becomes pointless in this order. However I need to fix the callers to deal with the problem and see how to do error handling there. I'll likely not have time before mid-week to look again but I have to stop = now. It's Mon 4:15AM. Thanks for all the help for getting me setup for this so I could debug it!!! Just so I do not lose it -- the panic. That's likely for someone else to l= ook. mlx5_core2: WARN: wait_fw_init:779:(pid 5986): Waiting for FW initializatio= n, timeout abort in 3 s mlx5_core2: WARN: wait_fw_init:779:(pid 5986): Waiting for FW initializatio= n, timeout abort in 0 s mlx5_core2: Firmware over 5000 MS in pre-initializing state, aborting mlx5_core2: ERR: init_one:1710:(pid 5986): mlx5_load_one failed -16 panic: pci_vf_release_mem_resource: rman 0xfffff80049fb9e30 doesn't match f= or resource 0xfffff80001a71d80 cpuid =3D 7 time =3D 1763946040 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00ff27f= 760 vpanic() at vpanic+0x136/frame 0xfffffe00ff27f890 panic() at panic+0x43/frame 0xfffffe00ff27f8f0 pci_vf_release_mem_resource() at pci_vf_release_mem_resource+0xf6/frame 0xfffffe00ff27f920 linuxkpi_pci_release_regions() at linuxkpi_pci_release_regions+0x10/frame 0xfffffe00ff27f940 mlx5_pci_close() at mlx5_pci_close+0x73/frame 0xfffffe00ff27f970 init_one() at init_one+0x138f/frame 0xfffffe00ff27f9e0 linux_pci_attach_device() at linux_pci_attach_device+0x56b/frame 0xfffffe00ff27fa40 device_attach() at device_attach+0x45b/frame 0xfffffe00ff27fa90 bus_attach_children() at bus_attach_children+0x4a/frame 0xfffffe00ff27fab0 pci_iov_enumerate_vfs() at pci_iov_enumerate_vfs+0x3b6/frame 0xfffffe00ff27= fb30 pci_iov_ioctl() at pci_iov_ioctl+0x844/frame 0xfffffe00ff27fbc0 devfs_ioctl() at devfs_ioctl+0xd1/frame 0xfffffe00ff27fc10 VOP_IOCTL_APV() at VOP_IOCTL_APV+0x51/frame 0xfffffe00ff27fc40 vn_ioctl() at vn_ioctl+0x160/frame 0xfffffe00ff27fcb0 devfs_ioctl_f() at devfs_ioctl_f+0x1e/frame 0xfffffe00ff27fcd0 kern_ioctl() at kern_ioctl+0x2a1/frame 0xfffffe00ff27fd40 sys_ioctl() at sys_ioctl+0x12f/frame 0xfffffe00ff27fe00 amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe00ff27ff30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00ff27ff30 --- syscall (54, FreeBSD ELF64, ioctl), rip =3D 0x378cf1afa03a, rsp =3D 0x378ced110678, rbp =3D 0x378ced1106d0 --- KDB: enter: panic [ thread pid 5986 tid 100225 ] Stopped at kdb_enter+0x33: movq $0,0x1217452(%rip) --=20 You are receiving this mail because: You are the assignee for the bug.=