]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
RDMA/counter: Query a counter before release
authorMark Zhang <markz@mellanox.com>
Sun, 21 Jun 2020 11:00:00 +0000 (14:00 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Jun 2020 17:36:56 +0000 (14:36 -0300)
commitc1d869d64a1955817c4d6fff08ecbbe8e59d36f8
treee35da3f31cf3d4cd4ef938ad8c5946a57c71c2c4
parenta17f4bed811c60712d8131883cdba11a105d0161
RDMA/counter: Query a counter before release

Query a dynamically-allocated counter before release it, to update it's
hwcounters and log all of them into history data. Otherwise all values of
these hwcounters will be lost.

Fixes: f34a55e497e8 ("RDMA/core: Get sum value of all counters when perform a sysfs stat read")
Link: https://lore.kernel.org/r/20200621110000.56059-1-leon@kernel.org
Signed-off-by: Mark Zhang <markz@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/counters.c