Thread (5 messages) 5 messages, 4 authors, 2026-02-26

Re: [PATCH net-next v2 0/2] net: stmmac: fix interrupt coalescing

From: Simon Horman <horms@kernel.org>
Date: 2026-02-25 10:15:46
Also in: netdev

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 <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help