From nobody Fri Aug 7 03:51:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hGVZB3yQyz6nnvv for ; Fri, 07 Aug 2026 03:51:30 +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 4hGVZB3HmKz47TW for ; Fri, 07 Aug 2026 03:51:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786074690; 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=QzrpKlFP3o03ZDeXXTQN+qBljJB4xN4Xn2u7+Fw5SlDYaKLH0nNbA1S0+LnJmHoC4zz4IY pCHFUG4o8F8mrZEouSxwURx/zGZXquWTLMGIjbVxH82N7pijHfX5Sq87FVheBqSU4/mQgm wtgioxq/jBcR3Fj+TrrL/Y95mPQdlxAeuwyFTlGe1/rRckGC6d5zelLaLsw39mo4nkw3Jl aVQ6XD2R4U7tKkmqV14/3oeCp1rR9XIv/mNQYQZ6LUMr3AWwYP25L9nIcn84znybMxYE3B kkUjZTFr/cRHNhQ73kEl+uZIrDfozGlZRftm7QIk5cy4M5yxPSh9sCA86QYhqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786074690; a=rsa-sha256; cv=none; b=bh7MAoem9I2HNUzJhB+ydwf4bGmlc+F6yh51godgLTLKff57MWataE3PcBIb8oz+glNWrh Au/9EQMIaDzM2petwiv4LuH4kvQ2erBFuPpQu74kJ9KUZjXkZqlL8cVoagjL+q1FUCvQiY YhmbAz2QB1nL3MdOpNiqtMvvmIaoRISB9u0vc8yp8UFarAll/koKco3py9rvc7z05rBlGo ynidI8f/cM0CyGq+FfFgG+OD3RvDhQdkhAdxtCaFoCXrbazyWwMAD5t+OtwxM0WXDG362H piYlA5LdsxYk4v3TkIhaehUReBExOWc/96nNGayo3xoqfXixD78IdO2rLzN8sg== 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=1786074690; 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=GjrHuUzc+48T6jbT+MGBS2jBxQVqjGsTiD6+ZyvGapQ9r+FdR4J/WwxDhD2+6zZ5ulqJAY BFXRfoldxDsOLWrgrzjvd1cxTRO0t1wSPOp/1NkJ41OxH2RhZvHloDOF49odbOyJe/snYt 0zp6xf6cQVZCUPHJM/B09egZVzB7xaTuQOV3RETa/RwRHhV9sLIwLYNb7OEVEZaIxWjcJs 9g9LdgpEC3jDGZft5V++MNpfzt8GFDV3seDhHOP9ArHdoBUF8iztt4q+zVNg47EQZtCUvs Lw58v8IBq1TBpfVKn2MY9OhMz/m3l2YfqqYpDh5ULu3ullR5BJVBgmsGtgP+nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGVZB2LtHzqmP for ; Fri, 07 Aug 2026 03:51:30 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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);