From nobody Thu Oct 29 06:41:31 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 4jFZQ36XVCz6xv0B for ; Thu, 29 Oct 2026 06:41:31 +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 4jFZQ33VCxz3MGq for ; Thu, 29 Oct 2026 06:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793256091; 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=HlG8cHuCKIhig32Ox4Wz3zlP2pTdNKlCuBbIsgFeuy8=; b=GOtFtnJ5CpYCI8eckl3pe7hjDev2rTWNgqZdE0wkuVjS2bWt3cs+6z11LStIEVkg1rSTTk 3FrofocDlZKSfyl/wnR6UBP2LR+ZGOHohdrRc9F4RgLbgLaD3L48h391Dfa5SHUl43PUYo aCoVhgyg0hALwhaLNALIiFLYbpTRHahWd/rd0WxgRlmnn5h4j/7berzmdjcBZ69cxusTCh vt9kUTJTLUmNFJziTEUrpnHln2UkxgJzf8t0HlQBlhreDUIFgUJUfMmz1212D9VWzsh//V IbRww5zfovgHQiAEp8pOJtiz4RUZ6NOhVev94Q7oNGMYYgSwX7X3pwuaSYxJ9g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793256091; b=IV6nEE740o7n6gL20TTJlxNN/IlmY45RTGMl4Cl5YVmjS6vSUyFyY5gJNALzjnEbGmewqK rrQiTUAVQkcZV1jM8AsFvtMGDj1k0aFvWLAePUO8RzOEDY/AC9C2wJkxb5qc28JaUZFblP VtZgTJi0Zh+/zIBFwHsQnS3kIv9G34pNXsMRBx0LvfdT8gFMgpc7qFjLYvHPgslSO9oAqE 9T5R93fAS3BlAR3Mzy+Ehv0dNsrTbwSjV3erk4GNF+Nf93mJZiZypjUdjsgZqwgTeCZ6Oj cZajSkn55taZ26Bb+peQj2gHxeMMfiwbeRiJJOqAXYvXaMhbsFqjM613wAVGfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793256091; 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=HlG8cHuCKIhig32Ox4Wz3zlP2pTdNKlCuBbIsgFeuy8=; b=HKu0w5DCrI2apGBTbBeBZn2dYeMWFirJnrreON2EQT0AnVZRY4jCnKT1a5xem84mKaccGM LialmDaqzoumGK3QM9KD2dpXkbqbtADLtK6eGmXuNSihST6lGyUvuOiG8vU3UludwlJWo/ HIJmPW43EDTNSMfHtGucJOiCGV98mFJQzH+fQ/JFM01uSwLiiXH2hPScdnbb59W37rHb4X QyCdEHwVdAzT70DeRn+pe4WQYXdqSGwvAPJGIs9qNOSbXNTJ8xTSgAYnHfhhCgYDYbHwVO NSzTbs7crdR4F4zgGlji1MkGK/xFzgNlku+cxqrotiA61gP4/R/q6Bk3s8YRAw== 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 4jFZQ32kcGzRqP for ; Thu, 29 Oct 2026 06:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dabf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:41:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 3794c0bd0b8c - stable/15 - ice: Add VF reset and policy failure injection 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: 3794c0bd0b8c24b6a43e1a54cc14fab1c79a6b63 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:41:31 +0000 Message-Id: <6ae2ea9b.3dabf.66f4e577@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=3794c0bd0b8c24b6a43e1a54cc14fab1c79a6b63 commit 3794c0bd0b8c24b6a43e1a54cc14fab1c79a6b63 Author: Kevin Bowling AuthorDate: 2026-08-19 03:41:02 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 06:40:56 +0000 ice: Add VF reset and policy failure injection Extend the optional ICE failure-injection facility with points for the MAC anti-spoof firmware update and each mandatory VF reset stage. The reset points report a failed Tx drain command, VFR timeout, receive queue disable, or final PCIe transaction drain after the corresponding hardware operation. This permits fail-closed state and recovery tests without deliberately leaving live DMA during teardown. The points remain absent unless the kernel is built with options DRIVER_FAILPOINTS and retain the existing PF and VF selectors. Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59025 (cherry picked from commit 31fb4efd211cbb2ea79463c6e8522bb362e29129) --- sys/dev/ice/ice_iov.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/sys/dev/ice/ice_iov.c b/sys/dev/ice/ice_iov.c index ae56395aa776..68cfae7197db 100644 --- a/sys/dev/ice/ice_iov.c +++ b/sys/dev/ice/ice_iov.c @@ -265,6 +265,9 @@ ice_iov_configure_mac_anti_spoof(struct ice_softc *sc, struct ice_vf *vf) struct ice_vsi *vsi = vf->vsi; struct ice_hw *hw = &sc->hw; bool enable; +#ifdef DRIVER_FAILPOINTS + int error; +#endif int status; enable = (atomic_load_acq_32(&vf->vf_flags) & @@ -277,6 +280,8 @@ ice_iov_configure_mac_anti_spoof(struct ice_softc *sc, struct ice_vf *vf) else ctx.info.sec_flags &= ~ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF; + ICE_IOV_FAIL_POINT(sc, vf->vf_num, mac_anti_spoof_update, error, + fail); status = ice_update_vsi(hw, vsi->idx, &ctx, NULL); if (status != 0) { device_printf(sc->dev, @@ -289,6 +294,11 @@ ice_iov_configure_mac_anti_spoof(struct ice_softc *sc, struct ice_vf *vf) vsi->info.sec_flags = ctx.info.sec_flags; return (0); + +#ifdef DRIVER_FAILPOINTS +fail: + return (error); +#endif } /** @@ -864,6 +874,11 @@ ice_reset_vf(struct ice_softc *sc, struct ice_vf *vf, bool trigger_reset, /* This zero-queue command is required to complete every VF reset. */ status = ice_dis_vsi_txq(hw->port_info, vf->vsi->idx, 0, 0, NULL, NULL, NULL, ICE_VF_RESET, vf->vf_num, NULL); + ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov, + vf_reset_tx_disable, ice_iov_fail_vf_matches(vf->vf_num), + FAIL_POINT_NONSLEEPABLE, { + status = ICE_ERR_AQ_ERROR; + }); if (status) { device_printf(sc->dev, "%s: Failed to disable LAN Tx queues: err %s aq_err %s\n", @@ -884,6 +899,11 @@ ice_reset_vf(struct ice_softc *sc, struct ice_vf *vf, bool trigger_reset, DELAY(ICE_VPGEN_VFRSTAT_WAIT_DELAY_US); } + ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov, + vf_reset_vfr_timeout, ice_iov_fail_vf_matches(vf->vf_num), + FAIL_POINT_NONSLEEPABLE, { + reset_done = false; + }); if (!reset_done) { device_printf(sc->dev, "VF-%d Reset is stuck\n", vf->vf_num); @@ -899,6 +919,12 @@ ice_reset_vf(struct ice_softc *sc, struct ice_vf *vf, bool trigger_reset, /* Hardware resets Tx queues; the PF must disable every Rx. */ for (bit = 0; bit < vf->vsi->num_rx_queues; bit++) { status = ice_control_rx_queue(vf->vsi, bit, false); + ICE_FAIL_POINT_CODE_COND(sc, + _debug_fail_point_ice_iov, vf_reset_rx_disable, + ice_iov_fail_vf_matches(vf->vf_num), + FAIL_POINT_NONSLEEPABLE, { + status = EIO; + }); if (status != 0) { device_printf(sc->dev, "Unable to disable VF-%d Rx queue %d: %s\n", @@ -918,6 +944,11 @@ ice_reset_vf(struct ice_softc *sc, struct ice_vf *vf, bool trigger_reset, break; DELAY(ICE_PCI_CIAD_WAIT_DELAY_US); } + ICE_FAIL_POINT_CODE_COND(sc, _debug_fail_point_ice_iov, + vf_reset_pcie_pending, ice_iov_fail_vf_matches(vf->vf_num), + FAIL_POINT_NONSLEEPABLE, { + i = ICE_PCI_CIAD_WAIT_COUNT; + }); if (i == ICE_PCI_CIAD_WAIT_COUNT) { device_printf(sc->dev, "VF-%d PCI transactions remain after reset\n", vf->vf_num);