WSL2-Linux-Kernel/drivers/net/netdevsim
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
..
Makefile netdevsim: implement couple of testing devlink health reporters 2019-10-11 21:02:30 -07:00
bpf.c netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs 2020-02-03 15:32:20 -08:00
bus.c netdevsim: use __GFP_NOWARN to avoid memalloc warning 2020-02-03 15:32:20 -08:00
dev.c netdevsim: Ensure policer drop counter always increases 2020-05-22 16:05:42 -07:00
fib.c netdevsim: fix nsim_fib6_rt_create() error path 2020-01-17 11:00:57 +01:00
health.c devlink: Implicitly set auto recover flag when registering health reporter 2020-03-30 11:17:34 -07:00
ipsec.c net: netdevsim: Use scnprintf() for avoiding potential buffer overflow 2020-03-15 17:06:22 -07:00
netdev.c netdevsim: register port netdevices into net of device 2019-10-04 11:10:56 -07:00
netdevsim.h netdevsim: Add support for setting of packet trap group parameters 2020-03-30 17:54:58 -07:00