Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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/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>

authored by

Mark Zhang and committed by
Jason Gunthorpe
cbeb7d89 c9f55742

+1 -1
+1 -1
drivers/infiniband/core/counters.c
··· 471 471 goto err; 472 472 } 473 473 474 - if (counter->res.task != qp->res.task) { 474 + if (rdma_is_kernel_res(&counter->res) != rdma_is_kernel_res(&qp->res)) { 475 475 ret = -EINVAL; 476 476 goto err_task; 477 477 }