Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] ethtool: unagreed UAPI addition of
ETHTOOL_A_STATS_PHY_RX_BYTES_TOTAL
--
quoted hunk ↗ jump to hunk
diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
--- a/include/uapi/linux/ethtool_netlink.h
+++ b/include/uapi/linux/ethtool_netlink.h
@@ -202,6 +202,7 @@ enum {
ETHTOOL_A_STATS_PHY_TX_PKTS,
ETHTOOL_A_STATS_PHY_TX_BYTES,
ETHTOOL_A_STATS_PHY_TX_ERRORS,
+ ETHTOOL_A_STATS_PHY_RX_BYTES_TOTAL,
/* add new constants above here */
__ETHTOOL_A_STATS_PHY_CNT,
[Severity: Medium]
This patch adds three things:
- ETHTOOL_A_STATS_PHY_RX_BYTES_TOTAL to the uAPI enum
- a new RxOctetsTotal entry in stats_phy_names[]
- rx_bytes_total in struct ethtool_phy_stats
Once this ships, the attribute and the string are uAPI. We cannot
change or remove them later.
On v3, Andrew and Oleksij both objected to adding generic PHY counters
just because the ACx00 happens to expose the registers. They asked for
a concrete use case. v5 drops the packet total by deriving it in the
driver, but the byte total is still here. I don't see that use case
answered in the commit message.
What does user space do with RxOctetsTotal that it cannot already do
with RxOctets, RxErrors and the MAC level counters?
The patch also rewrites the kernel-doc for the existing rx_bytes field.
It now says the count includes header, padding and FCS, and excludes
preamble and SFD. That narrows the meaning of a counter drivers already
report through stats_put_phydev_stats(). Two questions on that:
- Have the drivers that already fill phydev_stats.rx_bytes been
checked against the new definition?
- What should a PHY that counts preamble/SFD, or uses some other
boundary, do? Leave both counters at ETHTOOL_STAT_NOT_SET, or
report a value that doesn't match the documented semantics?
I'd like the PHY maintainers to agree on the semantics before this
goes in. If ACx00 is the only user, could the errored-frame byte
total stay a PHY driver private statistic for now?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261115-submit-acx00-phy-stats-v1-v5-0-ed81a7f54373%40gmail.com