Files
linux/drivers
Ido Schimmel be43224fc0 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: ad188458d0 ("netdevsim: Add devlink-trap policer support")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-22 16:05:42 -07:00
..
2020-03-23 07:59:38 +01:00
2020-04-10 11:32:22 +02:00
2020-04-04 18:07:59 -07:00
2020-04-16 13:52:31 -07:00
2020-03-19 23:04:32 -05:00
2020-04-17 06:05:29 -04:00
2020-04-20 10:19:22 -04:00
2020-03-19 07:41:03 +01:00