diff options
author | Aharon Landau <aharonl@nvidia.com> | 2022-07-26 10:19:09 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-07-27 14:45:48 -0300 |
commit | 19591f134c59703dfc272356808e6fe2037d0d40 (patch) | |
tree | 5a464250d19abffc21fcb5aacf1b96804e9191d3 /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | 86457a92df1bebdcd8e20afa286427e4b525aa08 (diff) |
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>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index e0eb666aefa1..da9202f4b5f3 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -755,12 +755,10 @@ struct mlx5_cache_ent { u8 fill_to_high_water:1; /* - * - total_mrs is stored mkeys plus all in use MRs that could be - * returned to the cache. * - limit is the low water mark for stored mkeys, 2* limit is the * upper water mark. */ - u32 total_mrs; + u32 in_use; u32 limit; /* Statistics */ |