RDMA/counter: Only bind user QPs in auto mode
[ Upstream commit c9f557421e505f75da4234a6af8eff46bc08614b ] In auto mode only bind user QPs to a dynamic counter, since this feature is mainly used for system statistic and diagnostic purpose, while there's no need to counter kernel QPs so far. Fixes: 99fa331dc862 ("RDMA/counter: Add "auto" configuration mode support") Link: https://lore.kernel.org/r/20200702082933.424537-3-leon@kernel.org Signed-off-by: Mark Zhang <markz@mellanox.com> Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cf304df99f
commit
e5a9bb4f12
@ -284,7 +284,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port)
|
||||
struct rdma_counter *counter;
|
||||
int ret;
|
||||
|
||||
if (!qp->res.valid)
|
||||
if (!qp->res.valid || rdma_is_kernel_res(&qp->res))
|
||||
return 0;
|
||||
|
||||
if (!rdma_is_port_valid(dev, port))
|
||||
|
Loading…
x
Reference in New Issue
Block a user