summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-08-08 09:36:53 -0700
committerJakub Kicinski <kuba@kernel.org>2026-08-10 16:47:49 -0700
commit855631afe0f5a1fac96abdd8a30e3ccda966e15f (patch)
treef055c387ea6f08ea21d462b1c3880ac103915107 /tools/perf/scripts/python/bin
parentf4cf60568747edddb255106154684f8d56b1aa1b (diff)
selftests: drv-net: let ethtool stats settle before reading
Some devices refresh the statistics exposed via ethtool only periodically, every stats-block-usecs (as reported by ethtool -c). ethtool_std_stats and ethtool_rmon sample the counters immediately after generating traffic, so on such devices they can read stale values and fail with a delta short of the packets just sent. Add a hw_stats_settle() helper which sleeps for 1.25x the configured stats-block-usecs (defaulting to 20ms when the device reports no, or a zero, period). Use it for ethtool std stats and RMON. The 1.25x/20msec heuristic matches what the Python tests do. Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20260808163653.2460381-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions