From: David Yang <mmyangfl@gmail.com>
To: netdev@vger.kernel.org
Cc: David Yang <mmyangfl@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 2/3] net: dsa: motorcomm: Fix RMON fragments stat
Date: Mon, 9 Nov 2026 02:29:27 +0800 [thread overview]
Message-ID: <20261108182931.1542638-3-mmyangfl@gmail.com> (raw)
In-Reply-To: <20261108182931.1542638-1-mmyangfl@gmail.com>
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.
Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
drivers/net/dsa/motorcomm/mib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/motorcomm/mib.c b/drivers/net/dsa/motorcomm/mib.c
index b8fe2c407c32..e9f28d446251 100644
--- a/drivers/net/dsa/motorcomm/mib.c
+++ b/drivers/net/dsa/motorcomm/mib.c
@@ -336,7 +336,7 @@ yt921x_dsa_get_rmon_stats(struct dsa_switch *ds, int port,
rmon_stats->undersize_pkts = u64_stats_read(&mib->rx_undersize_errors);
rmon_stats->oversize_pkts = u64_stats_read(&mib->rx_oversize_errors);
- rmon_stats->fragments = u64_stats_read(&mib->rx_alignment_errors);
+ rmon_stats->fragments = u64_stats_read(&mib->rx_fragment_errors);
/* rmon_stats->jabbers */
rmon_stats->hist[0] = u64_stats_read(&mib->rx_64byte);
--
2.53.0
next prev parent reply other threads:[~2026-11-08 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 18:29 [PATCH net-next v2 0/3] net: dsa: motorcomm: MIB fixup David Yang
2026-11-08 18:29 ` [PATCH net-next v2 1/3] net: dsa: motorcomm: Fix stats64 error counter mapping David Yang
2026-11-08 18:29 ` David Yang [this message]
2026-11-08 18:29 ` [PATCH net-next v2 3/3] net: dsa: motorcomm: Use safe 64-bit counter reader David Yang
2026-11-08 18:36 ` [PATCH net-next v2 0/3] net: dsa: motorcomm: MIB fixup netdev-bot+sinfo
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=20261108182931.1542638-3-mmyangfl@gmail.com \
--to=mmyangfl@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®