๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16988

Re: [PATCH net-next v5 2/3] ethtool: add a PHY receive byte total

#16988
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 08:06
65 lines
10529 bytes
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
Technical Details
Message-ID: <179481636739.3136.18135231904320788064@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364102-linux-kernel-netdev=dewy.ru
References: <20261115-submit-acx00-phy-stats-v1-v5-2-ed81a7f54373@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364102-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 2/3] ethtool: add a PHY receive byte total
Date: Mon, 16 Nov 2026 08:06:07 +0000
Organization: Usenet Network
Message-ID: <179481636739.3136.18135231904320788064@kernel.org>
References: <20261115-submit-acx00-phy-stats-v1-v5-2-ed81a7f54373@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2007803"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WWoGC4yAz8/NyD4YU29NBJzMNxE= sha256:Sg4jNGYnrY1Z4fCjezQsAwU0MKd6tWT3QFtxrLh2+wg=
	sha1:l75GlgiJS04FCEr8wOyM/jIeknI= sha256:cvXOxvLtUOR2vX2MkxvJavDVkO368x1GBXjBF13v7b4=
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 55051114B56; Mon, 16 Nov 2026 11:06:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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] 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 22SbFiIWPc5R;
	Mon, 16 Nov 2026 11:06:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-364102-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 98018114B36; Mon, 16 Nov 2026 11:06:14 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4722B2D0EC; Mon, 16 Nov 2026 08:06:11 +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=1794816369;
	b=zgj5pynbgeK7zJuBbv+OC3rzwvq1SM14ZbbmifNKWaLmhhD/EPOQT4fDXbksJc75LUXJ
	 oLkU4JV0Krwq6lOlBShIa07bTf1OVGS7ZHpc9rxpyS/KzgjJBPfPqOD/WO+PGBfnVfkYR
	 Fi1eFEkepsel78waGYxsjCFbZj0bKjZk8uE3o7c6BlCMk1QOmqIL8H6MKKGHUWypYc+B7
	 gSQtS0P2aC98DJFu7sr00EPQszhmKmbYCeZrrRTnVAuZLiT7AHjuzOnaP085ItAyDCA+N
	 +g0tLt+QfnRZw5+ycw44V7tuJjzXhum2Asf8MR73U5MVqjttsFk4Wk0lsqj4P85EPCA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794816369;
	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=WrNMjZ1cg44sx/ddOkwvwb0oBthUqp7HvPVwzzPtlto=;
	b=mbhfCTswiB7m70CIGzNCodfVRl067wOkI1/VZbuAbfr17O5wCaTaAe/ymAR1JeNPGEiR
	 qpU/ssllGLXcbHgbYIAKEh6oj7qvP8Ig5+C25cQBgdKGqGWMSqMuoXp8gP+rXZetgSkv/
	 wmpXhhrhetG1dAOVD8QueTiZUqi+L2ShhdZ7F/VYJh2FF0OntiMyO28YMT9T34okBKXon
	 fN2den+9/nYqYT6bM1JOmevz8X7s56IXfJXDm0HJvRNI8B63glfiGVbvJhsOyi+7k2EYa
	 +2GUE1WoZWCTH3keWMe/aRDwewOOcF/MsSPFf6QVH8eJlFu8EmUX9bwNNHEjqLJ29Ew==
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=eR3HSG8a;
	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 D6D2A606A33B;
	Mon, 16 Nov 2026 08:06:09 +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=eR3HSG8a
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=1794816369;
	b=AFQpoMlH7R5WeR5+DTezZ+S7EBLp22wyOz1pT9LFBP9FBNoJTYnGDZbtzQFrc0kqhrp0
	 F5u7sZufSzAa06TgrKkdssRMFI3WtQ0Xslm14/f6FLdyxCJrUYgxs1l27IBY4lZ7bX0bE
	 ewu/7i3m5MOr66CVJSkb/R3OaD5rvI2ZpGURZd6SYB5oaebn3X+/L6rvHZ71YmxeDlFgN
	 Zpj0jb/D+t3OvIvxQPsF1XGd9yIwMAbiZFpzJsZTcG0Cwl93KH3iakMW55NRdYzX2FLFE
	 3r0qbJXl3YQ/mE4NkrzzErpaUCbcWBv6piyUg6cSaZLKJjWLWE5rt0K/D7hUVeVZf5Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794816369;
	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=WrNMjZ1cg44sx/ddOkwvwb0oBthUqp7HvPVwzzPtlto=;
	b=juZQ+UOaidHjdMBesEJ5GdQQ2v1ttaNcccpxUPgq9fv3cHFfo4diADsVfV9KqA1TcCvC
	 kEFFZDzvAKc0Lt8eSLySEXDyXpCJGCJDocDFFpXnRrxKp1gYRaexzepNjW6oKVUqnOaZ/
	 uEuqVBjDX7KJBj69ne5aTG3cAlUx6XD8w+UxXqfjIUZdaj9um6PNCC21jt7xC0oMZRGPd
	 1DHJRxuAoD0wrFbc7xusJ1ueyRcZzxJSgmWR5G6eu4eneDVZ84UzW6wOuWheq2LGx2ONI
	 bI2ZXPB47Sm5iiqbnGByNqEt+LOgRlc9Cm9QrLEGDJD0HXMTIXbwjVJDsQv2LVkryuA==
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=eR3HSG8a;
	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 F3AC8606A323;
	Mon, 16 Nov 2026 08:06:08 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E148C1F000C5;
	Mon, 16 Nov 2026 08:06:07 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794816368;
	bh=WrNMjZ1cg44sx/ddOkwvwb0oBthUqp7HvPVwzzPtlto=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=eR3HSG8aqQvCc5iKa7+OuPC3WTp+uZjio6dYKNneCQYilzYfVf/cyyNo9qyjpE+KH
	 kel5CAqKTPzl8tSwRBK59MK9RZdMltpS0LGUTKiYVN7vC5HnjV6rwDc8EAwL6Emais
	 konJTZuJQnIvpsIbOzrwNJd3Cdznws/DmtPrtqy68Dsgga5wbIin6LyUTpbqSeAmRa
	 N2m1FVHmA5xDlA/PB8BYn2oLWD4gxLf254OYXN9jQNzEk0vSvGZRMeSkAsEfyQ57IK
	 79/myxEKgQiI19jtCQOPs3n6JK/esVHnWInJdW6/NpKD5IZKZtdXyVAJBVVmEq4o7s
	 ykDvjMFCtoi6A==
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: <20261115-submit-acx00-phy-stats-v1-v5-2-ed81a7f54373@gmail.com>
X-sashiko-severity: Medium
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