]> git.baikalelectronics.ru Git - 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)
commit6038e56b3ff8e4b1ab30249ae536c5ba57aa203e
treee35da3f31cf3d4cd4ef938ad8c5946a57c71c2c4
parent7325dc7acf9c16b3a101fb55dd36dc9430d694c3
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: 6abfdee7b89f ("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