[PATCH net] net: stmmac: retry a failed RX refill from a timer

Nicolai Buchwitz nb at tipi-net.de
Sun Nov 22 13:09:40 PST 2026


Hi Sam

On 22.11.2026 22:02, Sam Edwards wrote:

> [...]

>> Do you mean "first as well" or "first instead"? Because "instead" can
>> cause avoidable packet loss:
>> 1) Initially, network is idle and ring is full of empty DMA buffers
>> 2) A burst of exactly one ring's worth of packets arrives
>> 3) The RX irq fires and stmmac_rx() attempts its refill-first (none
>> needed) then depletes the ring to the maximally-dirty state; the
>> refill timer is armed
> 
> Thinking about it more: the "unreachable packet" problem happens at
> this point too, even with the "first as well" behavior.
> 
> Maybe the best way to resolve it is to adopt stmmac_rx_zc()'s behavior
> of refilling during the loop?
> 

Only if the ring is no bigger than the NAPI budget, right?

Otherwise tne poll can't empty it unless a refill failed, and refill 
first
covers that.

Refill in the loop sounds good, but this would be IMHO a net-next 
follow-up.

> [...]

Regards
Nicolai



More information about the linux-arm-kernel mailing list