Skip to content

Commit

Permalink
RDMA/counter: Only bind user QPs in auto mode
Browse files Browse the repository at this point in the history
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: 99fa331 ("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>
  • Loading branch information
Mark Zhang authored and Jason Gunthorpe committed Jul 10, 2020
1 parent 7c97f3a commit c9f5574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/counters.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,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))
Expand Down

0 comments on commit c9f5574

Please sign in to comment.