From nobody Mon Aug 24 00:53:38 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 4hSsq73z1Jz6q2X4 for ; Mon, 24 Aug 2026 00:53:39 +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 4hSsq71Dlfz3vWD for ; Mon, 24 Aug 2026 00:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787532819; 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=b/JFDZgTUDW9N4P07blw4MmWr/cXajHc7FyYMqs8dlo=; b=B6bz1aK0MFEgJOL2acjwJUVXDxqZ/51hR7QJUCaPMS5pfatzulz5Ith7o+9DlqtBufKRFn HscT42HvuPVvwka+PBzjdWznT12K2dR2hMYqQUGvI6BlXBrleGFGnRsAmmsc4/4Qxxf4Ao /lk9lspV4CisddgZ0etwF9GRseBeK7THcvWIaCLxHbS0AOFb2C3bVPuuk/rHvUxZw0sZwX /AK9JLGNdF34bo2T5zbrZ9Q2Ip+r5ZP61DawepfwUuMBh9wPKnJjDsviuuOuTEZPzBwKBl 8UyhILX2LVqAX5I7zzlqanFwEpHs9WBv8Lzz6nsIp62Ab+NtrhgMANHPEhsHIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787532819; a=rsa-sha256; cv=none; b=a3Zl+Wxzuz/9Gi9TVM3UrN6IpU5caoKbHUMd1JoTKJUssrHq48Fr+NN27x6xrbKkJih+vj SVkW4eRIrvXNkvbNVg5z299uBpj0Js9BM/3C5mYHUgn8Bt3nq53gXSUmPGa5loBwEwAi7Y n4HEmQwmuUK51MKvp3pS15aiAPx9ZeRh1ZiGmph6g9D1KluZmn0E+l0RNXBAkeB7+tG2H8 sj5/wIXnYGoW0gT0BIp5D++AcSk93J4KauYJp9KENQxMhmB8niKwonlZ1ywPA06G3U0Tdn Cl6U8kAPaSY0ZjIByVIQWpEHb7Qs+vO72P+I/Y4pxuStt4HBm0+lbzczVGh5sA== 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=1787532819; 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=b/JFDZgTUDW9N4P07blw4MmWr/cXajHc7FyYMqs8dlo=; b=ItBAGyPoDBDvbmSJ6AnZZclTi/mHZcLDbpV93YSqPaP99AGWTRGey4mKC+NWVtwWF5i3ct LN0t2d8ehZinw1zGfP1N+zetoVQex2+X2Igpp2O8cFOjBWuwPnJKji33l88+zGTfqiSIiW j4EF8nuRbA3mSaWqPlVnNBeKEYsGOt/1vCAecFVYeAObjDy+kbpfTf2PD8LgIazSGv9onA d+CDNMAFIJNoFiGX+cPC/epVvAfDmcC4VBOlryYwdbZrT8lLoItUrRhT4d8oCK2/xoZbNy 4wtXAWy6h7fuRAZXUr8llsWsJJrPfH9zU0OjEZ4hJ2wTZ2QVMPQl5qbgh86j8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hSsq702sFzjLP for ; Mon, 24 Aug 2026 00:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33373 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 24 Aug 2026 00:53:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2c9361015cd1 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: 2c9361015cd17476a238756b10906f92e0ffe562 Auto-Submitted: auto-generated Date: Mon, 24 Aug 2026 00:53:38 +0000 Message-Id: <6a8b9612.33373.662e877e@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2c9361015cd17476a238756b10906f92e0ffe562 commit 2c9361015cd17476a238756b10906f92e0ffe562 Author: Kevin Bowling AuthorDate: 2026-08-10 03:41:08 +0000 Commit: Kevin Bowling CommitDate: 2026-08-24 00:48:23 +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