summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/siw/siw_qp_rx.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_qp_rx.c
parent4768820243d71d49f1044b3f911ac3d52bdb79af (diff)
downloadlinux-stable-58fb0b5625ac976d907427ab639cdbf1aaefdac5.tar.gz
linux-stable-58fb0b5625ac976d907427ab639cdbf1aaefdac5.tar.bz2
linux-stable-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_qp_rx.c')
-rw-r--r--drivers/infiniband/sw/siw/siw_qp_rx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/siw/siw_qp_rx.c b/drivers/infiniband/sw/siw/siw_qp_rx.c
index c0a887240325..9ccce2909ac4 100644
--- a/drivers/infiniband/sw/siw/siw_qp_rx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_rx.c
@@ -68,7 +68,7 @@ static int siw_rx_umem(struct siw_rx_stream *srx, struct siw_umem *umem,
return -EFAULT;
}
if (srx->mpa_crc_hd) {
- if (rx_qp(srx)->kernel_verbs) {
+ if (rdma_is_kernel_res(&rx_qp(srx)->base_qp.res)) {
crypto_shash_update(srx->mpa_crc_hd,
(u8 *)(dest + pg_off), bytes);
kunmap_atomic(dest);
@@ -388,7 +388,7 @@ static struct siw_wqe *siw_rqe_get(struct siw_qp *qp)
struct siw_rqe *rqe2 = &srq->recvq[off];
if (!(rqe2->flags & SIW_WQE_VALID)) {
- srq->armed = 0;
+ srq->armed = false;
srq_event = true;
}
}
@@ -1264,7 +1264,7 @@ static int siw_rdmap_complete(struct siw_qp *qp, int error)
if (wc_status == SIW_WC_SUCCESS)
wc_status = SIW_WC_GENERAL_ERR;
- } else if (qp->kernel_verbs &&
+ } else if (rdma_is_kernel_res(&qp->base_qp.res) &&
rx_type(wqe) == SIW_OP_READ_LOCAL_INV) {
/*
* Handle any STag invalidation request