[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241206081346.2fc81766@kernel.org>
Date: Fri, 6 Dec 2024 08:13:46 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>, Heiner Kallweit
<hkallweit1@...il.com>, Jonathan Corbet <corbet@....net>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Simon Horman <horms@...nel.org>, Maxime Chevallier
<maxime.chevallier@...tlin.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next v1 1/7] net: ethtool: plumb PHY stats to PHY
drivers
On Fri, 6 Dec 2024 09:11:32 +0000 Russell King (Oracle) wrote:
> Maybe:
>
> * The input structure is pre-initialised with ETHTOOL_STAT_NOT_SET and
> * the implementation must only change implemented statistics.
Yup, that's better!
FWIW I think my brain goes to talking about zero-init because for
per-queue or per-cpu stats some drivers do:
for each q:
struct->stat += q->stat;
without first setting to 0. And it _seems_ fine since NOT_SET is -1,
and the off-by-one is hard to spot. But for PHY stats this sort of
iteration is very unlikely.
Powered by blists - more mailing lists