From nobody Sun Aug 30 01:37: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 4hXZWG0BgNz6ptK9 for ; Sun, 30 Aug 2026 01:37: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hXZWF50F5z3sYk for ; Sun, 30 Aug 2026 01:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788053865; 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=OJvP1M8j9DKGa0vjRbmwhutyORlKd0k+9Nlf5jsG1Pg=; b=TUtDvgXbLnldukVeSesbHS59c8CBV+3bAcnUjzo67SVbVdnGOG/wC5pj8ku3rTiNCP/9wJ nVMPRL4DlSwGYo2dlN3chLq5fpFYrJl0pdMp//Om/URPPafW6etGrW79PWhfK3ZS2ZZasp xsuNCTx5ExaNMqF1FtKHuajzkeKc/RKj8YdcDQkGOArOq/UPZhEf1ayMP5QAgp1O9G9lYB ouKrLzWkGkFep81G7F0FB7m2lK73pWfFOpNB58YdTTRgtVMFEwhvSNJqjvceBhzyg71NmA 4AszeKKyi2QAVWke6f/OYTaAy3knM1A3E/2iHvZ7en98fzyY7gddVxQDsJ3dtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788053865; a=rsa-sha256; cv=none; b=cGWLXro+PL6YeX27AOYt/fo31qHoQ1pTw9f0L7csRBNlvfyk0ycei//uotcXqKw9IXqHjc ykYmSPz4l8WkUowTBWDsNF/BChNjso9s6d/TXc81iAJQqCmf6wkvKZ19+twA6d9T1Swx3D XPVjZJoCgQ4rx8edRo8ieNUNu80DGcujAEqziZJ+S2J2akGfHbInjqP9jVkMz1QsLTYNNE LIgBq2xKxAKi9fGgl9CAxu9ZiQxKTYQpRWUrLnMzS2P2DVXBvnQPWRwPr7qToISq+E9h1n PAuiWpYpUdos/B1G9Il1emFZI2d26u79QzxAbrRK6inOYXxZGK1z8aGvlBELhQ== 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=1788053865; 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=OJvP1M8j9DKGa0vjRbmwhutyORlKd0k+9Nlf5jsG1Pg=; b=PgowBPfFoUGiebHoLDVnq0a2x+FmvWtXBqPa96otARXDvqJYbiXlToRS2hQTib/EQ6DbPQ gX5QcExjs2F7ODQEHPqVrjcEduo8JTvtLH0MSfzSGEMDm5Jp+N2pq+iPF+b/HVW0O+INmf 13sNeqP9633nHqmsOxNEzV5EkSG5Yj8R+JLLRa/R5gpakhWsrzq3IaRNF5aSDHrl9wj0at DsL/2aY7+2mg8+AslTzikBMrarQfskPu3RScUZeiYeKOFViQm7FX0wxGyMg35EPbd3WyxU eA4v98t8BNYaCX2r5aUkY8K0882syIE2cw1K6BdlpjlFCBnviQOXbU2sHWsqCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hXZWF3Jsbz14N7 for ; Sun, 30 Aug 2026 01:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fab4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 30 Aug 2026 01:37:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 1b008564a31b - stable/15 - e1000: Report corrected I210 and I211 ECC 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1b008564a31b4baaaa3f9cb16fdf83c2b28967ba Auto-Submitted: auto-generated Date: Sun, 30 Aug 2026 01:37:45 +0000 Message-Id: <6a938969.3fab4.28cd686@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1b008564a31b4baaaa3f9cb16fdf83c2b28967ba commit 1b008564a31b4baaaa3f9cb16fdf83c2b28967ba Author: Kevin Bowling AuthorDate: 2026-08-12 18:34:15 +0000 Commit: Kevin Bowling CommitDate: 2026-08-30 01:16:01 +0000 e1000: Report corrected I210 and I211 ECC errors I210 and I211 do not interrupt for corrected internal ECC errors. Instead, the DMA packet-buffer and PCIe memories expose sticky status bits in PBECCSTS and PCIEECCSTS. Sample these bits with the regular hardware statistics update, preserve the I210/I211 PBECCSTS enable state while clearing its RW1C indication, and expose separate counters for the DMA packet buffer, PCIe transmit data, and PCIe retry buffer. The counters represent observed indications rather than exact error counts because multiple corrections between samples collapse into one sticky status bit. Hardware validation used an I210 revision 3. Unlike I225 and I226, the published I210/I211 register definitions do not expose self-clearing injectors for these corrected ECC memories. The three counter sysctls were present and remained zero under line-rate traffic and three fatal LAN parity recoveries. PBECCSTS.ECC_ENABLE remained set after every reset. Actual corrected-error accounting was therefore not injected. Sponsored by: BBOX.io (cherry picked from commit 0ea53a7123ffc1ea11daa748e7148ac8413fd2de) --- sys/dev/e1000/if_em.c | 40 ++++++++++++++++++++++++++++++++++++++++ sys/dev/e1000/if_em.h | 3 +++ 2 files changed, 43 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b9168a9a5bbe..0618995b5587 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1925,6 +1925,32 @@ em_update_pch_ecc_stats(struct e1000_softc *sc, u32 pbeccsts) E1000_PBECCSTS_UNCORR_ERR_CNT_SHIFT; } +static void +em_update_i210_ecc_stats(struct e1000_softc *sc) +{ + struct e1000_hw *hw; + u32 pbeccsts, pcieeccsts; + + hw = &sc->hw; + pbeccsts = E1000_READ_REG(hw, E1000_PBECCSTS_I210); + if (pbeccsts & E1000_PBECCSTS_I210_CORR_ERR) { + sc->corrected_error_dma_count++; + /* Preserve the enable bit while clearing the RW1C status. */ + E1000_WRITE_REG(hw, E1000_PBECCSTS_I210, + pbeccsts & (E1000_PBECCSTS_I210_ECC_ENABLE | + E1000_PBECCSTS_I210_CORR_ERR)); + } + + pcieeccsts = E1000_READ_REG(hw, E1000_PCIEECCSTS) & + E1000_PCIEECCSTS_CORR_MASK; + if (pcieeccsts & E1000_PCIEECCSTS_TX_WR_DATA) + sc->corrected_error_pcie_tx_data_count++; + if (pcieeccsts & E1000_PCIEECCSTS_RETRY_BUF) + sc->corrected_error_pcie_retry_count++; + if (pcieeccsts != 0) + E1000_WRITE_REG(hw, E1000_PCIEECCSTS, pcieeccsts); +} + /* * Fatal internal-memory errors stop part or all of the MAC. Capture the * read-clear indication before handing recovery to the iflib admin task. @@ -5371,6 +5397,8 @@ em_update_stats_counters(struct e1000_softc *sc) if (em_has_pch_ecc(&sc->hw)) em_update_pch_ecc_stats(sc, E1000_READ_REG(&sc->hw, E1000_PBECCSTS)); + else if (em_has_i210_memory_errors(&sc->hw)) + em_update_i210_ecc_stats(sc); } static bool @@ -5717,6 +5745,18 @@ em_add_hw_stats(struct e1000_softc *sc) "fatal_unknown", CTLFLAG_RD, &sc->fatal_error_unknown_count, "Fatal memory errors without a reported region"); + SYSCTL_ADD_UQUAD(ctx, memerr_list, OID_AUTO, + "corrected_dma", CTLFLAG_RD, + &sc->corrected_error_dma_count, + "Corrected DMA memory error indications"); + SYSCTL_ADD_UQUAD(ctx, memerr_list, OID_AUTO, + "corrected_pcie_tx_data", CTLFLAG_RD, + &sc->corrected_error_pcie_tx_data_count, + "Corrected PCIe transmit-data memory indications"); + SYSCTL_ADD_UQUAD(ctx, memerr_list, OID_AUTO, + "corrected_pcie_retry", CTLFLAG_RD, + &sc->corrected_error_pcie_retry_count, + "Corrected PCIe retry-buffer memory indications"); } } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index a75b3b1b290e..de0d078a4e72 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -629,6 +629,9 @@ struct e1000_softc { u64 fatal_error_pcie_count; u64 fatal_error_dma_count; u64 fatal_error_unknown_count; + u64 corrected_error_dma_count; + u64 corrected_error_pcie_tx_data_count; + u64 corrected_error_pcie_retry_count; u64 corrected_error_packet_buffer_count; u64 uncorrected_error_packet_buffer_count;