net/mlx5: Correctly initialize last use of flow counters
Currently, last use timestamp is initialized to zero.
This is not the expected value by higher layers such as
when we do TC action offloading. To fix that, set it to
the current time, e.g when the counter/rule is offloaded.
This is the same behaviour of non-offloaded TC actions.
Fixes: 43a335e055
('mlx5_core: Flow counters infrastructure')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
32dba76a7a
commit
e83d6955fe
|
@ -218,6 +218,7 @@ struct mlx5_fc *mlx5_fc_create(struct mlx5_core_dev *dev, bool aging)
|
|||
goto err_out;
|
||||
|
||||
if (aging) {
|
||||
counter->cache.lastuse = jiffies;
|
||||
counter->aging = true;
|
||||
|
||||
spin_lock(&fc_stats->addlist_lock);
|
||||
|
|
Loading…
Reference in New Issue