From nobody Fri Jul 31 00:50:53 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 4hB6v16RhNz6lxbX for ; Fri, 31 Jul 2026 00:50:53 +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 4hB6v15wJKz3kvM for ; Fri, 31 Jul 2026 00:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785459053; 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=dNO/b44Bbp60wlL1X17hoFKVOP2yvcS09cVWjJeohIM=; b=B/C1olrNjit+riad5lUfid8OFwYsn2g7z92JuHWgxrnIpE5IYQS+RM9n+TEU3m1QcDiqrJ 1WBn9zVlty61G9bC3bi+333Oo+LMn3xopgg00NV8YYMQ+g3u8eEJDpyzE8/SxM6fv9h0QW Eb6F9Syezd8wSxfRhCjTOQB/iKHkumVuC+tGkoCnbaRg982Z86Joe1Ox7vHp4EKDyTUs10 1BkuUiX5mqCJj/O+R155pwu9r9tmuhl7LlhNDk98Hvbnup0nFcTd1JpYeZFRyh7HQKzZUT RZSJdZwWdvsYXE1ZsX2o6hjZK67vhWv+PXPmJVokwDzpmqF8078xD89UJXv2DA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785459053; a=rsa-sha256; cv=none; b=w+BeLKklbJ4nkmYeq7sMvXq6h0c/lbZ4Biyt2UhtiiT46TKS7Q9b5Dqz4SS8eQ8eg4isUe tKaMygdGVnLmlVeR435QeMd9s86ErNJgaf1sY9o0YTnGYeXNL9ave/JFfuijAsBpKwMYjx UhFoQoZWMOGN8Ysyxnrfi7S2FUAJonm3Xh6KIQkMdB7KX70qIln+PhhwRrHoo2fYiUxJ7W lK3MaqCe10xEomRX6LBY6w4hNH51DzO+fFm9ppsUqEbGx8lG8Wv827nrn16LHZDnZJI950 p9W2+JqCMUm9yC33QojjlG1DpmpSMph00wxPwIUW5P74vCSfmeliyXfbOEFmew== 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=1785459053; 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=dNO/b44Bbp60wlL1X17hoFKVOP2yvcS09cVWjJeohIM=; b=UufNNlRBK2UuVqGSivKHr9n/hKhFU8Z+RYRnMVjTzynlZHHnWJOKXUY7VQjXZjAWJKe5/t tFHmOPs4wvU01yEC9Opis4mp8tFA4JyTtwbJa189qSGGdFg2fr0AvyjhTcA3L0q+uQu+c5 a7i7SXa9rUsOUYfpfhutY8eu3mbDblbM308h3XPv8OP961tojdxdVFxJmUOcEimJdv4s2n ajfkRl8QMO4hOCaXAtX61aKw+LovoOa8eGS7g/rflk+vbqp6Dhc95q7Zrilq/hpQ8e7mGx 87UbX4o0hoyI+KHmPsrqziDVhJQaa75LRuxDS8ZsBgUg2wFtLwsp3X75hiykcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hB6v14tnCzdPK for ; Fri, 31 Jul 2026 00:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a12a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 00:50:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: a1edeb474b1e - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: a1edeb474b1e67e2bd31d7dc11f488888a28e5c8 Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 00:50:53 +0000 Message-Id: <6a6bf16d.1a12a.2b8f77f@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a1edeb474b1e67e2bd31d7dc11f488888a28e5c8 commit a1edeb474b1e67e2bd31d7dc11f488888a28e5c8 Author: Kevin Bowling AuthorDate: 2026-07-25 10:43:28 +0000 Commit: Kevin Bowling CommitDate: 2026-07-31 00:50:43 +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 248d14f5974c..0253ff95a46a 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1781,7 +1781,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); @@ -3802,6 +3803,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 @@ -4857,8 +4871,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 { @@ -4866,7 +4881,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