[PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all
James Hilliard
james.hilliard1 at gmail.com
Fri Nov 20 10:46:10 PST 2026
On Fri, Nov 20, 2026 at 11:30 AM Maxime Chevallier
<maxime.chevallier at bootlin.com> wrote:
>
> Hi,
>
> On 11/20/26 16:32, James Hilliard wrote:
> > 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
>
More information about the linux-arm-kernel
mailing list