summaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_verbs.h
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2012-04-29 16:04:22 +0200
committerRoland Dreier <roland@purestorage.com>2012-05-08 20:16:54 +0200
commitc3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1 (patch)
treef1802d86a4db8c263e6960c401c4f29be3f68b0a /include/rdma/ib_verbs.h
parentLinux 3.4-rc6 (diff)
downloadlinux-c3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1.tar.xz
linux-c3bccbfbb71f5e8a77129c7a069f5c5648cc9cf1.zip
IB/core: Use qp->usecnt to track multicast attach/detach
Just as we don't allow PDs, CQs, etc. to be destroyed if there are QPs that are attached to them, don't let a QP be destroyed if there are multicast group(s) attached to it. Use the existing usecnt field of struct ib_qp which was added by commit 0e0ec7e ("RDMA/core: Export ib_open_qp() to share XRC TGT QPs") to track this. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/rdma/ib_verbs.h')
-rw-r--r--include/rdma/ib_verbs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index c3cca5a4dacd..c84d1016618e 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -964,7 +964,7 @@ struct ib_qp {
struct ib_srq *srq;
struct ib_xrcd *xrcd; /* XRC TGT QPs only */
struct list_head xrcd_list;
- atomic_t usecnt; /* count times opened */
+ atomic_t usecnt; /* count times opened, mcast attaches */
struct list_head open_list;
struct ib_qp *real_qp;
struct ib_uobject *uobject;