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

RDMA/counter: Allow manually bind QPs with different pids to same counter

In manual mode allow bind user QPs with different pids to same counter,
since this is allowed in auto mode.
Bind kernel QPs and user QPs to the same counter are not allowed.

Fixes: 1bd8e0a9 ("RDMA/counter: Allow manual mode configuration support")
Link: https://lore.kernel.org/r/20200702082933.424537-4-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 c9f55742
...@@ -471,7 +471,7 @@ int rdma_counter_bind_qpn(struct ib_device *dev, u8 port, ...@@ -471,7 +471,7 @@ int rdma_counter_bind_qpn(struct ib_device *dev, u8 port,
goto err; goto err;
} }
if (counter->res.task != qp->res.task) { if (rdma_is_kernel_res(&counter->res) != rdma_is_kernel_res(&qp->res)) {
ret = -EINVAL; ret = -EINVAL;
goto err_task; goto err_task;
} }
......
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