Re: [PATCH net-next 1/4] net: dsa: motorcomm: Fix stats64 error counter mapping

From: David Yang

Date: Tue Nov 10 2026 - 15:35:20 EST


On Tue, Nov 10, 2026 at 9:21 PM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > [Severity: Medium]
> > With the tx_fifo_errors mapping removed, TX undersize events are no
> > longer counted in any rtnl_link_stats64 field, and that includes
> > tx_errors. Is this intended?
> >
> > The tx_errors kernel-doc in include/uapi/linux/if_link.h says:
> >
> > * @tx_errors: Total number of transmit problems.
> > * This counter must include events counter by @tx_aborted_errors,
> > * @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
> > * @tx_window_errors and other errors not otherwise counted.
> >
> > A runt frame may not be a FIFO underrun. Could tx_undersize_errors still
> > be added to tx_errors as an error not otherwise counted?
>
> It should not be possible to send runt frame, i expect either the
> hardware, or the driver to pad them to 64 bytes. So i don't think what
> the LLM is saying is valid.
>
> However, it would be good to get this counter reported somewhere.
>
> Andrew

Probably, but it should be counted into tx_errors nevertheless IMO.
I've sent v2 covering this.