aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/siw/siw_cq.c
diff options
context:
space:
mode:
authorBernard Metzler <bmt@zurich.ibm.com>2019-12-10 17:17:29 +0100
committerJason Gunthorpe <jgg@mellanox.com>2020-01-03 15:54:09 -0400
commit58fb0b5625ac976d907427ab639cdbf1aaefdac5 (patch)
tree9367f1ef8f355abc7bdf01af0c9057bee2e42321 /drivers/infiniband/sw/siw/siw_cq.c
parentRDMA/hns: Simplify the calculation and usage of wqe idx for post verbs (diff)
downloadlinux-dev-58fb0b5625ac976d907427ab639cdbf1aaefdac5.tar.xz
linux-dev-58fb0b5625ac976d907427ab639cdbf1aaefdac5.zip
RDMA/siw: Simplify QP representation
Change siw_qp to contain ib_qp. Use rdma_is_kernel_res() on contained ib_qp to distinguish kernel level from user level applications resources. Apply same mechanism for kernel/user level application detection to completion queues. Link: https://lore.kernel.org/r/20191210161729.31598-1-bmt@zurich.ibm.com Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw/siw/siw_cq.c')
-rw-r--r--drivers/infiniband/sw/siw/siw_cq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/siw/siw_cq.c b/drivers/infiniband/sw/siw/siw_cq.c
index d8db3bee9da7..d68e37859e73 100644
--- a/drivers/infiniband/sw/siw/siw_cq.c
+++ b/drivers/infiniband/sw/siw/siw_cq.c
@@ -65,7 +65,7 @@ int siw_reap_cqe(struct siw_cq *cq, struct ib_wc *wc)
* reaped here, which do not hold a QP reference
* and do not qualify for memory extension verbs.
*/
- if (likely(cq->kernel_verbs)) {
+ if (likely(rdma_is_kernel_res(&cq->base_cq.res))) {
if (cqe->flags & SIW_WQE_REM_INVAL) {
wc->ex.invalidate_rkey = cqe->inval_stag;
wc->wc_flags = IB_WC_WITH_INVALIDATE;