From nobody Wed Aug 26 00:57:06 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 4hV5pC2Mb3z6qL8Y for ; Wed, 26 Aug 2026 00:57:07 +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 4hV5pB4lYvz3vZ9 for ; Wed, 26 Aug 2026 00:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787705826; 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=xgmceD9FRtFNr7CA9D5b+vHrCm3VMD/gzNm8q9VmaTM=; b=p6kciBefTOmSi5ERVPmcVUgWQRrveTUl7jt4aRlo3UwvqrHJMF5YRHJ0IK0XVCTEkD69vX mh5cnjg2HwTluHWxvbaTxl0AhJ8rRd+kD3H/zXhGCkFjwIPrxgP0D3+2YbPY7bruREZDjN NzJpLFdzXeAuP0AmvNM33DpLtAOxEsyiD8G7oOKMe0Xl70J5yeHpDKj+Ygeu9Wjtejv9Pn QIDtdi3myImZ6uHf6DP3fZO4MhZfafH4eoEqET0ACXtVX8/uPsG4JNIJZfv95CgHT1/g7a usMSx7siWE0w9vW5XEI2vo3LjBJMcgKgXaJmI2+WwU1Qm6hWzvJkws0T98jtig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787705826; a=rsa-sha256; cv=none; b=xFat6Z4X1FtpBbUQmH40s7YdTTfIUvN91k5trTYwKRYcdGruE0glyTP/FP/gi626RId35W 3tDHjc8b1B6SAkdWuVeaxBhe7mZchlU1Tva1GmNZ/3jKGCZivIyOukVCL/CkS4KGEznJU+ d+ln3XTXjWU4TDXnQ+aif2EhuEuvzNY8xafHBougLl7z8kmI2GwfHOE32URYrF9SNlSOpE 0HRT4v5P/WeaH7yf9J4ZjDuRytPHq9UPrjPHp6FKTMLhrODgof5NAAICaQlInQSzA2s+vQ RYrXlwsy+jn7E7TWUbtn21u6rlY0nbOsk59D+aARiAJ1XNc/3tPXv6i1Z174CA== 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=1787705826; 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=xgmceD9FRtFNr7CA9D5b+vHrCm3VMD/gzNm8q9VmaTM=; b=i5rDnQE9nRvTtQOGBGrlMCtZpW1XvCgV02I5TcW7D+H+eic6bcItLs9ih5nEqTaQmYNDz/ QFDgZcIFCUfHML+UjjINLmpyTtYo0Ds0VqhY9BVKTza56a9mUrKHFSWXlvaQ4hrEeyqnjN PzUyooQO8rLawyKNlfrwjmc2/PbneYsYiwV5OY0R7H26Ghvjl1UrJg/lCsKpfClXgc6EVb LSz+9DqXjFOt6hVqVupk1BZCpmehbTxvvOvQUs3esGBH7jZAhgMqq7LFwwqTOFymlrP3um /lHwS1oLLQBS5snXvtLVk7kUHfnUJiZR1eXwBrVp45HV9k8sqvNq99ka4JHIlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hV5pB3Vh4z17M for ; Wed, 26 Aug 2026 00:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4400c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Aug 2026 00:57:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 7ebe1e32f5d4 - stable/15 - ixgbe: Defer ECC recovery to iflib 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: 7ebe1e32f5d4ea8c92676ba11b238c1380032216 Auto-Submitted: auto-generated Date: Wed, 26 Aug 2026 00:57:06 +0000 Message-Id: <6a8e39e2.4400c.49ad562b@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7ebe1e32f5d4ea8c92676ba11b238c1380032216 commit 7ebe1e32f5d4ea8c92676ba11b238c1380032216 Author: Kevin Bowling AuthorDate: 2026-08-12 02:33:20 +0000 Commit: Kevin Bowling CommitDate: 2026-08-26 00:56:51 +0000 ixgbe: Defer ECC recovery to iflib The link interrupt filter performed a full hardware reset in interrupt context. This bypassed iflib stop and initialization, including queue quiescence and restoration of temporary LED state. Record the ECC event in the administrative request mask and ask iflib to perform the reset from its taskqueue. Keep the ECC cause masked until reset so the intermediate admin pass cannot re-enable a sticky condition. Handle ECC independently of Flow Director and in legacy interrupt mode. Remove the redundant EICR write; the filter has already cleared the reported causes. Also remove the accompanying complement-mask update of mac.flags. It set every flag except DOUBLE_RESET_REQUIRED and had no place in ECC recovery. (cherry picked from commit c28f2c551daf07345ac78b74459efe1014c49464) --- sys/dev/ixgbe/if_ix.c | 54 ++++++++++++++++++++++++++++++++++------------ sys/dev/ixgbe/ixgbe.h | 1 + sys/dev/ixgbe/ixgbe_type.h | 1 + 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index a1d64222a2e9..78fcabc3d68b 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -3140,6 +3140,25 @@ ixgbe_if_promisc_set(if_ctx_t ctx, int flags) return (0); } /* ixgbe_if_promisc_set */ +/************************************************************************ + * ixgbe_handle_ecc - Defer recovery from an ECC interrupt + ************************************************************************/ +static bool +ixgbe_handle_ecc(struct ixgbe_softc *sc, u32 eicr) +{ + struct ixgbe_hw *hw = &sc->hw; + + if ((eicr & IXGBE_EICR_ECC) == 0) + return (false); + + IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_ECC); + if (!atomic_cmpset_int(&sc->ecc_reset_pending, 0, 1)) + return (false); + + device_printf(sc->dev, "Received ECC Err, initiating reset\n"); + return (true); +} + /************************************************************************ * ixgbe_msix_link - Link status change ISR (MSI/MSI-X) ************************************************************************/ @@ -3178,21 +3197,17 @@ ixgbe_msix_link(void *arg) if ((sc->feat_en & IXGBE_FEATURE_FDIR) && (eicr & IXGBE_EICR_FLOW_DIR)) { /* This is probably overkill :) */ - if (!atomic_cmpset_int(&sc->fdir_reinit, 0, 1)) - return (FILTER_HANDLED); - /* Disable the interrupt */ - IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EICR_FLOW_DIR); - atomic_set_32(&sc->task_requests, IXGBE_REQUEST_TASK_FDIR); - } else - if (eicr & IXGBE_EICR_ECC) { - device_printf(iflib_get_dev(sc->ctx), - "Received ECC Err, initiating reset\n"); - hw->mac.flags |= - ~IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; - ixgbe_reset_hw(hw); - IXGBE_WRITE_REG(hw, IXGBE_EICR, - IXGBE_EICR_ECC); + if (atomic_cmpset_int(&sc->fdir_reinit, 0, 1)) { + /* Disable the interrupt */ + IXGBE_WRITE_REG(hw, IXGBE_EIMC, + IXGBE_EICR_FLOW_DIR); + atomic_set_32(&sc->task_requests, + IXGBE_REQUEST_TASK_FDIR); } + } + if (ixgbe_handle_ecc(sc, eicr)) + atomic_set_32(&sc->task_requests, + IXGBE_REQUEST_TASK_RESET); /* Check for over temp condition */ if (sc->feat_en & IXGBE_FEATURE_TEMP_SENSOR) { @@ -4820,6 +4835,7 @@ ixgbe_if_stop(if_ctx_t ctx) ixgbe_quiesce_vfs(sc); } ixgbe_reset_hw(hw); + atomic_store_rel_int(&sc->ecc_reset_pending, 0); hw->adapter_stopped = false; ixgbe_stop_adapter(hw); /* Turn off the laser - noop with no optics */ @@ -4966,6 +4982,11 @@ ixgbe_if_update_admin_status(if_ctx_t ctx) ixgbe_handle_phy(ctx); if (requests & IXGBE_REQUEST_TASK_LSC) check_link = true; + if (requests & IXGBE_REQUEST_TASK_RESET) { + /* Re-enter the admin task so it observes IFC_DO_RESET. */ + iflib_request_reset(ctx); + iflib_admin_intr_deferred(ctx); + } } /* Do not let a continuous producer monopolize the admin taskqueue. */ @@ -5111,6 +5132,8 @@ ixgbe_if_enable_intr(if_ctx_t ctx) /* Enable Flow Director */ if (sc->feat_en & IXGBE_FEATURE_FDIR) mask |= IXGBE_EIMS_FLOW_DIR; + if (atomic_load_acq_int(&sc->ecc_reset_pending)) + mask &= ~IXGBE_EIMS_ECC; IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask); @@ -5293,6 +5316,9 @@ ixgbe_intr(void *arg) (eicr & IXGBE_EICR_GPI_SDP0_X540)) { requests |= IXGBE_REQUEST_TASK_PHY; } + if (hw->mac.type != ixgbe_mac_82598EB && + ixgbe_handle_ecc(sc, eicr)) + requests |= IXGBE_REQUEST_TASK_RESET; if (requests != 0) { atomic_set_32(&sc->task_requests, requests); iflib_admin_intr_deferred(ctx); diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 6dfba9fda736..d8f383dfc867 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -459,6 +459,7 @@ struct ixgbe_softc { /* Flow Director */ int fdir_reinit; + u_int ecc_reset_pending; u32 task_requests; diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 85190dc59fdb..3ce32a3a9fe4 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -4613,5 +4613,6 @@ struct ixgbe_bypass_eeprom { #define IXGBE_REQUEST_TASK_PHY 0x10 #define IXGBE_REQUEST_TASK_LSC 0x20 #define IXGBE_REQUEST_TASK_FWEVENT 0x40 +#define IXGBE_REQUEST_TASK_RESET 0x80 #endif /* _IXGBE_TYPE_H_ */