From nobody Thu Oct 29 06:36:03 2026 X-Original-To: dev-commits-src-branches@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 4jFZHm1yB6z6xthR for ; Thu, 29 Oct 2026 06:36:04 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFZHm0Nf5z58t8 for ; Thu, 29 Oct 2026 06:36:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793255764; 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=8dinRtfuWssabwv0GVxT/CJPzCJChLA7QgEhomhOXJo=; b=hSRvEEqi1vD8IC+HlwpGkm/IYqldbhP7/UYNEXLUcv92kovipNl6KfWN3QdqMNafol7Qmi 2DyCbiSTvl+4MvgEIbAaZoWVgXZuKa5p5Byk80ima5gunvuAr/5pZLKqsKs/FiDNk0LKAm sAX/Aa2TNBrIDBRL+LQFasBsQsH/j+c+djaLtLrafdUWGVRd9F4arlxQyrbFg+IaNHQGlk x/1RxpKDeQAW1CAtGbqLOCthX9McoYOozJEwUkA2qt5OwZdSYeEg8QR3Eq/XzpfkhRm+wE pjePNZJkENPugPvVmWrbX/gb8OoOrzdz0ywBPX9M62vFACsjl49DSSzTA1SCYQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793255764; b=AtkWsCa11y9DV2lBzLkOjKO7lxAoBxBWSctEltaGljdDNbWkMjs+HmCzFq/OuJCoEwacmV iMuyHyg7c2R7bsCV9fLo/mALAKsHbrIRydN+Emow8agL+ipxcfSJZR/9yMh/+7eNrR0yzu tHFBPm8AE7MCnEXcYaphEg0Bw+N+kUY3UtpAxypnCZEpOHUQRezGfRxv33h9XpX+Wg6BXU XH4Y7cTJBUaMX6grkyPxab1VSiB3/+A4XS/qkdGnXwmXRjcPxpXlbw0XEEwSiKcEbugEGV vLtKRWRzeOst+fjuBUS+l6NqEuPbRe9wTDsOTXajK6tsUUdQAA1S9tkr3Ke1ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793255764; 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=8dinRtfuWssabwv0GVxT/CJPzCJChLA7QgEhomhOXJo=; b=jZip6RQz/ytFNJbkBEDe9ljN+M1otT62B1ihqbV3rAUr1EVcnuF0jXzzA47aQwFZ011ldG b+hhuQqDCeBCYUNwnLLhYjvyThYbpGys31HwiH7M/C2qUwfCoxxaZx8vFPw0RkKVSNLEjp fCyb8rtNMujV7Gbu2KzhKZl5NREyulLbdXCKCfDYnxu7dE41hLQnmZGV14myssKifqsxF0 oqUWkT7C7c3Rl32QrG683LnCxhqtCiXD04vvwq3kwHhm8UII250ClHG3rg1OM27m25goJB crZ62UEiJhOtv5127VUykp7PSYxcFTkskyys4SFtlvVVdQe1QC3CT891xgHnGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFZHl6bLpzRkg for ; Thu, 29 Oct 2026 06:36:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c67b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:36:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 63f9f130cb9e - stable/15 - ice: Defer RDMA critical error notifications List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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: 63f9f130cb9e1d6c6a102750af37dcdfd3cf1a5c Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:36:03 +0000 Message-Id: <6ae2e953.3c67b.7c1c1b7e@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=63f9f130cb9e1d6c6a102750af37dcdfd3cf1a5c commit 63f9f130cb9e1d6c6a102750af37dcdfd3cf1a5c Author: Kevin Bowling AuthorDate: 2026-09-03 12:01:18 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 06:35:54 +0000 ice: Defer RDMA critical error notifications ice_msix_admin() runs as an interrupt filter inside a critical section. ice_rdma_notify_pe_intr() acquires the global RDMA sx and invokes the client event handler, both of which require sleepable thread context. A PE or HMC critical error could therefore panic under WITNESS or sleep from interrupt context. Accumulate OICR causes atomically in the interrupt filter and mark them pending in the driver state. Deliver the notification from the iflib admin task before processing reset events. This preserves the existing ordering, lets an iRDMA-requested reset run in the same admin pass, and coalesces causes from multiple interrupts. Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59340 (cherry picked from commit aae5b168820a9c39e39c6dff2f31df0522f91901) --- sys/dev/ice/ice_iflib.h | 3 +++ sys/dev/ice/ice_lib.h | 1 + sys/dev/ice/ice_strings.c | 2 ++ sys/dev/ice/if_ice_iflib.c | 29 ++++++++++++++++++++++++++++- 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/sys/dev/ice/ice_iflib.h b/sys/dev/ice/ice_iflib.h index 3e3d4e5f8d84..fe1f53f4cb68 100644 --- a/sys/dev/ice/ice_iflib.h +++ b/sys/dev/ice/ice_iflib.h @@ -253,6 +253,7 @@ struct ice_mirr_if { * @pf_imap: interrupt mapping for PF LAN interrupts * @lan_vectors: # of vectors used by LAN driver (length of pf_imap) * @ldo_tlv: LAN Default Override settings from NVM + * @rdma_oicr: pending PE/HMC interrupt causes for the RDMA client * * ice_iov.c requires the following parameters (when PCI_IOV is defined): * @vfs: array of VF context structures @@ -333,6 +334,8 @@ struct ice_softc { /* driver state flags, only access using atomic functions */ u32 state; + /* pending RDMA OICR causes, only access using atomic functions */ + u32 rdma_oicr; /* NVM link override settings */ struct ice_link_default_override_tlv ldo_tlv; diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index be4cc674556b..2562a9e2476f 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -695,6 +695,7 @@ enum ice_state { ICE_STATE_CONTROLQ_EVENT_PENDING, ICE_STATE_VFLR_PENDING, ICE_STATE_MDD_PENDING, + ICE_STATE_RDMA_PE_INTR_PENDING, ICE_STATE_RESET_OICR_RECV, ICE_STATE_RESET_PFR_REQ, ICE_STATE_PREPARED_FOR_RESET, diff --git a/sys/dev/ice/ice_strings.c b/sys/dev/ice/ice_strings.c index 09adf47a33f2..f80d8f85d070 100644 --- a/sys/dev/ice/ice_strings.c +++ b/sys/dev/ice/ice_strings.c @@ -1012,6 +1012,8 @@ ice_state_to_str(enum ice_state state) return "VFLR_PENDING"; case ICE_STATE_MDD_PENDING: return "MDD_PENDING"; + case ICE_STATE_RDMA_PE_INTR_PENDING: + return "RDMA_PE_INTR_PENDING"; case ICE_STATE_RESET_OICR_RECV: return "RESET_OICR_RECV"; case ICE_STATE_RESET_PFR_REQ: diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 492c2a232f17..4684f0d94111 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -131,6 +131,7 @@ static void ice_free_pci_mapping(struct ice_softc *sc); static void ice_update_link_status(struct ice_softc *sc, bool update_media); static void ice_init_device_features(struct ice_softc *sc); static void ice_init_tx_tracking(struct ice_vsi *vsi); +static void ice_handle_rdma_pe_intr(struct ice_softc *sc); static void ice_handle_reset_event(struct ice_softc *sc); static void ice_handle_pf_reset_request(struct ice_softc *sc); static void ice_prepare_for_reset(struct ice_softc *sc); @@ -1382,7 +1383,8 @@ ice_msix_admin(void *arg) if (oicr & PFINT_OICR_HMC_ERR_M) /* Log the HMC errors */ ice_log_hmc_error(hw, dev); - ice_rdma_notify_pe_intr(sc, oicr); + atomic_set_32(&sc->rdma_oicr, oicr); + ice_set_state(&sc->state, ICE_STATE_RDMA_PE_INTR_PENDING); } if (oicr & PFINT_OICR_PCI_EXCEPTION_M) { @@ -2405,6 +2407,28 @@ ice_transition_safe_mode(struct ice_softc *sc) ice_clear_bit(ICE_FEATURE_RSS, sc->feat_en); } +/** + * ice_handle_rdma_pe_intr - Notify RDMA of deferred PE/HMC errors + * @sc: device private softc + * + * Deliver PE and HMC error notifications from the admin task because the + * RDMA notification path takes a sleepable lock. Multiple OICR causes which + * arrive before the task runs are accumulated by the interrupt filter. + */ +static void +ice_handle_rdma_pe_intr(struct ice_softc *sc) +{ + u32 oicr; + + if (!ice_testandclear_state(&sc->state, + ICE_STATE_RDMA_PE_INTR_PENDING)) + return; + + oicr = atomic_readandclear_32(&sc->rdma_oicr); + if (oicr != 0) + ice_rdma_notify_pe_intr(sc, oicr); +} + /** * ice_if_update_admin_status - update admin status * @ctx: iflib ctx structure @@ -2444,6 +2468,9 @@ ice_if_update_admin_status(if_ctx_t ctx) } } + /* Notify RDMA before handling a reset it may request. */ + ice_handle_rdma_pe_intr(sc); + /* Handle global reset events */ ice_handle_reset_event(sc);