From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>
Cc: robh@kernel.org, mfd@lists.linux.dev, conor+dt@kernel.org,
devicetree@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH net-next v23 8/9] net: dsa: mt7530: generalize and move common function to lib module
Date: Sat, 26 Sep 2026 18:25:22 +0000 [thread overview]
Message-ID: <20260926182522.C63F21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925182435.21207-9-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net/dsa: mt7530: lost multicast counter in rtnl_link_stats64
--
commit 7c73e5182e23c339dc9a92fe7e7c4d4b45721dd7
Author: Christian Marangi <ansuelsmth@gmail.com>
net: dsa: mt7530: generalize and move common function to lib module
This commit introduces a library module for MT7530 switches, moving common
functions there to prepare for Airoha switch support. The migrated functions
are generalized using the reg_field regmap API.
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
[ ... ]
> @@ -861,38 +833,40 @@ static void mt7530_read_port_stats64(struct mt7530_priv *priv, int port,
> * To simulate a global frame counter, read Unicast and addition Multicast
> * and Broadcast later
> */
> - mt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_UNICAST, 1,
> - &storage->rx_packets);
> - mt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_MULTICAST, 1,
> - &storage->multicast);
> - storage->rx_packets += storage->multicast;
> - mt7530_read_port_stats(priv, port, MT7530_PORT_MIB_RX_BROADCAST, 1,
> - &data);
> + mt7530_lib_read_port_stats(lib_priv->fields[MT7530_MIB_RX_UNICAST],
> + NULL, port, &storage->rx_packets);
> + mt7530_lib_read_port_stats(lib_priv->fields[MT7530_MIB_RX_MULTICAST],
> + NULL, port, &data);
> + storage->rx_packets += data;
[Severity: Medium]
Does this refactoring inadvertently drop the assignment to storage->multicast?
The hardware multicast counter is correctly read into the local data variable
and added to rx_packets, but it is no longer being assigned to
storage->multicast as it was in the original code. This will cause the
multicast statistics metric (exported via rtnl_link_stats64) to permanently
report 0.
> + mt7530_lib_read_port_stats(lib_priv->fields[MT7530_MIB_RX_BROADCAST],
> + NULL, port, &data);
> storage->rx_packets += data;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925182435.21207-1-ansuelsmth@gmail.com?part=8
next prev parent reply other threads:[~2026-09-26 18:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 18:24 [PATCH net-next v23 0/9] net: dsa: Add Airoha AN8855 support Christian Marangi
2026-09-25 18:24 ` [PATCH net-next v23 1/9] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-25 18:24 ` [PATCH net-next v23 2/9] dt-bindings: net: Document support for AN8855 Switch Internal PHY Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-29 20:34 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 3/9] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-29 20:35 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 4/9] mfd: an8855: Add support for Airoha AN8855 Switch Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-29 20:35 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 5/9] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-27 18:45 ` Andrew Lunn
2026-09-29 20:35 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 6/9] net: dsa: tag_mtk: add Airoha variant usage of this TAG Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-27 18:49 ` Andrew Lunn
2026-09-29 20:35 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 7/9] MAINTAINERS: add myself as maintainer for Airoha AN8855 Switch Christian Marangi
2026-09-27 18:51 ` Andrew Lunn
2026-09-25 18:24 ` [PATCH net-next v23 8/9] net: dsa: mt7530: generalize and move common function to lib module Christian Marangi
2026-09-26 18:25 ` sashiko-bot [this message]
2026-09-27 19:02 ` Andrew Lunn
2026-09-27 20:28 ` Christian Marangi
2026-09-27 21:48 ` Andrew Lunn
2026-09-29 20:35 ` netdev-bot+sashiko
2026-09-25 18:24 ` [PATCH net-next v23 9/9] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2026-09-26 18:25 ` sashiko-bot
2026-09-27 19:15 ` Andrew Lunn
2026-09-29 20:35 ` netdev-bot+sashiko
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=20260926182522.C63F21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.