RDMA/mlx5: Store the number of in_use cache mkeys instead of total_mrs
authorAharon Landau <aharonl@nvidia.com>
Tue, 26 Jul 2022 07:19:09 +0000 (10:19 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 27 Jul 2022 17:45:48 +0000 (14:45 -0300)
commit19591f134c59703dfc272356808e6fe2037d0d40
tree5a464250d19abffc21fcb5aacf1b96804e9191d3
parent86457a92df1bebdcd8e20afa286427e4b525aa08
RDMA/mlx5: Store the number of in_use cache mkeys instead of total_mrs

total_mrs is used only to calculate the number of mkeys currently in
use. To simplify things, replace it with a new member called "in_use" and
directly store the number of mkeys currently in use.

Link: https://lore.kernel.org/r/20220726071911.122765-4-michaelgur@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c