]> git.dujemihanovic.xyz Git - linux.git/commit
net/sched: TC, fix raw counter initialization
authorOz Shlomo <ozsh@nvidia.com>
Thu, 16 Feb 2023 12:34:21 +0000 (12:34 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 15 Mar 2023 22:50:17 +0000 (15:50 -0700)
commitd1a0075ad6b693c2bd41e7aedb8a4f3b74b6999c
tree6b960fd7acd4b528c0602c1a664a0b3b182eb4b8
parent78dee7befd56987283c13877b834c0aa97ad51b9
net/sched: TC, fix raw counter initialization

Freed counters may be reused by fs core.
As such, raw counters may not be initialized to zero.

Cache the counter values when the action stats object is initialized to
have a proper base value for calculating the difference from the previous
query.

Fixes: 2b68d659a704 ("net/mlx5e: TC, support per action stats")
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act_stats.c