From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F9382BE7C6 for ; Wed, 25 Feb 2026 10:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772014532; cv=none; b=pdnmra0tDhPOLSidgRZjhwl5scs6gI+Ymw7ML9au6lruK6b4lszmiEHOJkVdjZOPtE3ooUs3GwsAeQ7CRf5yh/RsuU2pLmiLepOtkEJhL9mvQHT2dwYrl50uTZqWxEyPo5eFPKHh/jToAm/fJ046oxPxZNkk+AxzmDTNFOIItb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772014532; c=relaxed/simple; bh=la5l3tmm9VgUaAKbSveODFwXjKNCLaluNNlPXBLN8HM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S6k6yCEndV0v2QWlf+gUGTlEbAbEB+sIHCOUGgeqEmp651geyTrHNgAntVUaPLVDtRijIcqJSe1MA0R+TgvyS+uq2HRLGyaE8MI/trcLZ2alrUKxmuL7LZvRc7RF1p4PP3Ht1unZliDuhSrPsQnSZXVEP7nYIswckNk7qWeD6hk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TWrjYKI9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TWrjYKI9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE5EEC19423; Wed, 25 Feb 2026 10:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772014532; bh=la5l3tmm9VgUaAKbSveODFwXjKNCLaluNNlPXBLN8HM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TWrjYKI9tt2sMnNPyFMBbpvE3NgZWgKknoOKEi67iRk5S2NxGftUPKohJHlBwCCnN SJEquZYRQyCSL7WJ/gYD6jByRTuYhF6BxvXNbxEvQKnLeINU4xvGFDpYmuK/4tkUPQ 9PRMk6CxdQgtzc2soqUVeNFuwiYcIqtzlpYoyDz8zsDROUgGzvlFrmM97EaqbfvrrA JkNGAQZZtH+4q7gox5Sxjig+e9OSJOf0sS44EUFqkOiNqUvD6g5PJRrF4wr9uKhKCS 6ibvy0IfEn7lbHjBuoyysL7Y+ZulICmk68KN+2sLIYg9GNY9wpeuWjBY6Zvdgdea04 nfNRdCS/V34zQ== Date: Wed, 25 Feb 2026 10:15:27 +0000 From: Simon Horman To: "Russell King (Oracle)" Cc: Andrew Lunn , Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Paolo Abeni Subject: Re: [PATCH net-next v2 0/2] net: stmmac: fix interrupt coalescing Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Feb 24, 2026 at 09:01:13AM +0000, Russell King (Oracle) wrote: > Hi, > > While cleaning up the descriptor handling, I noticed that the accounting > of transmit "packets" for interrupt coalescing was buggy in that it > takes the difference of the two indexes into the circular list of > transmit discriptors and merely subtracts one from the other without > regard for the indexes wrapping. > > This can result in a negative number or very large positive number > which would have the effect of either reducing tx_q->tx_count_frames > or making that very large. > > Either way, the result is numerically incorrect, and could trigger > interrupts or not trigger interrupts when required. > > This series converts stmmac to use the circ_buf helpers, and then fixes > this problem. > > v2: move build fix to correct patch > > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 28 ++++++++--------------- > 1 file changed, 10 insertions(+), 18 deletions(-) Thanks Russell. For the series, Reviewed-by: Simon Horman