diff options
author | Sean Hefty <sean.hefty@intel.com> | 2011-08-08 15:31:51 -0700 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-13 09:49:51 -0700 |
commit | 0e0ec7e0638ef48e0c661873dfcc8caccab984c6 (patch) | |
tree | 54314a25a402244036a5417f098c70af441a56a8 /drivers/infiniband/core/uverbs_main.c | |
parent | 0a1405da9952a72dd587829a3321695adde7dca1 (diff) | |
download | op-kernel-dev-0e0ec7e0638ef48e0c661873dfcc8caccab984c6.zip op-kernel-dev-0e0ec7e0638ef48e0c661873dfcc8caccab984c6.tar.gz |
RDMA/core: Export ib_open_qp() to share XRC TGT QPs
XRC TGT QPs are shared resources among multiple processes. Since the
creating process may exit, allow other processes which share the same
XRC domain to open an existing QP. This allows us to transfer
ownership of an XRC TGT QP to another process.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_main.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 0cb69e0..9c877e2 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -206,8 +206,8 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, container_of(uobj, struct ib_uqp_object, uevent.uobject); idr_remove_uobj(&ib_uverbs_qp_idr, uobj); - if (qp->qp_type == IB_QPT_XRC_TGT) { - ib_release_qp(qp); + if (qp != qp->real_qp) { + ib_close_qp(qp); } else { ib_uverbs_detach_umcast(qp, uqp); ib_destroy_qp(qp); |