From nobody Thu Sep 17 06:21:07 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 4hllxw1llmz6sVyM for ; Thu, 17 Sep 2026 06:21:08 +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 4hllxw19VKz4bSV for ; Thu, 17 Sep 2026 06:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789626068; 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=3r2m2l67NMfaefhDDn98CnEzJLUQ7NR1hYUNVFbPWQ8=; b=SGyTl630NkNKH04BKvnuIGpInYWvIE3sKAl7LOK+Fp35eyQ7lWXpHh7E10LTKBcQc3H44L CIkstS9ZGIDeAL5ih2D359kUb0t9OdqimYV2qgYTVHY9dbs7yFqC4wDiFVo1yLNixQ8DBq +dlzkvnkVeyYzswPsfySZCd1+yQSJQrx9faieUG3pbY0WfJOTIpAqAbOtr8ZWLbUNIqJRX hIIcmJOHlDP6s4JISMR75GUGVYx2Zeus+UNI387olAJoa55m/d/HbCm54dpRoc7xrGKuXi ULKqoqBUkjaTI+BpDAIjwnGRsXhc9yHoT/TiIcCckk7/PekYGyREpOuloR1jgg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789626068; b=wyosNzGv8mWr9rMBT1QxBXVJYMR+5Cj4EfgkIoQWqoxvVL1q0rm05MYqj1yUS0fww+xT+0 0b1NkuQpOXyKLZ1FqTV7Wiy9N9pWt54FXv1S6oF/toa4qf2pLeQMSWjhmp7CfxIp0aW6wl tTLcRHu0/D3h7qVFnW8lyzsypUNP1dYI/WHsMDEuTG7IBDwetgtsE2hvFUclXwbfuvlp0w wWLw/Jfm3auTzPfIez7d7tDUN8mDd63bxf6HDCJ2QdtYiEQqiDzXSoed8MSDJmY9J7KvQc V9QNcFyP0+dp1FrNR6VhNA6b47tSZynO39LKVKQTIUmCegeBEfPVjVm0OzrmMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789626068; 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=3r2m2l67NMfaefhDDn98CnEzJLUQ7NR1hYUNVFbPWQ8=; b=N/0fvaVYs1SAMIfT3jCp7QWLxKSw9s3yAx/8Qplglz1pqBvZRqigxJbxZGTm2d1v5f9ZT2 YgHU6XRzzAoq1x6N5XUo5iRMTeotQsTScJlQZ7avW1u+Ur6TwqjU6CDN23NNuphkcSm9wZ HWjdc6pGJrQPNThJTycMtCcVcIYn0TshQGhtTHDGbZkFywjgWyOKcBecS0fXRNvlIrTHDN mzpaA2R9b96PZer6YQkIIKn84WisuGz7G0yUFVQ/4+fH9OKXln0rpbKadGfEMjdx2OLP+H 3vqsfU3Yw+C9c0VHEs0wc2BSOgFQg/OOoerHdG4yZJam7H6FeqtYxODuS66w1Q== 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 4hllxv7246zL1s for ; Thu, 17 Sep 2026 06:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2545e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 06:21:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: fc809d6a6191 - main - ice: Quiesce queues after partial initialization 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/main X-Git-Reftype: branch X-Git-Commit: fc809d6a6191ef4e881119ec00ea752d1ed6cc37 Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 06:21:07 +0000 Message-Id: <6aab86d3.2545e.36a2f8d6@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fc809d6a6191ef4e881119ec00ea752d1ed6cc37 commit fc809d6a6191ef4e881119ec00ea752d1ed6cc37 Author: Kevin Bowling AuthorDate: 2026-09-03 06:05:23 +0000 Commit: Kevin Bowling CommitDate: 2026-09-17 06:20:18 +0000 ice: Quiesce queues after partial initialization ice_if_init marks DRIVER_INITIALIZED only after all queue and filter operations succeed, so ice_if_stop intentionally does nothing after an initialization failure. Each failure path must therefore unwind any hardware queues it may have configured before iflib releases their DMA mappings. Tx setup enables firmware scheduler queues one at a time, and Rx enable similarly processes queues incrementally. Route failures from both operations through cleanup paths for both the PF and mirror VSIs. The cleanup helpers tolerate queues which were not configured, so they also cover failures on the first queue. This leaves failed initialization stopped as required by the iflib_init_failed contract. MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59331 --- sys/dev/ice/ice_lib.c | 4 ++-- sys/dev/ice/if_ice_iflib.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index b14f63de4069..4c1b48db18e1 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -1929,7 +1929,7 @@ ice_control_rx_queue(struct ice_vsi *vsi, u16 qidx, bool enable) int ice_control_all_rx_queues(struct ice_vsi *vsi, bool enable) { - int i, err; + int i, err = 0; /* TODO: amortize waits by changing all queues up front and then * checking their status afterwards. This will become more necessary @@ -1941,7 +1941,7 @@ ice_control_all_rx_queues(struct ice_vsi *vsi, bool enable) break; } - return (0); + return (err); } /** diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 88f2e276da69..4a8f35ac9aad 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -2121,7 +2121,7 @@ ice_if_init(if_ctx_t ctx) device_printf(dev, "Unable to configure the main VSI for Tx: %s\n", ice_err_str(err)); - goto err_init_failed; + goto err_cleanup_tx; } err = ice_cfg_vsi_for_rx(&sc->pf_vsi); @@ -2135,9 +2135,9 @@ ice_if_init(if_ctx_t ctx) err = ice_control_all_rx_queues(&sc->pf_vsi, true); if (err) { device_printf(dev, - "Unable to enable Rx rings for transmit: %s\n", + "Unable to enable Rx rings for receive: %s\n", ice_err_str(err)); - goto err_cleanup_tx; + goto err_stop_rx; } err = ice_cfg_pf_default_mac_filters(sc); @@ -4519,7 +4519,7 @@ ice_subif_if_init(if_ctx_t ctx) device_printf(dev, "Unable to configure subif VSI for Tx: %s\n", ice_err_str(err)); - goto err_init_failed; + goto err_cleanup_tx; } err = ice_cfg_vsi_for_rx(vsi); @@ -4535,7 +4535,7 @@ ice_subif_if_init(if_ctx_t ctx) device_printf(dev, "Unable to enable subif Rx rings for receive: %s\n", ice_err_str(err)); - goto err_cleanup_tx; + goto err_stop_rx; } ice_configure_all_rxq_interrupts(vsi); @@ -4544,6 +4544,8 @@ ice_subif_if_init(if_ctx_t ctx) ice_set_state(&mif->state, ICE_STATE_DRIVER_INITIALIZED); return; +err_stop_rx: + ice_control_all_rx_queues(vsi, false); err_cleanup_tx: ice_vsi_disable_tx(vsi); err_init_failed: