]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix the order of fc_stats cleanup
authorGavi Teitz <gavi@mellanox.com>
Sun, 11 Aug 2019 06:21:20 +0000 (09:21 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 20 Aug 2019 20:08:19 +0000 (13:08 -0700)
commitd2cd1a6c0df8c61e88e385c97ad555041d5afc25
tree0be89097a753f85a5bfb4c3e7dbdd9dd2a22f1a3
parentb7eee6785df93cf81d9240a755787933e3fa6283
net/mlx5: Fix the order of fc_stats cleanup

Previously, mlx5_cleanup_fc_stats() would cleanup the flow counter
pool beofre releasing all the counters to it, which would result in
flow counter bulks not getting freed. Resolve this by changing the
order in which elements of fc_stats are cleaned up, so that the flow
counter pool is cleaned up after all the counters are released.

Also move cleanup actions for freeing the bulk query memory and
destroying the idr to the end of mlx5_cleanup_fc_stats().

Signed-off-by: Gavi Teitz <gavi@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c