From nobody Fri Aug 7 03:51:30 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 4hGVZH6XYwz6nnsn for ; Fri, 07 Aug 2026 03:51: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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGVZH4yHHz47nC for ; Fri, 07 Aug 2026 03:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786074695; 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=Wxcl9A6SBnQA3QK332qbcVC6DVGNOpqTTc8jtQlIOcs=; b=PzaT1vgJ3xZ3Yhz/wr/EA0sjNqcB+4H5lEAui/MtwzBpIF0/dzQFFNRdyR13H2QMLL/N5t kJizvbaZ3yeYVtHZHCdjpOJ2BRSHhRecJt6VFXhGS9BnW/xtPb5Y3CwLbe6vmhfSC4ojGp M3+N3dDAyeVA2Q81/vUg/rykpuQqObJV9LRUu7PweYIR0SudAFede5TKBcWHYh7bWe84LR 7AP/y3Qu2shhST6+MeqMJYGH1yajKmURPGtTi4HqYWPQ3t4/1K6+cZXmGQXy/XIvrZImgf 9HuJQP7zy/8jlMkMmFQ7PVsU3dZtidbm5A4Wj6nODMJl+uIVhcO0vGX1nKAWzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786074695; a=rsa-sha256; cv=none; b=cHfq19itIRJZuNG85v6s2850gca5sqd8Bfsb0fd8uaD/NsIF2xTIJuR30oXqK6n8XyFa2T ObYO6bTnmeC/9pj7OXubb9XSXw3ZiY4W3W2CD7hNNAshcUwNW0DKEKYLGoSVjmprEKDjmZ GJcUzdv1gX5lqX/A5Oo0ORnoBCJaHc/EMiwIjgXMZQtmQgQ7gYWlapGWc8jOPt5oUwhktZ 0+VVV+DIzxMJoHnzSI+FRnKKhnk+P95xrYb83wMnh01/Q+39IP0QbkLz9SbzpLrROOi5wT AMcmuCYJDPx8wG4s/YNlfSQNwa+esH+Kgl59mQ69fbz2+4pELpztB46Sqz9k8g== 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=1786074695; 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=Wxcl9A6SBnQA3QK332qbcVC6DVGNOpqTTc8jtQlIOcs=; b=ZkxhiDVezaBVkIdzn0Qdt6AMO/mR9ix98082UUfzLsA9CLns8VlcI9TSheRnFmdZ7BYlnw 57vJ08La6q5xR9w/SJiDnBHyPIE5+mqKFV+QaFq12pGvgT7IyxakHyS0k3LiQw8cTPMSt3 c6LMB3vmrigVBOt4EmOQ1JE3DsSW1Al3JmCXEzuVhX3ehID+2Ob0ZjUrSOsGjV3ZerbysH 5fKnXrNFWU0CzGtoRTs9MnIhtj4XBLDCBM8TItxm3niMb40tUTuGAet/R2/5wf3lTNWfdw 4xC/+6d3dbGc1X+cNvNlGvhwmeRMozdOFiRGcdyN+c1l5E6HXJw8AfP5qnfXPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGVZH2W3vzrFd for ; Fri, 07 Aug 2026 03:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 215b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 07 Aug 2026 03:51:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 5aab6164161d - main - pci: Ignore SR-IOV VFs when tuning MPS 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5aab6164161db397d84e5fff88e1af1a9e405875 Auto-Submitted: auto-generated Date: Fri, 07 Aug 2026 03:51:30 +0000 Message-Id: <6a755642.215b7.2c36e3de@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5aab6164161db397d84e5fff88e1af1a9e405875 commit 5aab6164161db397d84e5fff88e1af1a9e405875 Author: Kevin Bowling AuthorDate: 2026-08-06 06:39:20 +0000 Commit: Kevin Bowling CommitDate: 2026-08-07 03:50:15 +0000 pci: Ignore SR-IOV VFs when tuning MPS The VF Device Control MPS and MRRS fields are reserved and preserved. VF transactions use the PF MPS, so a hardwired VF value must not be used to retune the shared PCIe hierarchy. Document the previously undocumented tuning knob and clarify why a VF may continue to display its reserved hardwired value. This fixes an instant crash/reboot on my Zen3 system with 82599 VFs. MFC after: 1 week --- share/man/man4/pci.4 | 13 ++++++++++++- sys/dev/pci/pci.c | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index 38a427e64f4f..71ca2f50ed90 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 10, 2026 +.Dd August 6, 2026 .Dt PCI 4 .Os .Sh NAME @@ -589,6 +589,17 @@ MSI interrupts can be disabled by setting this tunable to 0. Enable support for extended Message Signalled Interrupts .Pq MSI-X . MSI-X interrupts can be disabled by setting this tunable to 0. +.It Va hw.pci.enable_mps_tune Pq Defaults to 1 +Configure PCI-express Maximum Payload Size +.Pq MPS +during device enumeration. +SR-IOV Virtual Functions are excluded because their MPS fields are reserved +and the Physical Function setting applies to them. +Configuration-space tools may therefore display a Virtual Function's +hardwired reserved value rather than the effective Physical Function MPS. +Maximum Read Request Size +.Pq MRRS +is not modified by this tuner. .It Va hw.pci.enable_pcie_ei Pq Defaults to 0 Enable support for PCI-express Electromechanical Interlock. .It Va hw.pci.enable_pcie_hp Pq Defaults to 1 diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 034f34e2dde2..b690c3412356 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -4420,6 +4420,13 @@ pcie_setup_mps(device_t dev) device_t root; uint16_t rmps, mmps, mps; + /* + * PCIe r4.0, sec 9.3.5.4 defines the VF MPS and MRRS fields as + * Reserved and Preserved, with the PF settings applying to the VF. + * Do not use the VF's hardwired value to configure the shared path. + */ + if ((dinfo->cfg.flags & PCICFG_VF) != 0) + return; if (dinfo->cfg.pcie.pcie_location == 0) return; root = pci_find_pcie_root_port(dev);