diff options
author | Mark Zhang <[email protected]> | 2020-07-02 11:29:33 +0300 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2020-07-10 16:50:53 -0300 |
commit | cbeb7d896c0f296451ffa7b67e7706786b8364c8 (patch) | |
tree | 41cf07c8323dceaec0f1d4d867eee967c469d948 | |
parent | c9f557421e505f75da4234a6af8eff46bc08614b (diff) |
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: 1bd8e0a9d0fd ("RDMA/counter: Allow manual mode configuration support")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Zhang <[email protected]>
Reviewed-by: Maor Gottlieb <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r-- | drivers/infiniband/core/counters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/counters.c b/drivers/infiniband/core/counters.c index c88139fa859e..edf77d061127 100644 --- a/drivers/infiniband/core/counters.c +++ b/drivers/infiniband/core/counters.c @@ -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; } |