Article View: linux.kernel.netdev
Article #15608Re: [PATCH net-next v3 1/3] ethtool: add PHY receive frame and byte totals
From: netdev-bot+sashiko
Date: Fri, 13 Nov 2026 05:51
Date: Fri, 13 Nov 2026 05:51
80 lines
11550 bytes
11550 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] In Documentation/networking/ethtool-netlink.rst, the stats-group
table row for ETHTOOL_STATS_PHY (line 1668) changes the documented…
- [Low] The patch defines exactly which bytes rx_bytes_total /
RxOctetsTotal counts: Ethernet header, padding and FCS, but not…
--
ethtool: add PHY receive frame and byte totals
This patch adds optional rx_packets_total and rx_bytes_total counters to
struct ethtool_phy_stats. They are exposed in the phydev statistics group
as ETHTOOL_A_STATS_PHY_RX_PKTS_TOTAL and ETHTOOL_A_STATS_PHY_RX_BYTES_TOTAL.
Both totals include frames with errors, the byte total is defined to
include the Ethernet header, padding and FCS, and the netlink documentation
is updated to match.
> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
> index eba226c79ec36..5528d0f7afdd9 100644
> --- a/Documentation/networking/ethtool-netlink.rst
> +++ b/Documentation/networking/ethtool-netlink.rst
> @@ -1665,7 +1665,7 @@ the ``ETHTOOL_A_STATS_GROUPS`` bitset. Currently defined values are:
> ETHTOOL_STATS_ETH_PHY eth-phy Basic IEEE 802.3 PHY statistics (30.3.2.1.*)
> ETHTOOL_STATS_ETH_CTRL eth-ctrl Basic IEEE 802.3 MAC Ctrl statistics (30.3.3.*)
> ETHTOOL_STATS_RMON rmon RMON (RFC 2819) statistics
> - ETHTOOL_STATS_PHY phy Additional PHY statistics, not defined by IEEE
> + ETHTOOL_STATS_PHY phydev Additional PHY statistics, not defined by IEEE
[Severity: Low]
This isn't a bug, but this hunk changes the documented group name for
ETHTOOL_STATS_PHY from "phy" to "phydev", and the commit message does not
mention it.
The new name is correct and matches the kernel:
net/ethtool/stats.c:stats_std_names[] {
...
[ETHTOOL_STATS_PHY] = "phydev",
...
}
The new paragraph below refers to the phydev group, so keeping the fix in
this patch seems reasonable. Could the commit message mention the
correction, or could it go in a separate patch?
[ ... ]
> +The ``phydev`` group provides separate counters for successfully received
> +traffic and total received traffic. ``ETHTOOL_A_STATS_PHY_RX_PKTS``
> +(``RxFrames``) and ``ETHTOOL_A_STATS_PHY_RX_BYTES`` (``RxOctets``) count
> +successfully received frames and bytes. ``ETHTOOL_A_STATS_PHY_RX_PKTS_TOTAL``
> +(``RxFramesTotal``) and ``ETHTOOL_A_STATS_PHY_RX_BYTES_TOTAL`` (``RxOctetsTotal``)
> +include frames with errors. The total byte count includes the Ethernet header,
> +padding and FCS, but excludes the preamble and start frame delimiter. These
[Severity: Low]
Should these byte boundaries also apply to RxOctets?
This paragraph says which bytes RxOctetsTotal counts, but it gives no
such rule for RxOctets. The kernel-doc for rx_bytes in struct
ethtool_phy_stats in include/linux/ethtool.h still only says:
* @rx_bytes: Total successfully received bytes
A driver could report rx_bytes without FCS and rx_bytes_total with FCS,
and both would match the documentation. In that case, RxOctetsTotal minus
RxOctets would not be the number of bytes in errored frames.
No PHY driver in drivers/net/phy sets ethtool_phy_stats.rx_bytes yet. Can
the definition be made the same for both counters now, before a driver
depends on it?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261109-submit-acx00-phy-stats-v1-v3-0-fbc6327c5be4%40gmail.com
Technical Details
Message-ID:
<179454907898.2199510.14049135165340239195@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362436-linux-kernel-netdev=dewy.ruReferences:
<20261109-submit-acx00-phy-stats-v1-v3-1-fbc6327c5be4@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362436-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 1/3] ethtool: add PHY receive frame and byte totals Date: Fri, 13 Nov 2026 05:51:18 +0000 Organization: Usenet Network Message-ID: <179454907898.2199510.14049135165340239195@kernel.org> References: <20261109-submit-acx00-phy-stats-v1-v3-1-fbc6327c5be4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1280562"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ddqTebayczbJ/W7RSGjNUxf9qjA= sha256:bXp4q3XZM3LZ71enikvkAXf0DJ6nvAxavSeavVKmpGs= sha1:RH8pg2jG92PPJQvOIqGgUbE01g8= sha256:hGTomMIzK1oVl/y3n0e7Kc5ai8R4enNCob/EkRz9rLk= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 9D19A1144A6; Fri, 13 Nov 2026 09:28:24 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.5 X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b2cg3iDN1nqq; Fri, 13 Nov 2026 09:28:21 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362436-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 13CF1114418; Fri, 13 Nov 2026 09:28:13 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id B725562001B; Fri, 13 Nov 2026 05:51:49 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794549086; b=I7xbmmwl4DBuHMmIbY0HcO7mQolEC0qsY7R0FP3FNf04sR2lEmmiUfEZwRH8t4rn0w1i DHdThxZeypQ5/yuU3teg+PzFJ+maJctDQW0cGb5qfEiRSkFsuLusU/hyBx8lmQExP+D2O NAj4jP0Nn7O7GUIgZkmF52VteYHbOQ0VIk+kcGMZTnPH4WMMErdM4bUGD+/nzY5pcUocD UJA5EccPvb9GwsTnDtoMDLKQ40N3ooV9FWjLkxFfORr6+JBhO+9oh65m7zrFgxlMCUYQN 3zqnvCKJzyrGlkRfGpeaiM8JtmFyp7NoeJpGQtmZf1wUXiG99KRw3iKJACdxVeGX9kg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794549086; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=l0WoN34knT+NLDw2syaUA1McmMkTTpOg+RnQ9PosWrU=; b=JC/t7RZWDhI4BlXoxTYLwPGYveZ2O2PKcdNtWUCX843fOun5tqKDtLuSMvxxYuxGu5/O QaPkcRRWBHP+LJs3renRBmU9JGNiSj4sqFQ7TjkK4jcOuVHc0Sa+8SRTyb1tE6yfJ00mf UJOdZDa/cI5W4iVd6uCDfhyiWtpYFxCOB91jb18j/vr4nR8McQn/CxhtjL/1qHjvRoYel rwv1aXPuVvF2Aqg2+BbSfMbkMD6kQ8JkiLVJZuKuN0sBufgaVQdoXWYedlNfA5i9wPUX2 v/5s3AfRPE6lfxjFO07ER4SWzNNuxYJzB/1OwqLbfSGJa4hoz12mPsOlDium07YBQrg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=htgOrZSY; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67C90606A337; Fri, 13 Nov 2026 05:51:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=htgOrZSY X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794549080; b=Hb8YCrKhNP5xfadFQJvZy136pusubkke/6MNznkuInUcFiI8ae7Er8a1C7xCs3O3fBT1 1P7tUyX49uZ5+tlqHjffwFJTudN8ND9AEWW1pLRvvhl8sjQsqtwyD6zAp/bpBx5yWN9V0 mhOD0lwgavzoOarLW7mZtxRShFh/Hv9GLx7TKZoXUvi8UGN/hOjzFEZWS7PHQO90aamqx vMkbNDTZ5b16tC6vMaAfcrkwZX2rs9eq7Rl65pb23BEcRm0+u1LVFMRpPSP+hDVU+U1s3 +yuziLhnzOMEn/Q0SGooafAvg1GolxrNGNYz+4qlhNTksSEW8ALD3Fq1lEr/Dw3nkkw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794549080; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=l0WoN34knT+NLDw2syaUA1McmMkTTpOg+RnQ9PosWrU=; b=2TP6OGLFCnnkDB+BvL3Z4vTAA7TqQxsrMyN15hXKt8V2p51DXCaTqPGeNwbY1GaM7AOL ZSf7Mrt+hc1UXHR0oXSbofEHKcwqWu/aI4y0p0T5OkCz3McmB8Hcgn9iQD40diSGZtsIm p3EoS1QS/jRU/dbVwbwrPLc8Ob33vQIvzGO7hyXqhQhvANPvMmSxQJXwQv9l1HFpvZ8a3 XG9Luplj3M0tPbgAy9vQa286akADVlgcG3nmQQJ98KY0GrtioztwY09z308zEDgQsRcuh QXXR+TkZN8DURoygsOcVxGY1tXPcbp1rnfjo//T3wI51M0OP3Nay4fPhOXvSVOkaYow== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=htgOrZSY; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84E6A606A321; Fri, 13 Nov 2026 05:51:20 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 791651F000C4; Fri, 13 Nov 2026 05:51:19 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794549080; bh=l0WoN34knT+NLDw2syaUA1McmMkTTpOg+RnQ9PosWrU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=htgOrZSYyhQjK8JsRwbRMnbjPU85kWVpzG/UekeuXCBGrv+IGwPhLroJpwPr2NlZP 4vq1/s632R2fh7zspZm3S5pv6E1Z5TBaSqFFp+zAG7qwzSMP435D0vZIyxPeCOZ65w gLlKYdCyGDf47YfA/nCE9X+6TujGd1YU3+wAh5E8CIV+yWqk+5uUHO8erIThzuECFl 3iy5PWaVPcDYfHrYp9o0kxyP8UnB2+bT6KPqIdcqI6MGJIbih2dBcxb2YWlwUp1BF2 GV67WjCAsVk6gsnmYAJz8+Gi0bBCrP7sZtv7paSp8nIj96VBaVd0dQyQjsocuhsvqq SuKVmlELUp7NA== X-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 X-In-Reply-To: <20261109-submit-acx00-phy-stats-v1-v3-1-fbc6327c5be4@gmail.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list