From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4E0A606A31F for ; Sat, 5 Dec 2026 20:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DWDZP4nK; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=b28IijEY DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=ERolfVXjuOO80RyY/eaQWZzL/DkiIMMcDcVDD7QdFKs=; b=DWDZP4nKBLzRqiic4P0Pxgwnvl TEV64WfK00VsvKAlnmaj9rujJ4vmq9ncE4rYgT6QKOOvsO6lTZx/CjdJ3qWHQSQMluvMVJi/mG/R0 V0rNYmfsRDMwU1SJfh104k6mgKAZEOPBS0ZW2L8VTkRHQ8FIRd66Cf828nv2mWdFZZKVvY3gpZvXw RPTT1v0FOhV1uv6POGZP3h9HN4ldeGhcVId4gwcPXmbrakcn/y7rUQdQ+X25EZ1+qOxp6WOJFUNSt ks2FK3T/HeAhU0P4+hQKjYxXpuZeLaFA6U6BLmk3Cii+GvSqhT6rw2l0AbVktHaL1MRk/1sm4QAFT CD6rJk6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZwWA-00000002s6H-1UKC; Sat, 05 Dec 2026 20:38:02 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZwW8-00000002s5p-0ckc for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2026 20:38:00 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 96DE960CAD; Sat, 5 Dec 2026 20:37:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 917CC1F00936; Sat, 5 Dec 2026 20:37:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796503076; bh=ERolfVXjuOO80RyY/eaQWZzL/DkiIMMcDcVDD7QdFKs=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=b28IijEYkWx1TC6XR1kCzdDq6J2JNWgwJp/vvEuUKPU0amErw92o6B3C7DfWIBoQ1 4iMaNlLNF45d0Ng0KJ4xbK264Wx8Icg1Hw5wsgkNGzf1b/vGgmVaCro/hyiOJZuEEm 075lFX8+L8k9v/HgjkinJPmgMlZbh2N8Sdj1TJQmGtTMnqZXVRfOMyR3DLcXOVHrH4 81AkTpNQCiZexGo8q0QwT63w1+Kd4bqaqY5UnMvlq6Ubl2fm/5duXIf+sdWRwM4x/p p2iZGShjuekBhgrOCPIpg0uNu6mrdt/S+FtxpUDAVcpQrSxwnFmCwqBuzZKZzk2Ffg nuShJeOqNmpKw== Subject: Re: [PATCH net-next 1/3] net: stmmac: dwmac4: do not treat TBU as a TX event From: netdev-bot+sashiko@kernel.org To: contact@c127.dev Cc: kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch, maxime.chevallier@bootlin.com, me@ziyao.cc, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, zhangfeionline@gmail.com Date: Sat, 05 Dec 2026 20:37:55 +0000 Message-ID: <179650307507.3148.11981509559101127373@kernel.org> In-Reply-To: <20261204203130.287919-2-contact@c127.dev> References: <20261204203130.287919-2-contact@c127.dev> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The commit fixes a defect introduced by commit 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") and… - [Low] Removing the stuck-TBU => handle_tx path takes away the only thing that, on shared-IRQ dwmac4 setups, cleaned XDP TX descriptors… -- net: stmmac: dwmac4: do not treat TBU as a TX event This patch stops dwmac4_dma_interrupt() from returning handle_tx when the TBU status bit is set. TBUE is never enabled, so TBU is never cleared, and on a shared interrupt every idle TX channel had TX NAPI scheduled. It follows the earlier xgmac fix in commit 305deb54c6c2. Link: https://lore.kernel.org/netdev/20261014045607.3421104-1-zhangfeionline@gmail.com/ > Commit 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to > clean TX path") made dwmac4_dma_interrupt() report TBU as TX work. [Severity: Low] This isn't a bug, but should this patch have a Fixes: tag for the commit it names? When 1103d3a5531c was applied, DMA_CHAN_INTR_NORMAL in dwmac4_dma.h was already: #define DMA_CHAN_INTR_NORMAL (DMA_CHAN_INTR_ENA_NIE | \ DMA_CHAN_INTR_ENA_RIE | \ DMA_CHAN_INTR_ENA_TIE) So TBU has stayed set since that commit. The matching xgmac fix, 305deb54c6c2 ("net: stmmac: xgmac: do not treat TBU as a TX event"), has Fixes: 8d07a7930434 and was merged through net. Something like: Fixes: 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > index 02aa1a3dd1e25..55ca172332346 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > @@ -188,8 +188,6 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr, > ret |= handle_tx; > } > > - if (unlikely(intr_status & DMA_CHAN_STATUS_TBU)) > - ret |= handle_tx; [Severity: Low] With this check gone, can XDP TX descriptors go uncleaned on shared-IRQ dwmac4 setups when the TX coalescing timer is off? __stmmac_set_coalesce() accepts tx-usecs 0 if tx-frames is nonzero. In that case stmmac_tx_timer_arm() returns right away: if (!tx_coal_timer) return; stmmac_xdp_xmit_xdpf() sets IC only when the frame counter crosses a multiple of tx_coal: tx_coal = READ_ONCE(priv->tx_coal_frames[queue]); if (tx_coal && (tx_q->tx_count_frames % tx_coal) < num_frames) { stmmac_xmit() and the TSO path set IC when !netdev_xmit_more(). This path has no such rule, so the last frames of an XDP_TX or ndo_xdp_xmit burst raise no TI. Their callers, stmmac_finalize_xdp_rx() and stmmac_xdp_xmit(), only call stmmac_tx_timer_arm(), which does nothing in this configuration. Before this patch, TBU stayed set. Any later interrupt on the shared line went through stmmac_dma_interrupt(): for (chan = 0; chan < channels_to_check; chan++) status[chan] = stmmac_napi_check(priv, chan, DMA_DIR_RXTX); DMA_DIR_RXTX does not mask TBU, so the call returned handle_tx and scheduled tx_napi, which cleaned those descriptors. After this patch, only TI schedules tx_napi. For non-XSK queues, RX interrupts only schedule rx_napi. Would up to tx_coal_frames - 1 descriptors per queue, with their xdp_frames and page_pool pages, then stay held until the next IC completion on that queue? The missing tail IC in the XDP paths predates this patch. The same behaviour already exists with per-channel MSI, and on xgmac since 305deb54c6c2. This patch removes the fallback that hid it on shared-IRQ dwmac4. The later patches in this series do not change the XDP IC logic or the timer. > if (unlikely(intr_status & DMA_CHAN_STATUS_ERI)) > x->rx_early_irq++; > -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204203130.287919-1-contact%40c127.dev