[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107180500.34be6ded@kernel.org>
Date: Tue, 7 Jan 2025 18:05:00 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "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>, Mateusz Polchlopek <mateusz.polchlopek@...el.com>,
kernel@...gutronix.de, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, Simon Horman <horms@...nel.org>, Russell King
<linux@...linux.org.uk>, Maxime Chevallier <maxime.chevallier@...tlin.com>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next v5 6/8] ethtool: add helper to prevent invalid
statistics exposure to userspace
On Mon, 6 Jan 2025 09:32:59 +0100 Oleksij Rempel wrote:
> Introduce a new helper function, `ethtool_stat_add`, to update 64-bit
> statistics with proper handling of the reserved value
> `ETHTOOL_STAT_NOT_SET`. This ensures that statistics remain valid and
> are always reported to userspace, even if the driver accidentally sets
> `ETHTOOL_STAT_NOT_SET` during an update.
u64 can't wrap. If it could we should be using a wider type
to count packets/bytes. I don't see the need for this, sorry
for missing the discussion.
Powered by blists - more mailing lists