summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorMaxime Chevallier <maxime.chevallier@bootlin.com>2026-08-02 13:40:14 +0200
committerJakub Kicinski <kuba@kernel.org>2026-08-03 18:35:45 -0700
commitae88f78bc4ebae984a60ec4b4d6610cce5cfce0f (patch)
treef5683bc22b97975ebdeab57f9f3278d8647b5a90 /tools/perf/scripts/python/syscall-counts.py
parentb6a89c8ef34f84488f877e29b14f0c843bfdff51 (diff)
net: stmmac: ethtool: Address off-by-one when reading the coal rx-usecs
When reading the rx-usecs coalescing parameters on a dwmac variant that uses the RIWT for RX interrupt coalescing, we convert the riwt value to usecs : - One riwt cycle is 256 clock ticks, we compute how many ticks in $riwt cycles - divide that by how many ticks in a microsecond, and we get the rx-usecs. The opposite computation is done when setting the rx-usecs param. Because of the 256 ratio, we're subjected to off-by-one errors in the value read-back, which can be reliably measured on i.mx8MP : $ ethtool -C eth1 rx-usecs 102 $ ethtool -c eth1 Coalesce parameters for eth1: [...] rx-usecs: 101 Let's be more explicit about the rounding for the riwt to usec computations by using DIV_ROUND_CLOSEST, which solves the off-by-one. This does change the boundaries of accepted rx-usecs parameters, as the previously accepted values were in the 16-246 us range, and now fall into the 15-245 range on imx8mp. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260802114015.214212-3-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions