Re: [PATCH net] net: bgmac: rate limit RX error messages

From: Daniel Machon

Date: Wed Oct 21 2026 - 06:55:27 EST


> When the RX ring is full the RX FIFO overflows. With RX overflow
> continue enabled, the DMA engine then writes one frame with a bogus
> length (always 0x45c2 on a BCM4716), which the driver drops with
> "Found oversized packet at slot %d, DMA issue!".
>
> Under sustained overload this happens on every NAPI poll. On an Asus
> RT-N16 a 950 Mbit/s UDP stream to the router printed about 1450 such
> lines in 20 seconds. The messages are printed from NAPI context, so
> with a serial console the router spends most of its time printing.
>
> The frames are already accounted in rx_length_errors and rx_errors.
> Rate limit both RX error messages. With this change the same flood
> printed 60 lines while rx_length_errors counted 14297 dropped frames.
>
> Fixes: 6a6c708469c9 ("bgmac: add check for oversized packets")
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>

Not sure there is a preferred choice between net_ratelimit() and e.g.
dev_err_ratelimited(), the difference seems to be that the latter keeps a limit
per call site rather than a global one. Since it already calls netdev_err(), i
suppose this makes sense.

Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>