Linux Documentation
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: james.hilliard1@gmail.com
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, corbet@lwn.net,
	skhan@linuxfoundation.org, rdunlap@infradead.org,
	o.rempel@pengutronix.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v5 2/3] ethtool: add a PHY receive byte total
Date: Mon, 16 Nov 2026 08:06:07 +0000	[thread overview]
Message-ID: <179481636739.3136.18135231904320788064@kernel.org> (raw)
In-Reply-To: <20261115-submit-acx00-phy-stats-v1-v5-2-ed81a7f54373@gmail.com>

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

--

> 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

  parent reply	other threads:[~2026-11-16  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  7:45 [PATCH net-next v5 0/3] net: phy: report ACx00 receive statistics James Hilliard
2026-11-15  7:45 ` [PATCH net-next v5 1/3] docs: networking: correct the PHY statistics group name James Hilliard
2026-11-15 15:01   ` Andrew Lunn
2026-11-15  7:45 ` [PATCH net-next v5 2/3] ethtool: add a PHY receive byte total James Hilliard
2026-11-15 15:25   ` Andrew Lunn
2026-11-16  4:12     ` James Hilliard
2026-11-16  4:39       ` Andrew Lunn
2026-11-16  4:56         ` James Hilliard
2026-11-16  8:06   ` netdev-bot+sashiko [this message]
2026-11-15  7:45 ` [PATCH net-next v5 3/3] net: phy: acx00: report receive statistics James Hilliard
2026-11-16  8:06   ` 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=179481636739.3136.18135231904320788064@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    /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