[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241220062214.3e8823ac@kernel.org>
Date: Fri, 20 Dec 2024 06:22:14 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, shuah@...nel.org, willemb@...gle.com, petrm@...dia.com,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next] selftests: drv-net: assume stats refresh is 0
if no ethtool -c support
On Fri, 20 Dec 2024 10:09:06 +0100 Andrew Lunn wrote:
> > @@ -234,7 +234,12 @@ from .remote import Remote
> > Good drivers will tell us via ethtool what their sync period is.
> > """
> > if self._stats_settle_time is None:
> > - data = ethtool("-c " + self.ifname, json=True)[0]
> > + data = {}
> > + try:
> > + data = ethtool("-c " + self.ifname, json=True)[0]
> > + except CmdExitFailure as e:
> > + if "Operation not supported" not in e.cmd.stderr:
> > + raise
>
> How important is this time to the test itself?
Just to be clear (because unfortunately git doesn't do a good job of
calling out Python method names in the diff :() this is part of a
method called wait_hw_stats_settle() within the test env class.
It's used by various tests which use/check device stats.
> If it is not available,
> can the test just default to 50ms and keep going? I would of thought
> we find more issues by running the test too slowly, than not running
> it at all, unless having the wrong timer makes it more flaky.
We already use zero for majority of driver which don't report stat
refresh:
data.get('stats-block-usecs', 0) / 1000 / 1000
^^^
this patch just does the same thing not only if the driver doesn't
report 'stats-block-usecs' but also if it doesn't support -c at all.
Powered by blists - more mailing lists