From: Nicolai Buchwitz <nb@tipi-net.de>
To: Sam Edwards <cfsworks@gmail.com>
Cc: Anandu Padinhare <Anandu.Padinhare@electrifex.com>,
maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
David Wu <david.wu@rock-chips.com>,
stable@vger.kernel.org, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org
Subject: Re: [PATCH net] net: stmmac: retry a failed RX refill from a timer
Date: Sun, 22 Nov 2026 22:09:40 +0100 [thread overview]
Message-ID: <3303844cdf7c00c5369453eb91027c1b@tipi-net.de> (raw)
In-Reply-To: <CAH5Ym4jkX_tD58Gtd-mzruB+hqHK7s_9knNWh+gMqUjwuYyVPA@mail.gmail.com>
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
prev parent reply other threads:[~2026-11-22 21:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 7:49 [PATCH net] net: stmmac: retry a failed RX refill from a timer Anandu Padinhare
2026-11-22 18:01 ` Nicolai Buchwitz
2026-11-22 20:20 ` Sam Edwards
2026-11-22 20:37 ` Nicolai Buchwitz
2026-11-22 21:02 ` Sam Edwards
2026-11-22 21:09 ` Nicolai Buchwitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3303844cdf7c00c5369453eb91027c1b@tipi-net.de \
--to=nb@tipi-net.de \
--cc=Anandu.Padinhare@electrifex.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cfsworks@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=david.wu@rock-chips.com \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=sdf@fomichev.me \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox