From nobody Fri Jul 31 00:50:20 2026 X-Original-To: dev-commits-src-branches@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 4hB6tN3qrgz6lxQH for ; Fri, 31 Jul 2026 00:50:20 +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 4hB6tN2f4dz3kG4 for ; Fri, 31 Jul 2026 00:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785459020; 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=0dzNzJShywstSw9FucFbuVODk9YuLPouJeTj57IKVeE=; b=Y+EeZzCK7JHNZE2XENeQEeP59nWLx0P/Zk8qEiFZjiX7qpYIOLvuLyobQMdKzjkFWJttn1 YnqJKnBqA/c7OAwQ9KFJLH4gdIwSErfjyHyBwqoVf9OysS76YS2bNkqsh1N7ArhlXAzOGj 9GI7xirIwG60eNfruary3Rav+b6TgUIK1WlzwEsV/sqtO7BRyHha8V+uUVbbdoUl611Z+s QE58Z3SF7NKYqWwtP2igxcG6gHdM0AHvHXUlavYp1ZxX+F8SzttHspVuBYblRerP7f7VHm Si5aVrTfxV4Yj0K5bM7r1Q2eA7YjOLCkJFg0kxHWJFaZbJuCPymWE10Whm8YyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785459020; a=rsa-sha256; cv=none; b=gTTvUsl//lJt9R8gTzQu8sXQC4l7SbuH4XruizZnivI9fRLRdr6wTArjPA3POsCIrBvFPI TjTNEBXsSh4glA7mb7G2d/ZUBMyUUEATYfvk2hBzvmctVdYf/dK2oxF0L4WEZVVKx7WL9H kGUct9CDqTU65aMjsFcf/j/EBQMTHgO2rHMMU3On/xTmFfUa8iIh4Df45cg5WTlyFI9aWe kJyH1Ab3w7i3VUXyL0vYckWyxaHfuPH5TQPnZPJWSCIXvpjhlmqUU3FfUz7bZjMRHaWahq Zatjr8bwF/JmF3+rzcJsUEwmLXbWON259KYqPswuwaEnVQcLy+FsXTYco+GAoQ== 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=1785459020; 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=0dzNzJShywstSw9FucFbuVODk9YuLPouJeTj57IKVeE=; b=DeEO+DjWYdIijOSk6op5qa0emFPENfzE4aoh0iWtoPJvzfWd1BFYhwhnig0d1se/or2oGL Z9n4r7sNzY6fQazWjpdkhSFP0HDeTV+MfiwYgdieQzvfFenRfOSjP6nGtlZlkUeLkQovgV b+ibQjrtESLS1PGAcattjTH/ZsUXkj7vU2JuU8SSQ7ejsxCeu+L68+4rSf2voq3x/QrEQY q9y7xig/Ndv5ARgERmq+MTMPB5j0CWBnWx7+R9VpY9y7vzPpWbZT/UEGYjZChBaOHlvo7Q 2dw4RIhbRXlhzgCp/yOCLuR+Bkotx6Wqyy03hG6cvw3QNXlEsk0Ciu1Ng9fg7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hB6tN1WkCzd4w for ; Fri, 31 Jul 2026 00:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19bbd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 00:50:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2389c5d8b471 - stable/15 - e1000: fix 82574 MSI-X interrupt throttling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 2389c5d8b4715140897bf9670536ab0968eb1a8d Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 00:50:20 +0000 Message-Id: <6a6bf14c.19bbd.5636b26e@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2389c5d8b4715140897bf9670536ab0968eb1a8d commit 2389c5d8b4715140897bf9670536ab0968eb1a8d Author: Kevin Bowling AuthorDate: 2026-07-25 10:43:28 +0000 Commit: Kevin Bowling CommitDate: 2026-07-31 00:50:08 +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") (cherry picked from commit 941113a0097ea047bd493f7f78b384718249779d) --- 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 23b7e3ff116b..9e7f4fb230e2 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1788,7 +1788,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); @@ -3809,6 +3810,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 @@ -4917,8 +4931,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 { @@ -4926,7 +4941,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