From nobody Sat Jul 25 21:29:44 2026 X-Original-To: dev-commits-src-main@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 4h6ygD6xvZz6m8Lw for ; Sat, 25 Jul 2026 21:29:44 +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 4h6ygD6Mf5z3ymW for ; Sat, 25 Jul 2026 21:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785014984; 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=F+pgG8PoxCMd4kecOQkKU/biK7ddh6WW0dyU+llkoHA=; b=l+rpch4DZnX9ogLiaTTSWZcwk8ebQD3uUPbIO7ujV0f2eEA66UJjfHoW28kkbHqpakkBD2 f9dr1ERfTb9vUu2iP3ZWi6taY/EkxQGbgl36V33WIMyZl3E2ENYKSIoRVULRqtN3yNoPNU nLB2vRvvJv95xQIX4wInLlYNk9mfNGwfuvoUWST/+pS2EccdsTLQEoXGXDiEgPKHYNCpr+ k8mGI1jUCnBBCTZZYj7ow2FpHpOGJgagoPsqdSjekF0H9vK6Sdhd15Nvk1zLQbb1gymuA1 4goiYKlOyDzCFU6Lw1oC8Xhwkxis4r6bZsCYfS9yqM5ImFYfyN9L2boQpnQTeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785014984; a=rsa-sha256; cv=none; b=Yx4azXTdicPayXlS2ynlUywCHMhbukzxNjK6hCVHWLiMG3nNtQczAZeZPEDyIuzlJy9n0P whfhhnBKX8KR+Q2ni+GYNhBpU2uicwPbNgaTPsJRKyWm85ZhTeDmuJ5G95oPeVbl/8q9B+ xvZGdYQPFmT9pOLDaGrPLsw0OXB/DGB8gCR5sOWUTh8CJw3I8EhKlTZenTu6SMbWCHnIbE wBPetU3FPpdEsYkxu8Q5rbKqvcHcL0JnzSgOQIn115g4UKyKzQyjh5SSPs6rDj9yp+oQQD o0EGiWTp7lh/KBFE70n7CxqIGoOm23QadiD5hTzj01TMyrwxcRKJwBicU7T0ow== 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=1785014984; 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=F+pgG8PoxCMd4kecOQkKU/biK7ddh6WW0dyU+llkoHA=; b=AdFIiIsrw7In+XXYiDm2DDpEGQ7ZD+edTYT6/8hy7nOdAXsyRhDctj0WFC2xAMTza0BC+s oYwKFMpVLPlNSGSwwHSbfmmpAJRZ9zIKZaMAvyYrpocswtY2jfP1WhufX5RiHABuMtz9PN 8GlsEUYzgEiEab7VpmFhkeLnPeLIl4GbgUo6WuoB+VXbI2dpQQGS0YXPKglLq2gAYNgMrg Jipg8F+UwjshvPcYuLZekISU0ROQTJBVefvOpcG0UPEGKcwFb4LTWnx6qhTLpCD7UA20ER 2D0Ljfb2B3bsAu2VVfREv23UWofYKEqB15mydVtKEIIA6TH0t5j3RggkJuGXBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h6ygD5BpQzt4n for ; Sat, 25 Jul 2026 21:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43823 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Jul 2026 21:29:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 941113a0097e - main - e1000: fix 82574 MSI-X interrupt throttling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 941113a0097ea047bd493f7f78b384718249779d Auto-Submitted: auto-generated Date: Sat, 25 Jul 2026 21:29:44 +0000 Message-Id: <6a652ac8.43823.679927a9@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=941113a0097ea047bd493f7f78b384718249779d commit 941113a0097ea047bd493f7f78b384718249779d Author: Kevin Bowling AuthorDate: 2026-07-25 10:43:28 +0000 Commit: Kevin Bowling CommitDate: 2026-07-25 21:27:51 +0000 e1000: fix 82574 MSI-X interrupt throttling em_newitr() and the per-queue interrupt_rate sysctl both tested que->msix to decide whether an 82574 is running in MSI-X mode. 0 is a valid MSI-X vector so queue 0 was misclassified as legacy/MSI. Test sc->intr_type == IFLIB_INTR_MSIX instead. While here, index the tx EITR read by tque->msix rather than tque->me so it matches the register em_newitr() actually writes; the two differ once tx_num_queues exceeds rx_num_queues. Also seed que->itr_setting in em_initialize_receive_unit() with the rate the hardware was just programmed with. Otherwise an itr_setting left over from AIM across an interface re-init makes the change detection in em_newitr() suppress the write that would restore it, leaving the hardware at the default rate while software believes otherwise. Fixes: 3e501ef89667 ("e1000: Re-add AIM") MFC after: 3 days --- sys/dev/e1000/if_em.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 5547c4ec8614..1e54d5ea998d 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1792,7 +1792,8 @@ em_set_next_itr: if (newitr != que->itr_setting) { que->itr_setting = newitr; - if (hw->mac.type == e1000_82574 && que->msix) { + if (hw->mac.type == e1000_82574 && + sc->intr_type == IFLIB_INTR_MSIX) { E1000_WRITE_REG(hw, E1000_EITR_82574(que->msix), que->itr_setting); @@ -3834,6 +3835,19 @@ em_initialize_receive_unit(if_ctx_t ctx) /* Set the default interrupt throttling rate */ E1000_WRITE_REG(hw, E1000_ITR, EM_INTS_TO_ITR(em_max_interrupt_rate)); + + /* + * The 82574 MSI-X EITR registers are programmed + * with the same value further below. Either way + * the hardware now holds the default rate, so seed + * the software copy to match; otherwise a stale + * itr_setting left over from AIM makes em_newitr() + * skip the write that would restore it. + */ + for (i = 0, que = sc->rx_queues; i < sc->rx_num_queues; + i++, que++) + que->itr_setting = + EM_INTS_TO_ITR(em_max_interrupt_rate); } /* XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -4957,8 +4971,9 @@ em_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) hw = &tque->sc->hw; if (hw->mac.type >= igb_mac_min) reg = E1000_READ_REG(hw, E1000_EITR(tque->me)); - else if (hw->mac.type == e1000_82574 && tque->msix) - reg = E1000_READ_REG(hw, E1000_EITR_82574(tque->me)); + else if (hw->mac.type == e1000_82574 && + tque->sc->intr_type == IFLIB_INTR_MSIX) + reg = E1000_READ_REG(hw, E1000_EITR_82574(tque->msix)); else reg = E1000_READ_REG(hw, E1000_ITR); } else { @@ -4966,7 +4981,8 @@ em_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) hw = &rque->sc->hw; if (hw->mac.type >= igb_mac_min) reg = E1000_READ_REG(hw, E1000_EITR(rque->msix)); - else if (hw->mac.type == e1000_82574 && rque->msix) + else if (hw->mac.type == e1000_82574 && + rque->sc->intr_type == IFLIB_INTR_MSIX) reg = E1000_READ_REG(hw, E1000_EITR_82574(rque->msix)); else