From nobody Fri Oct 30 17:33:04 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 4jGSqP4c31z6xFtw for ; Fri, 30 Oct 2026 17:33:05 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jGSqP0QpGz4WXW for ; Fri, 30 Oct 2026 17:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793381585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5NNOUG61NaJpAiUAi8IBhrjda20CrjMRJLRmIG2gI4A=; b=H03pQIDbWpEjNUHvHfAM1SJ3cgi4tBozhr+KKvTrliWOM4r4xST72pc/mDswJDVavq6ofw fD573BuzoDI2rrLHpH8LuBJNUImnUfjzn4giEz+T1z+NtE3v+PYvjMBmgRgswtxn+OwVea CSLzUXZjwQPgiaTHyv+5rit1AE85B1/I/MBDpfLDMERj4wFEuQdsriLyR8hAYF7ujo5xbd ckf15lAIIBCHu2Wtw2J/ECuzHADQ7DeyT9yzBoMTfpr2wf2jenKRjh3/mrltz3jV9gXw7Z VK/o6y+zwsRNAHw4lvGjI0PWhGOeG/KtAOsDmz9FqrRzfUVGsiEcqatbbsMhqw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793381585; b=lmuF6yYEpg5OM/uTjZ6xRuXIVBksTUlBm6hwL0MlQAcOKxaLrknD/JsAdWaHOOjJXn85u2 ZaJovzm/Iv2gfiCnK+Sbx02s7GF2TtA2OFoCa8OU1iSdK8gwcnzQXmXJpwQoCg4qfyw8cb iTHV5WgYPIx/qpz6A7zZmv2zWs6YiRrOJZtD+6o5/FUNyJQ8HiJB8Vz9D7keIWIXsqma+Q sG1r46KMvUTfDN+i6b2xXbs22ezEfQpnsABOxl3eaTTnfyh7QFL+WUGGB2hGH/xMldRmaS aoDpMKcv09TmmxUjMz5tblwkDCpRSkj+BaIJew3d84fNuE6Itp/AkB9TSIb6VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793381585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5NNOUG61NaJpAiUAi8IBhrjda20CrjMRJLRmIG2gI4A=; b=HrMpzjmez1JksOWyx5JF2JEI6Q+H3GMLDYCxO088IDx5q7LGw+HKmPd9HLncTcx90StoC3 4v3jNNlC9k0p9R/WoM3GRCQ85lNw5fnBcgHPLvHFLTIULWsa5cEzOHWZEIixfomTMMGCsj gfdvMxdsnhCOE7BqBdiAqDdSh8WpsNmTakmm/A9fQMgkpGNbbZbwdFvDJ9dSt1P/R5ubd1 ERtoEBiMO3TyUGAevpJEyhssbJmKlVuN/hYfALZGxfub0LdjsUZl4X8kYdpuRvYHYJkrvg sCrS9E0Zs1TR/2027cngBehfdEGye0uVVo47P32Zr5AAW4n3wxdQWKGz4XQi6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jGSqN6w18zdF2 for ; Fri, 30 Oct 2026 17:33:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41060 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 30 Oct 2026 17:33:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: =?utf-8?Q?J=C3=A9r=C3=A9mie?= Jourdin From: Kevin Bowling Subject: git: a81110df706d - stable/15 - re(4): recover Tx completions whose MSI was swallowed in re_intr_msi() List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository 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: a81110df706d6a73ec6ebc32b8875503dad556fd Auto-Submitted: auto-generated Date: Fri, 30 Oct 2026 17:33:04 +0000 Message-Id: <6ae4d4d0.41060.30cc2caf@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a81110df706d6a73ec6ebc32b8875503dad556fd commit a81110df706d6a73ec6ebc32b8875503dad556fd Author: Jérémie Jourdin AuthorDate: 2026-07-19 18:45:47 +0000 Commit: Kevin Bowling CommitDate: 2026-10-30 17:32:32 +0000 re(4): recover Tx completions whose MSI was swallowed in re_intr_msi() A Tx completion that raises a status bit between the ISR ack at the top of re_intr_msi() and the IMR re-enable at the bottom is never re-signalled: these controllers do not re-assert MSI for an already-set status bit (this is why hw.re.msi_disable is a known workaround in the PR). Re-read ISR before re-enabling; if a Tx bit is pending, ack just that bit, reap the ring and restart the queue. Rx bits are deliberately left set so they re-arm the interrupt normally and Rx moderation state is untouched. Also flush the posted IMR write. Mirrors what the INTx path already achieves via the loop in re_intr(). * MSI interrupt mode on RTL8168H under load; "missed Tx interrupts" watchdog recoveries no longer occur. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D58278 PR: kern/166724 (cherry picked from commit d11f124e932bfa4fabdc6c5b67735181615a0630) --- sys/dev/re/if_re.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 6bce5432a1bc..e8e344c233d5 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -2731,7 +2731,34 @@ re_intr_msi(void *xsc) if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) { if (!if_sendq_empty(ifp)) re_start_locked(ifp); + /* + * A Tx completion can set a Tx status bit between the ISR ack + * near the top of this routine and re-enabling interrupts + * below. These controllers do not re-assert the MSI for a + * status bit that is already set, so the completion would not + * be serviced until the next interrupt or the 1 Hz re_tick() + * reclaim (this is why hw.re.msi_disable is a known + * workaround). If a Tx bit is pending, clear just that bit and + * reap the ring now; leave any Rx bits set so they re-arm the + * interrupt normally and the Rx moderation state is untouched. + */ + status = CSR_READ_2(sc, RL_ISR); + if ((status & (RL_ISR_TX_OK | RL_ISR_TX_ERR | + RL_ISR_TX_DESC_UNAVAIL)) != 0) { + CSR_WRITE_2(sc, RL_ISR, status & (RL_ISR_TX_OK | + RL_ISR_TX_ERR | RL_ISR_TX_DESC_UNAVAIL)); + if ((status & (RL_ISR_TX_OK | + RL_ISR_TX_DESC_UNAVAIL)) != 0 && + (sc->rl_flags & RL_FLAG_PCIE) != 0) + CSR_WRITE_1(sc, sc->rl_txstart, + RL_TXSTART_START); + re_txeof(sc); + if (!if_sendq_empty(ifp)) + re_start_locked(ifp); + } CSR_WRITE_2(sc, RL_IMR, intrs); + /* Flush the posted IMR write. */ + (void)CSR_READ_2(sc, RL_ISR); } RL_UNLOCK(sc); }