diff options
| author | Ido Schimmel <[email protected]> | 2020-05-21 11:46:16 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-05-22 23:05:42 +0000 |
| commit | be43224fc0e4697ad0d03107cbaf1ecf26e7ee72 (patch) | |
| tree | 84a142dc5f23911f90d51d26d30717d46391aeae /tools/perf/scripts/python/stat-cpi.py | |
| parent | Merge tag 'rxrpc-fixes-20200520' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
| download | kernel-be43224fc0e4697ad0d03107cbaf1ecf26e7ee72.tar.gz kernel-be43224fc0e4697ad0d03107cbaf1ecf26e7ee72.zip | |
netdevsim: Ensure policer drop counter always increases
In case the policer drop counter is retrieved when the jiffies value is
a multiple of 64, the counter will not be incremented.
This randomly breaks a selftest [1] the reads the counter twice and
checks that it was incremented:
```
TEST: Trap policer [FAIL]
Policer drop counter was not incremented
```
Fix by always incrementing the counter by 1.
[1] tools/testing/selftests/drivers/net/netdevsim/devlink_trap.sh
Fixes: ad188458d012 ("netdevsim: Add devlink-trap policer support")
Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions
