From nobody Mon Sep 29 13:48:13 2025 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 4cb2Zj69lRz68G5Q; Mon, 29 Sep 2025 13:48:13 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb2Zj3mbMz3lsP; Mon, 29 Sep 2025 13:48:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759153693; 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=6DR/pK80f03mwSNZPYtl7H62HVkhi9YLIYMRghjMu+o=; b=Pbg3xc67pzR3G/iGU5kJetLVTeDBeCq4z4o/itPi08+zr9lnPF/Uld3vZe5rjguJ+/ohIC tyuhXua3M3CN/PyvgMcNHmQWS68HhVx8udTUKDXQUCXGRh9iEKvZ21JWZrWDtH+oROTsEx mpqgzLn5WOHJKu5wtR01KOq4bJHIV4xeTYofu4oOqY6myDDUEhW0n3ojupz5da65WrgouY 4+79gfWEhSfpI+SnYlY933kuXOq49/upVOKIXqGG4JS9ELGJipdqbTim3t9TRyrV0aYuvz z53/IgMnuwYBV3NQLx1iJ5fcMeGMdB7STI+mILLVb4pSqQGJ0DfUsAjq7hodeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759153693; 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=6DR/pK80f03mwSNZPYtl7H62HVkhi9YLIYMRghjMu+o=; b=eAjig1wx/MKWfmRHHHTByQXaTooFVVOQAnuVvSo02uFPrk2Rx95tGKD9M7XCKs7n751dsz EpSMcEV/ldyifCr/Dp0eV3m3A0/vlI50ceweI7CkcNMdqHFXn9rWz8Njqc+p1I2o8h+7RF zwxsMiIsW+4XDN5NwXC8e/EaVsei01s3cHbhLTWwovN36HlfPYx+PAnDJMmHU6Gl+kBOMx DSehWaqL8qxDZnQPuB5uPqqBVRrSuNuxWG4Dkw/PGZRJLKcc/wuTcCsaXeZV2UcYVMDa6C 7Be94QK67GlrcxOYThvlAqzLoBJjl7UBTML6kk1VNTTBsalrUmxCo+GsA+tzqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759153693; a=rsa-sha256; cv=none; b=N982YeD5Z4bY0vouH6AQbl+ItSrQYw+fMIUj6tV4PePCf99GodTle348pl7YtsV3RYRmA+ gfUxUi5yFfGoM3oQutf1OFOGQ+G7uX6xqDnF7UjST9HT6sNNq5DOzu6dFzLVjsWT/Utwju qN8ugeYMzioI8D5r7YB++TUpN3tHliUXQUZaRGsH58og30wXbYY2vaCsI+Vkx2eh55hPHg XKpuMQ+A1x2jFef+ZCQC+rpq+5qHrCJrboVvTb7KoBCEq9nMByiCENNlKM+VZ92LlyGXLF J4t0QWFy3kSPlmvrpaatQ2V6EG9Ouo/Kwyuh7mXlwGndAayHgPKPFjDlEIAoWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb2Zj2hXCz17PD; Mon, 29 Sep 2025 13:48:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TDmDBI022770; Mon, 29 Sep 2025 13:48:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TDmDiE022767; Mon, 29 Sep 2025 13:48:13 GMT (envelope-from git) Date: Mon, 29 Sep 2025 13:48:13 GMT Message-Id: <202509291348.58TDmDiE022767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: db8b10d728da - stable/13 - ixl(4): Fix queue MSI and legacy IRQ rearming 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: db8b10d728da9a798253cf4eb70d60a1f1075cad Auto-Submitted: auto-generated The branch stable/13 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=db8b10d728da9a798253cf4eb70d60a1f1075cad commit db8b10d728da9a798253cf4eb70d60a1f1075cad Author: Krzysztof Galazka AuthorDate: 2025-08-19 12:50:33 +0000 Commit: Krzysztof Galazka CommitDate: 2025-09-29 13:45:33 +0000 ixl(4): Fix queue MSI and legacy IRQ rearming When MSI or legacy interrupt is used driver controls wheter queues can trigger an interrupt with the Interrupt Linked List. While processing traffic first index of the list is set to EOL value to stop queues from triggering interrupts. This index was not reset to the correct value when driver attempted to re-enable interrupts from queues, what prevented driver from processing any traffic. Fix that by setting correct first index in the ixl_if_enable_intr function. While at that fix the comments style and make ixl_if_enable_intr and ixl_if_disable_intr more consistent. Signed-off-by: Krzysztof Galazka PR: 288077 Suggested by: Mike Belanger Approved by: kbowling (mentor), erj (mentor) Tested by: gowtham.kumar.ks_intel.com, Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D51331 (cherry picked from commit 6f41c1fc39d9fa9db989a7b4f325c3ab85b8fb45) --- sys/dev/ixl/if_ixl.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index c52d5ad287ba..f75a352b7162 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -1153,13 +1153,20 @@ ixl_if_enable_intr(if_ctx_t ctx) struct ixl_pf *pf = iflib_get_softc(ctx); struct ixl_vsi *vsi = &pf->vsi; struct i40e_hw *hw = vsi->hw; - struct ixl_rx_queue *que = vsi->rx_queues; + struct ixl_rx_queue *rx_que = vsi->rx_queues; ixl_enable_intr0(hw); /* Enable queue interrupts */ - for (int i = 0; i < vsi->num_rx_queues; i++, que++) - /* TODO: Queue index parameter is probably wrong */ - ixl_enable_queue(hw, que->rxr.me); + if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) { + for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++) + ixl_enable_queue(hw, rx_que->rxr.me); + } else { + /* + * Set PFINT_LNKLST0 FIRSTQ_INDX to 0x0 to enable + * triggering interrupts by queues. + */ + wr32(hw, I40E_PFINT_LNKLST0, 0x0); + } } /* @@ -1177,11 +1184,13 @@ ixl_if_disable_intr(if_ctx_t ctx) if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) { for (int i = 0; i < vsi->num_rx_queues; i++, rx_que++) - ixl_disable_queue(hw, rx_que->msix - 1); + ixl_disable_queue(hw, rx_que->rxr.me); } else { - // Set PFINT_LNKLST0 FIRSTQ_INDX to 0x7FF - // stops queues from triggering interrupts - wr32(hw, I40E_PFINT_LNKLST0, 0x7FF); + /* + * Set PFINT_LNKLST0 FIRSTQ_INDX to End of List (0x7FF) + * to stop queues from triggering interrupts. + */ + wr32(hw, I40E_PFINT_LNKLST0, IXL_QUEUE_EOL); } }