From nobody Tue Aug 19 13:11:55 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 4c5qjl5tPBz64tQR; Tue, 19 Aug 2025 13:11:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c5qjl55J3z3PMj; Tue, 19 Aug 2025 13:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755609115; 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=dgUvrqEq2cS4Vm9T9RQ8X3fr4Q7N/G0W7ACP0QgLpnU=; b=TYq2kjlcV1rwx6Rhj/1sZWzkClAnckcZ1lr3tOk00P5yn0JcHSVwD/gtAVkMn/Jk6p6u9F cz955m296PyrAWOeYl35M6djj2QAEs7EMwgvJlERRTDAA/CH+IIYdWezOe4X3cEB+7GI7a SyC4GIPy2sE/19/ZtdzJcJRl1HMTtolzIUf6Mx/I1BXJuDbn/I/kuqkSnKx4wKRYqfNyZ1 MJLkLT1fCWj3hoQHRIaiXM0xah3UEf6vbm2EhwlXWcDVVGuPJeAjqbEZhNmN8+RQnX2Lwq AgbJsKqgVCa6Ly4Jg9DIcW7zflDmDNlGmnSqU5XO24eYlagUqrEEM1m1GnLYwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755609115; 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=dgUvrqEq2cS4Vm9T9RQ8X3fr4Q7N/G0W7ACP0QgLpnU=; b=FdbFRP5u85J2/9IGpDffjF/Zl96AE4x0qbKZzbqzlLQG3u6zHrlcHtcBl3eIV9yx/KZULF gHI3aOR6huHeWT5bCwwujmUC8m5R9cb5Cq+AeFlPYIwkaOASgdSePmbCkXQktr+2Qz03az 9AjExh61YWSdEKlPXSHxkY5EZp/sR7BcAxp0ZZKkVFMhN59BeewwbD/C6vlFPLw/5/4QXe d9lnsTnlrcRXJ6buyGPaHfMDFoZix0bC8IKR/dj63Ap8UuDtYpAkP9dEFeGXVvkIrlZVpO 0lFYMnQzD8BeothMctxEJFCZRsIznJF0SyG527meTl877fx8rQZl+H9CptV+gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755609115; a=rsa-sha256; cv=none; b=SOuvZ5v+6F6UfEJ+BsBeexKSnEStqOQJn171vHhXkPF/OG9OMO1IzIFRz7BbAjCitbSx6M dVorf/okZHsTPq1X7BV+JDdVV4kZDXZ6HUvcfCytgEVHQe/AlePvt3jBhzcsh9VmS+BX6j 2gz5MpIMBYbxY5X1A5akbcyIAADgAP4IBmLgyN6KsbOr/3+IZ55o3PRYeZyMdTuEyokwE7 kQtmGfz5XgMgtbjONOtR3sTsa7mDFyezbmj82tqOQv62tEPZP5xEmxmdhnkht7ESskOK9B 2r+lukYZvC56G/hhB5TudkLjVThYBluMLKMd0W9597KwgbEAEMKUW7oe3qO7NQ== 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 4c5qjl4MNYzCpn; Tue, 19 Aug 2025 13:11:55 +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 57JDBtkF021463; Tue, 19 Aug 2025 13:11:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57JDBt7r021460; Tue, 19 Aug 2025 13:11:55 GMT (envelope-from git) Date: Tue, 19 Aug 2025 13:11:55 GMT Message-Id: <202508191311.57JDBt7r021460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Krzysztof Galazka Subject: git: 6f41c1fc39d9 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 6f41c1fc39d9fa9db989a7b4f325c3ab85b8fb45 Auto-Submitted: auto-generated The branch main has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=6f41c1fc39d9fa9db989a7b4f325c3ab85b8fb45 commit 6f41c1fc39d9fa9db989a7b4f325c3ab85b8fb45 Author: Krzysztof Galazka AuthorDate: 2025-08-19 12:50:33 +0000 Commit: Krzysztof Galazka CommitDate: 2025-08-19 13:11:32 +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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51331 --- 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 60e66aeaf579..43c3af056b67 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -1151,13 +1151,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); + } } /* @@ -1175,11 +1182,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); } }