Skip to content

net: stmmac: fix interrupt coalescing

Russell King (Oracle) linux-arm-kernel netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest0 of 2 patches 1 replyApplied
  2. v10 of 2 patches 0 repliesSuperseded

Patches in v2 Applied

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchSimon Horman
SeriesR-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!