Thread (15 messages) 15 messages, 4 authors, 2025-01-08

Re: [PATCH net-next v5 6/8] ethtool: add helper to prevent invalid statistics exposure to userspace

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-01-08 02:05:01
Also in: linux-doc, lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help