]> git.openfabrics.org - ~shefty/rdma-dev.git/commit
rdma/verbs: Cleanup XRC TGT QPs when destroying XRCD
authorSean Hefty <sean.hefty@intel.com>
Fri, 27 May 2011 06:06:44 +0000 (23:06 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 22 Aug 2011 18:39:58 +0000 (11:39 -0700)
commit31198011184dbffc88d5ca0d45135475691d5988
tree513cfde89541192d40874722fce16c27b1006855
parent556544bd0b7d976e070de76c22dac6f9faf47b63
rdma/verbs: Cleanup XRC TGT QPs when destroying XRCD

XRC TGT QPs are intended to be shared among multiple users and
processes.  Allow the destruction of an XRC TGT QP to be done
explicitly through ib_destroy_qp() or when the XRCD is
destroyed.

To support destroying an XRC TGT QP, we need to track TGT QPs
with the XRCD.  When the XRCD is destroyed, all tracked XRC
TGT QPs are also cleaned up.

To avoid stale reference issues, if a user is holding a
reference on a TGT QP, we increment a reference count on
the QP.  The user releases the reference by calling
ib_release_qp.  This releases any access to the QP from
a user above verbs, but allows the QP to continue to
exist until destroyed by the xrcd.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h