Skip to content

Commit

Permalink
RDMA/counter: Allow manually bind QPs with different pids to same cou…
Browse files Browse the repository at this point in the history
…nter

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: 1bd8e0a ("RDMA/counter: Allow manual mode configuration support")
Link: https://lore.kernel.org/r/20200702082933.424537-4-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 c9f5574 commit cbeb7d8
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 @@ -471,7 +471,7 @@ int rdma_counter_bind_qpn(struct ib_device *dev, u8 port,
goto err;
}

if (counter->res.task != qp->res.task) {
if (rdma_is_kernel_res(&counter->res) != rdma_is_kernel_res(&qp->res)) {
ret = -EINVAL;
goto err_task;
}
Expand Down

0 comments on commit cbeb7d8

Please sign in to comment.