From nobody Sun Aug 16 09:19:39 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 4hN9Qg59dhz6nlvM for ; Sun, 16 Aug 2026 09:19: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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hN9Qg4bRzz3P3J for ; Sun, 16 Aug 2026 09:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786871979; 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=C2ia9vhU8u3wNNMhbla/ws1E//ZNP7XAGRtHLC5g168=; b=jbEth9mtnHA+eH6BmTox2LInUbhTlDoOydIK19ZFwDQwi7oAPihe9OZLqS0HA5WHg/2kda S7+1MBCX9rVF2l5QBs15FQX22t8WF2YXken03rLXDq78KfbnAn/D0V56gCyjqirFXxBp8i gWkIsqf1oN9PcVOkCWtXSyfqapzAsr+h5LXakLVZX94cR5yd3FRBkJ14uT2xI44puhYxRJ Z3vl/lX7WVryO8xGJV+GvA7+3e6/ocmseziM2oXFsVtLof8jATg8ptkOZBugTTbCaRLJRj dXlgjfbe2qcqmM7fkhvNtk4Rup76DUoi9fTKO+k0hCaW33dVL5Yx+sDgm31BQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786871979; a=rsa-sha256; cv=none; b=b75/kprMnOyTXwvL6BTAXx4njdDQzIztFwXqtNK8el86BLCy7A6sZIONh3zljMvtzvIqUg OuCocd7N8TteYNWsO/BOk6cw3k8QDi3vxzYi8fKhl7UYaiPBGL9x21RQJn9MTVXXl5utSk uY+X4Zg2hDUxDAt32NKJAqTJHyToObIOLi14QL7dl4qodOrvWHW+cABCvV+gW9uCYpnhgn 4ma5R1mPPSEGebMRHPboHZGOe/X60L9J+0zlk5NQtAFw3xQJTKzzWb6RuwQsDZeGQS4G6j afQJZ1JkBQQpmNk4t4q7ZdynAjH3DqjWJf/h0c0D26I/+HR+lvSp2Zw/EaljHg== 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=1786871979; 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=C2ia9vhU8u3wNNMhbla/ws1E//ZNP7XAGRtHLC5g168=; b=oGCnRZ+n6nSF+W/KgXmHp956Wdw0O9K5b5JtzXrvdkpMHZLb6PEatFgaaEMgPfONNzIoWv iM0ZWP1T/ahmTguxQWLlxhW4Jv4/nt8tP/HoggFJvzUT7028XxkrgHZ+y8dXtc9E8ri0e9 KPxwx5I0BOKYpSdPxXvy2TDsHKAhEqWmmpYEAOH96UoVxU9Y0Gsj14McuBqxLI1kD4cu5w DjrwI7hpMDm1uI+KtsbOCsDTkBwPbFP/JNfJCdYRlLY6b9J6Ru6MSUqRu6nN3Wc+D8jxQC jPSLnzrPK+rEyfJmB889uFcUmufOq5nBTt3tLhJ0i9luN3tilCr5z9h+F+z0kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hN9Qg3cW1z69q for ; Sun, 16 Aug 2026 09:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f0a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 09:19:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 0ea53a7123ff - main - e1000: Report corrected I210 and I211 ECC errors 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: 0ea53a7123ffc1ea11daa748e7148ac8413fd2de Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 09:19:39 +0000 Message-Id: <6a8180ab.1f0a1.1a7dd5bb@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0ea53a7123ffc1ea11daa748e7148ac8413fd2de commit 0ea53a7123ffc1ea11daa748e7148ac8413fd2de Author: Kevin Bowling AuthorDate: 2026-08-12 18:34:15 +0000 Commit: Kevin Bowling CommitDate: 2026-08-16 09:18:18 +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. MFC after: 2 weeks Sponsored by: BBOX.io --- 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 4cc5dbd7b7ee..1d9ac22bb667 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -2229,6 +2229,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. @@ -5957,6 +5983,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 @@ -6412,6 +6440,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 1d1587331555..0dd413dafcc8 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -635,6 +635,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;