Re: [PATCH net-next 2/4] net: dsa: motorcomm: Fix RMON fragments stat

From
netdev-bot+sashiko@kernel.org
Date
2026-11-08 14:22:28
Also in
lkml
Reply to
David Yang, 2026-11-07
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This commit fixes a statistics bug that users can see, but it has
  no Fixes: tag.

--

net: dsa: motorcomm: Fix RMON fragments stat

This commit changes yt921x_dsa_get_rmon_stats() so that the RMON
etherStatsFragments counter is read from rx_fragment_errors, not
rx_alignment_errors. The alignment error counter is already exported as
AlignmentErrors and rx_frame_errors.
etherStatsFragments counts frames with a bad FCS due to fragmentation;
report the dedicated RX fragment error counter instead of the alignment
error one, which is already exported as AlignmentErrors and
rx_frame_errors.

Signed-off-by: David Yang <mmyangfl@gmail.com>
[Severity: Low]
Should this have a Fixes: tag? The wrong mapping looks like it goes back
to the commit that first added the driver.

In that commit, yt921x_dsa_get_rmon_stats() in drivers/net/dsa/yt921x.c
already had:

	rmon_stats->fragments = mib->rx_alignment_errors;

Since then the line has only been moved by "net: dsa: motorcomm: Split
MIB module" and converted to u64_stats_t. Neither change touched the
mapping.

Without the tag, stable kernels that contain the original driver will
keep reporting alignment errors as fragments in the ethtool RMON stats
for YT921x ports. Would something like this work?

Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")

Older trees will probably need a hand-adjusted backport. Before the move
to motorcomm/, the code is in drivers/net/dsa/yt921x.c and uses plain u64
fields, not u64_stats_t.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261107132040.1066996-1-mmyangfl%40gmail.com
Thread (9 messages) 9 messages, 2 authors, last reply 3h 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