aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/rdmavt_qp.h
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-22 13:00:55 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:26 -0500
commit4e74080b248701c0c2d1af2764bf02f9c531020a (patch)
treecef6036254dc84bce2c92130f9649c3f6abbf850 /include/rdma/rdmavt_qp.h
parentIB/rdmavt: Add post receive to rdmavt (diff)
downloadlinux-dev-4e74080b248701c0c2d1af2764bf02f9c531020a.tar.xz
linux-dev-4e74080b248701c0c2d1af2764bf02f9c531020a.zip
IB/rdmavt: Add multicast functions
This patch adds in the multicast add and remove functions as well as the ancillary infrastructure needed. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma/rdmavt_qp.h')
-rw-r--r--include/rdma/rdmavt_qp.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h
index e66bcc96d273..a97b95ba893f 100644
--- a/include/rdma/rdmavt_qp.h
+++ b/include/rdma/rdmavt_qp.h
@@ -50,6 +50,7 @@
#include <rdma/rdma_vt.h>
#include <rdma/ib_pack.h>
+#include <rdma/ib_verbs.h>
/*
* Atomic bit definitions for r_aflags.
*/
@@ -386,8 +387,27 @@ struct rvt_qp_ibdev {
};
/*
+ * There is one struct rvt_mcast for each multicast GID.
+ * All attached QPs are then stored as a list of
+ * struct rvt_mcast_qp.
+ */
+struct rvt_mcast_qp {
+ struct list_head list;
+ struct rvt_qp *qp;
+};
+
+struct rvt_mcast {
+ struct rb_node rb_node;
+ union ib_gid mgid;
+ struct list_head qp_list;
+ wait_queue_head_t wait;
+ atomic_t refcount;
+ int n_attached;
+};
+
+/*
* Since struct rvt_swqe is not a fixed size, we can't simply index into
- * struct hfi1_qp.s_wq. This function does the array index computation.
+ * struct rvt_qp.s_wq. This function does the array index computation.
*/
static inline struct rvt_swqe *rvt_get_swqe_ptr(struct rvt_qp *qp,
unsigned n)