From nobody Mon Sep 29 13:40:49 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 4cb2Q93qSfz68Fkc; Mon, 29 Sep 2025 13:40:49 +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 4cb2Q93JLDz3l77; Mon, 29 Sep 2025 13:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759153249; 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=/eaE6eZguwngVdKSyRtd13/KF+ale6zxbVw8cN0vaUY=; b=TEpm1P/FhZ8rNgSNZJj0evdt7oCFxLqSuBVQX+OgJl+WGdFTHYaGmJX9j7TL+g54qrWKTt 0/VkF7eVvJvB9rtn3R2h6/C94soB8x2Jw/+HdvBTq4Q7NxrIisgVxOPCtPWuPf3yBCA4el rET0MGg3/YVESKNNB2Ef/shMwGYXN0PEAuzMdVX/rw3+rq0vBoymMp23PrdU2fewGehpMv YGadngLustYLEXy46qlSWnrg0TyBgdOEQjFT0otSKtrJRhQz8/bGbV/t71FsnIkrjweKxp Ve+1Bi568zZyZlA6cXYQcmizpoWYQv5ACZeqXrlI9erstiy6fxuo/pbLyEamvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759153249; 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=/eaE6eZguwngVdKSyRtd13/KF+ale6zxbVw8cN0vaUY=; b=J2WXBG7tb+GOq0D1pwAyup1ePAAXGz/lXNte6LEoyA1XjRHFJ4pLMtcTKaT5jmweWZ7lMk RkSGz7O46A6axrJv+oCoAfjv9htH+sEdLscoOAgGb498rBleFzxan0GGQnKjDocXuAZLS6 W3V85X8RUbfKWMGSEmQVJZUhDMQdOCZPuEIAjD9qPyp0g6aHzUdnGG5qrkGrWTBCMM4eyY sBUOPeq+GluaBSkMNq876vhmtogFFmUBUZZJD54aN9d919eyTlWMHr2LGdQKd2SdZb+zR9 5Kfdz1PxNdRRDRwY0SuS58sfQiar0RNj1YURFl5hkkG4ANsaZy+TsY/NAwVIcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759153249; a=rsa-sha256; cv=none; b=RqkYNKMvMdWNNt8IGVoBbq6u4Oy7H5KYh20YhfkDAvr420hptiD4fQbuUnFtUrlzp7KLC0 YtZCYqmdzu8DKK+uX3G4hb0T6C5lEghOS1na2GrCXjgQiwjfWpxOhB/hWUKcZyUdAlu2bH qwrNk214jAa25HFInZqISjefyT8UYepYWk/hbpmh05wBpTQTdlS6P67tMYxDIhL4368CsP vMdhdJ/qIjPGy5olcpGiErvxL59/CcdyS64VKIlHzLTqu9QTGVYh9qwoVHv9sc+j3pJkqm TGNrY/QKZF3zLfSxrTl8EjKR0dHoesLFPDH07MUk3mfJ3rhSvFYcrroYIf9p4w== 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 4cb2Q92trtz16bg; Mon, 29 Sep 2025 13:40:49 +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 58TDenMH014554; Mon, 29 Sep 2025 13:40:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TDenkH014551; Mon, 29 Sep 2025 13:40:49 GMT (envelope-from git) Date: Mon, 29 Sep 2025 13:40:49 GMT Message-Id: <202509291340.58TDenkH014551@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: 0c946b6072ab - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 0c946b6072ab1545af28d4bad8317b2696845adb Auto-Submitted: auto-generated The branch stable/14 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=0c946b6072ab1545af28d4bad8317b2696845adb commit 0c946b6072ab1545af28d4bad8317b2696845adb Author: Krzysztof Galazka AuthorDate: 2025-08-19 12:50:33 +0000 Commit: Krzysztof Galazka CommitDate: 2025-09-29 13:16:48 +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 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); } }