Thread (30 messages) 30 messages, 8 authors, 2024-12-10

Re: [PATCH net-next v1 1/7] net: ethtool: plumb PHY stats to PHY drivers

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-12-06 16:13:48
Also in: linux-doc, lkml

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