Re: [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all

From
James Hilliard <james.hilliard1@gmail.com>
Date
2026-11-20 18:46:41
Also in
linux-arm-kernel, linux-sunxi
Reply to
Maxime Chevallier, 2026-11-20
On Fri, Nov 20, 2026 at 11:30 AM Maxime Chevallier
[off-list ref] wrote:
Hi,

On 11/20/26 16:32, James Hilliard wrote:
quoted
Packet captures on sun8i cannot currently inspect frames the driver
discards for Ethernet errors. Add opt-in rx-all support for complete
frames with a reported wire error and for runts the MAC can forward.

Set the runt-forwarding bit at hardware initialization and when rx-all
changes. Serialize live updates with the DMA controls in the same
register. Deliver these frames without claiming a verified checksum or
including them in the good-packet and good-byte totals. Keep counting
the wire errors even when the frames are delivered.
This deserves a series on its own. it's not only about sun8i, it add the
whole plumbing to stmmac itself. Is it something you've used and needed ?
I used the hardware error-forwarding controls on H616 while comparing
the AC200 PHY's CRC error counter with what the MAC delivered to DMA.
For example, the PHY counted both 63-byte and 64-byte frames with a bad
FCS, but only the 64-byte frames reached DMA. The use case for rx-all
is to inspect the frames the MAC can forward with a normal packet
capture. It isn't needed for normal reception.
This feels a bit strange as you answer to the series info bot that this
comes from Jakub's comment on the previous series, but I don't really
see the connection except that Jakub mentions RX_ALL.
My reply to the bot was about the checksum fix in patch 1. Jakub's point
was that a bad transport checksum alone shouldn't cause a packet to be
dropped. On sun8i the same hardware bit forwards both checksum and
Ethernet errors to DMA, so patch 1 enables forwarding and lets the
driver discard bad-FCS frames. That addresses his comment without
needing rx-all.
If you want and need this feature, you can submit that separately.
I'll send the checksum fix on its own and keep the rx-all support for a
separate net-next series.
Maxime
Thread (7 messages) 7 messages, 3 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help