RDMA/core: Allow drivers to disable restrack DB
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 17 Nov 2020 07:01:47 +0000 (09:01 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Nov 2020 15:38:46 +0000 (11:38 -0400)
commit2b1f747071c5ce5ad571d80c1541b732cf07f9c1
tree3c87c912b4298d1c59e400a8b1ead3cfb433b644
parentb47a98efa97889c5b16d17e77eed3dc4500674eb
RDMA/core: Allow drivers to disable restrack DB

Driver QP types are special case with no IBTA restrictions. For example,
EFA implemented creation of this QP type as regular one, while mlx5
separated create to two step: create and modify. That separation causes to
the situation where DC QP (mlx5) is always added to the same xarray index
zero.

This change allows to drivers like mlx5 simply disable restrack DB
tracking, but it doesn't disable kref on the memory.

Fixes: 52e0a118a203 ("RDMA/restrack: Track driver QP types in resource tracker")
Link: https://lore.kernel.org/r/20201117070148.1974114-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/counters.c
drivers/infiniband/core/restrack.c
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/hw/mlx5/qp.c
include/rdma/restrack.h