From nobody Mon Aug 10 10:04:14 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 4hJVht6qwvz6nWBh for ; Mon, 10 Aug 2026 10:04:14 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hJVht5ZmDz3tD0 for ; Mon, 10 Aug 2026 10:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786356254; 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=tlWxuqMXfj7/yMZpRJoiRyO8ASN9b5GnlxIA0FLdeC0=; b=KkDo/ylRaW54YBtL3Uu3fehd1UJMev96eCWSjKGLKFI1B4FGXj4isIt5Nm5n8StaOecxv1 JdA512I5RnL0qrOamCkbgwL2lrnbMNZ8EK5dYUo12hdSg/P93YWCehNA4pD6J3ghsU/23b aFdi1d1FHJLdnQBgoa742WlVUXl+ugpK5atimIhI4UzE7QHALu/sX6M3mIILnufk75e+qi BK9pzrU1LFaOvgmOLcOA3LNMfU7we81dZpLlIjxAc3g3vNPx1CjbODEM6f7d3/Kb6x4in7 AtiS2UatIBU5FtcsG/6VNNEPBRCV24zTWofPuIm3N7wnYwhsaxspPbRlkg0jng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786356254; a=rsa-sha256; cv=none; b=id41n5dElJ95ZrMqFOxCpdpoEW+ghsEOtK/OaApmJkpLM10Qg3rs8gBWFCq3wDwNyFPrrm Y+HxOW1oE5JMavnz1rBWcKVQa0/HBU3MDavyxg3Iu2l4oLZwGlS4wCCzZ77Xq5mLxNcNUo BI0mzOny3HLD6TLAVPMskx9io+Z7WdydAII4onpxI8Q0/6p4c+3jfR0SuWWZaHnGsAsgQg jX1VI/4/oHZmQEixVJCtJM3r7HXFDqM1UVpbitwrbTWTqbCiFXI/35J5LvV5mMB1k3YLfi Xr0xzHJ4wjGpzmqmmsCwT5kHSseANpL5XQ3LBqHYxYZSpxZrqlpewKjlfGXDlw== 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=1786356254; 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=tlWxuqMXfj7/yMZpRJoiRyO8ASN9b5GnlxIA0FLdeC0=; b=hF9B+4LEHHjLRcKZrDbb6HBdSLTuMxg8t8dS6UvNHabtCxJvTKKb9wotBh6fBTkY6ykrmg e2LC/Cuw0s6k1TVQyVi6+T7zIahBiHuVzaPmXEwBqjybsfurW+7YX7fTK92uspCOd+thk+ yydUy0MV0uIoWvTWva6JfLJsnGQFXNsIswAjIYQQmI2cDfKtBuwmIcUYDz03YwiaZDaoDp NfUm7YK2b96daMR4H4wX0KHA25CTMT6CDgYqet0L4X5qOl6MlvuIETQjkMEVgznjHkjX4q yt+Q3oD1CeJU335FA5iVMiqOKIBoHu2osSfyPyRnyZQFQlDTYGfBPvVSeb1xUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hJVht4Ndsz13yY for ; Mon, 10 Aug 2026 10:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 362f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 10 Aug 2026 10:04:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: f008b582c9f1 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f008b582c9f1e1a636e88a5f330ff3a167094440 Auto-Submitted: auto-generated Date: Mon, 10 Aug 2026 10:04:14 +0000 Message-Id: <6a79a21e.362f7.e37f82d@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f008b582c9f1e1a636e88a5f330ff3a167094440 commit f008b582c9f1e1a636e88a5f330ff3a167094440 Author: Kevin Bowling AuthorDate: 2026-08-10 03:41:08 +0000 Commit: Kevin Bowling CommitDate: 2026-08-10 10:03:43 +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. MFC after: 2 weeks --- 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 0c95838ce3ed..b7234cf89bef 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -961,7 +961,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. @@ -969,23 +969,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. @@ -997,7 +999,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); @@ -1020,7 +1022,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); @@ -1038,6 +1045,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