Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by netdev-bot+sashiko
Thu, 26 Nov 2026 23:24
Re: [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time
Author: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 23:24
Date: Thu, 26 Nov 2026 23:24
60 lines
10469 bytes
10469 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads