From: netdev-bot+sashiko@kernel.org
To: brett.creeley@amd.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, sln@onemain.com,
netdev@vger.kernel.org, horms@kernel.org,
vadim.fedorenko@linux.dev, nikhil.rao@amd.com,
eric.joyner@amd.com, leitao@debian.org,
ArunKumar.Prakash@amd.com
Subject: Re: [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time
Date: Thu, 26 Nov 2026 23:24:42 +0000 [thread overview]
Message-ID: <179573548295.3135.15579756299984220359@kernel.org> (raw)
In-Reply-To: <20261125-ionic-get-fec-stats-v6-1-1ab49c729c00@amd.com>
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] Commit "ionic: access the extra_stats counters one at a time"
fixes a user-visible defect but has no Fixes: tag.
--
ionic: access the extra_stats counters one at a time
This commit stops ionic_port_init() from writing the IONIC_STAT_INVALID
markers into port_info->extra_stats with a memset() of the whole block.
It also stops ionic_extra_port_stats_get_count() from taking its snapshot
with a struct copy. Both now walk the block as an array of __le64, using
WRITE_ONCE() and READ_ONCE() on one counter at a time, so ethtool -S
cannot report a torn counter.
> Both run without a common lock: ionic_port_init() is called from the
> firmware recovery work, and an ethtool -S that got past the device
> present check before the netdev was detached can still be running.
> Neither memset() nor a struct copy guarantees the width of its
> accesses, so the snapshot can hold a counter that is neither its old
> value nor the marker, and ethtool -S then reports it. The
> .get_fec_stats handler added later in this series has the same need.
>
> [ ... ]
>
> Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
> Signed-off-by: Eric Joyner <eric.joyner@amd.com>
> Signed-off-by: Brett Creeley <brett.creeley@amd.com>
[Severity: Low]
The commit message describes a bug that users can see: ethtool -S can
report a torn counter. Should this patch carry a Fixes: tag?
The two constructs it replaces both come from the same commit. One is the
memset(&idev->port_info->extra_stats, 0xff, ...) in ionic_port_init(). The
other is the struct copy in ionic_extra_port_stats_get_count():
*pes_cache = idev->port_info->extra_stats;
That commit has already been applied to the net tree:
Fixes: cb683ff6ee07 ("ionic: Report "rx_bits_phy" stat to ethtool")
Other fixes in this series carry Fixes: tags. Examples are "ionic: report
FEC off as a supported link mode", "ionic: report the configured FEC mode
in ethtool_fecparam.fec" and "ionic: report the operational FEC mode from
ethtool --show-fec". That makes the missing tag here look unintentional.
Without the tag, stable and backport tooling will not pick this up for
kernels that contain cb683ff6ee07. If the torn read is not considered
worth backporting, could the commit message say so?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-ionic-get-fec-stats-v6-0-1ab49c729c00%40amd.com
next prev parent reply other threads:[~2026-11-26 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 23:22 [PATCH net-next v6 0/6] ionic: FEC reporting fixes and .get_fec_stats handler Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time Brett Creeley
2026-11-26 23:24 ` netdev-bot+sashiko [this message]
2026-11-25 23:22 ` [PATCH net-next v6 2/6] ionic: report FEC off as a supported link mode Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 3/6] ionic: report the configured FEC mode in ethtool_fecparam.fec Brett Creeley
2026-11-26 23:24 ` netdev-bot+sashiko
2026-11-25 23:22 ` [PATCH net-next v6 4/6] ionic: map the FEC type through a helper in ionic_get_fecparam() Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 5/6] ionic: report the operational FEC mode from ethtool --show-fec Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 6/6] ionic: Add .get_fec_stats ethtool handler Brett Creeley
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=179573548295.3135.15579756299984220359@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=ArunKumar.Prakash@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=eric.joyner@amd.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=netdev@vger.kernel.org \
--cc=nikhil.rao@amd.com \
--cc=pabeni@redhat.com \
--cc=sln@onemain.com \
--cc=vadim.fedorenko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox