From nobody Mon Aug 24 09:14:17 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 4hT4wn516nz6p6bj for ; Mon, 24 Aug 2026 09:14:17 +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 4hT4wn32SXz3vq4 for ; Mon, 24 Aug 2026 09:14:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787562857; 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=1LSI+9hhzw+BDEmBHI0v2aPe3ql0jcJvlX2MRn+59GA=; b=ADd6BO5vZ3Q0rqwZxwkM0QIceFfeIpE+PJMO3ep/8Oa1VSK7GFD1Km0fW7SFNtRvibCFpR eetERYEjGodqnggjim71X7e7vpNciGh/aaW59yM7yg1an3ulIBnHGgTAtb7vZS9zcSx61S 1Bp8X2Dw90jrIw2xlcVkKiFI43R44ECJBlaExAcPzmKcbKIZTHeHTuC//MPQFBBnrS0kqR qjckupiI+XZN1SWYb9uTGXLYQuqrLOG8Myl1SXxeheL2CEsNl0xYnz6KcfMfSfzGdSYXjd vuRiydXkqP6IK3vJhqOglBnlcj3nEcu9ivZ06Q57yJBEIYu4xGCoP8ZvbIn5VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787562857; a=rsa-sha256; cv=none; b=PB5JXHC+pbv2oBTbwJcdyTOrqqS9JjLIiyZrFu3qCQSxkzoI/KYpTzAZt3rIo3UnK16SJL 6kvGAEtvYu3C3AUF0xnFPUU0bZd3v2kxgYzUN7MwagPYJbTN7Ou3mj2fO7OThZsF2lTF7/ nBszm7kvVtD4zkV0A7OFzOdTwsIZP5noN7YdBvHTiVI5G8rZF73hqM4xV0TJSbsu4V8m7h yEjkVjFBUGlwWdAFiEBelofqMjFTulKHeH3W/AVFojqaJSetI8drK2rqx1xFnQXExCDCJQ +K0NZizOGoQSaWK3yM5FgAx8J+7sZ4xvdm2ygy2seDoFyUv6yFEMUCu5AdrYlQ== 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=1787562857; 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=1LSI+9hhzw+BDEmBHI0v2aPe3ql0jcJvlX2MRn+59GA=; b=oHorPXC9Ja39lpxsy6VhOEauVWYH7OsLR3cbSUZHUMQae8OnTZGZYcaQk1NYiJwrjWeyxK PAmNbMDsWvPaVZXiewKoka+F3594EPXg6iua4nXAOP6IOX7J2tI4et5JSbjsdy+hv96g8H mBgbmWZt3vwBmEfDa01pFKJ0cTPZKzAkhS7jTC5h86H7CJ9ZeSP98ZbpihZN0R+d1cTBtE 1MewC++LKZT6yJcSxAvT3pb3JvJZ8vn1Z9n6t6X2VfofVUXBaLczcPkOmGh8vpr5TftVRi C4zKrvxdMj0RxuOulSETLRxz4ZghTwVW612tbq5A+STuO7mvp0ZvRa/i04XFKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hT4wn22mBzy3j for ; Mon, 24 Aug 2026 09:14:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 190ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Aug 2026 09:14:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: d06f0c8ebe51 - stable/14 - ixl: Report PF initialization failures 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/14 X-Git-Reftype: branch X-Git-Commit: d06f0c8ebe51e966afd2969a16c7bd9795325ac9 Auto-Submitted: auto-generated Date: Mon, 24 Aug 2026 09:14:17 +0000 Message-Id: <6a8c0b69.190ee.7258f1e5@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d06f0c8ebe51e966afd2969a16c7bd9795325ac9 commit d06f0c8ebe51e966afd2969a16c7bd9795325ac9 Author: Kevin Bowling AuthorDate: 2026-08-10 03:41:08 +0000 Commit: Kevin Bowling CommitDate: 2026-08-24 09:12:22 +0000 ixl: Report PF initialization failures to iflib ixl_if_init() returned early after AdminQ reconstruction, LAA, or VSI initialization failures. Since IFDI_INIT has no return value, iflib then marked the interface RUNNING and enabled its interrupts and timers despite the incomplete hardware state. Use iflib_init_failed() on each incomplete path. Also stop at the first ring-enable error and tear down any partially enabled rings before reporting failure. This keeps the interface stopped and makes a later initialization attempt start from a bounded state. (cherry picked from commit f008b582c9f1e1a636e88a5f330ff3a167094440) --- sys/dev/ixl/if_ixl.c | 29 ++++++++++++++++++++--------- sys/dev/ixl/ixl_pf_iflib.c | 14 ++++++++++---- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index aa2e69ea0b5a..bc929753944b 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -959,7 +959,7 @@ ixl_if_init(if_ctx_t ctx) int ret; if (IXL_PF_IN_RECOVERY_MODE(pf)) - return; + goto fail; /* * If the aq is dead here, it probably means something outside of the driver * did something to the adapter, like a PF reset. @@ -967,23 +967,25 @@ ixl_if_init(if_ctx_t ctx) */ if (!i40e_check_asq_alive(&pf->hw)) { device_printf(dev, "Admin Queue is down; resetting...\n"); - ixl_teardown_hw_structs(pf); - ixl_rebuild_hw_structs_after_reset(pf, false); + (void)ixl_teardown_hw_structs(pf); + ret = ixl_rebuild_hw_structs_after_reset(pf, false); + if (ret != 0) + goto fail; } /* Get the latest mac address... User might use a LAA */ bcopy(if_getlladdr(vsi->ifp), tmpaddr, ETH_ALEN); if (!ixl_ether_is_equal(hw->mac.addr, tmpaddr) && (i40e_validate_mac_addr(tmpaddr) == I40E_SUCCESS)) { - ixl_del_all_vlan_filters(vsi, hw->mac.addr); - bcopy(tmpaddr, hw->mac.addr, ETH_ALEN); ret = i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_ONLY, - hw->mac.addr, NULL); + tmpaddr, NULL); if (ret) { device_printf(dev, "LLA address change failed!!\n"); - return; + goto fail; } + ixl_del_all_vlan_filters(vsi, hw->mac.addr); + bcopy(tmpaddr, hw->mac.addr, ETH_ALEN); /* * New filters are configured by ixl_reconfigure_filters * at the end of ixl_init_locked. @@ -995,7 +997,7 @@ ixl_if_init(if_ctx_t ctx) /* Prepare the VSI: rings, hmc contexts, etc... */ if (ixl_initialize_vsi(vsi)) { device_printf(dev, "initialize vsi failed!!\n"); - return; + goto fail; } ixl_set_link(pf, true); @@ -1018,7 +1020,12 @@ ixl_if_init(if_ctx_t ctx) else ixl_init_tx_rsqs(vsi); - ixl_enable_rings(vsi); + ret = ixl_enable_rings(vsi); + if (ret != 0) { + device_printf(dev, "enable rings failed: %d\n", ret); + ixl_disable_rings(pf, vsi, &pf->qtag); + goto fail; + } i40e_aq_set_default_vsi(hw, vsi->seid, NULL); @@ -1036,6 +1043,10 @@ ixl_if_init(if_ctx_t ctx) "initialize iwarp failed, code %d\n", ret); } #endif + return; + +fail: + iflib_init_failed(ctx); } void diff --git a/sys/dev/ixl/ixl_pf_iflib.c b/sys/dev/ixl/ixl_pf_iflib.c index 8289cc72bc64..1f48519344f7 100644 --- a/sys/dev/ixl/ixl_pf_iflib.c +++ b/sys/dev/ixl/ixl_pf_iflib.c @@ -875,15 +875,21 @@ int ixl_enable_rings(struct ixl_vsi *vsi) { struct ixl_pf *pf = vsi->back; - int error = 0; + int error; - for (int i = 0; i < vsi->num_tx_queues; i++) + for (int i = 0; i < vsi->num_tx_queues; i++) { error = ixl_enable_tx_ring(pf, &pf->qtag, i); + if (error != 0) + return (error); + } - for (int i = 0; i < vsi->num_rx_queues; i++) + for (int i = 0; i < vsi->num_rx_queues; i++) { error = ixl_enable_rx_ring(pf, &pf->qtag, i); + if (error != 0) + return (error); + } - return (error); + return (0); } int