RDMA/mlx5: Change the cache structure to an RB-tree
authorMichael Guralnik <michaelgur@nvidia.com>
Wed, 25 Jan 2023 22:28:04 +0000 (00:28 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Jan 2023 17:04:09 +0000 (13:04 -0400)
commitb9584517832858a0f78d6851d09b697a829514cd
treeedbd61efcb53909a45bb403674a286f5391148bd
parent18b1746bddf5e7f6b2618966596d9517172a5cd7
RDMA/mlx5: Change the cache structure to an RB-tree

Currently, the cache structure is a static linear array. Therefore, his
size is limited to the number of entries in it and is not expandable.  The
entries are dedicated to mkeys of size 2^x and no access_flags. Mkeys with
different properties are not cacheable.

In this patch, we change the cache structure to an RB-tree.  This will
allow to extend the cache to support more entries with different mkey
properties.

Link: https://lore.kernel.org/r/20230125222807.6921-4-michaelgur@nvidia.com
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/odp.c