diff options
| author | Leon Romanovsky <[email protected]> | 2020-11-17 07:01:47 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2020-11-27 15:38:46 +0000 |
| commit | 2b1f747071c5ce5ad571d80c1541b732cf07f9c1 (patch) | |
| tree | 3c87c912b4298d1c59e400a8b1ead3cfb433b644 /drivers/infiniband/core/counters.c | |
| parent | RDMA/core: Track device memory MRs (diff) | |
| download | kernel-2b1f747071c5ce5ad571d80c1541b732cf07f9c1.tar.gz kernel-2b1f747071c5ce5ad571d80c1541b732cf07f9c1.zip | |
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/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/infiniband/core/counters.c')
| -rw-r--r-- | drivers/infiniband/core/counters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/counters.c b/drivers/infiniband/core/counters.c index 2c67ba6a2725..92745522250e 100644 --- a/drivers/infiniband/core/counters.c +++ b/drivers/infiniband/core/counters.c @@ -285,7 +285,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port) struct rdma_counter *counter; int ret; - if (!qp->res.valid || rdma_is_kernel_res(&qp->res)) + if (!rdma_restrack_is_tracked(&qp->res) || rdma_is_kernel_res(&qp->res)) return 0; if (!rdma_is_port_valid(dev, port)) |
