Commit c9f55742 authored by Mark Zhang's avatar Mark Zhang Committed by Jason Gunthorpe

RDMA/counter: Only bind user QPs in auto mode

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: 99fa331d ("RDMA/counter: Add "auto" configuration mode support")
Link: https://lore.kernel.org/r/20200702082933.424537-3-leon@kernel.orgSigned-off-by: default avatarMark Zhang <markz@mellanox.com>
Reviewed-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 7c97f3ad
...@@ -276,7 +276,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port) ...@@ -276,7 +276,7 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port)
struct rdma_counter *counter; struct rdma_counter *counter;
int ret; int ret;
if (!qp->res.valid) if (!qp->res.valid || rdma_is_kernel_res(&qp->res))
return 0; return 0;
if (!rdma_is_port_valid(dev, port)) if (!rdma_is_port_valid(dev, port))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment