[PATCH net-next v2 0/2] net: stmmac: fix interrupt coalescing
Simon Horman
horms at kernel.org
Wed Feb 25 02:15:27 PST 2026
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 at kernel.org>
More information about the linux-arm-kernel
mailing list