aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-05-14 02:55:30 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:01 -0800
commit15e15274e789155242de292e039ff0be81464baa (patch)
treef2c8b9134595d2d89b81d09ae2b31e9f2dbba37e
parent95cd7c74934fd45ec6cc7f1efdf1d1f78f8b6447 (diff)
downloadlibmthca-15e15274e789155242de292e039ff0be81464baa.tar.gz
Add userspace side of {attach,detach}_mcast verbs
Signed-off-by: Roland Dreier <roland@topspin.com>
-rw-r--r--src/mthca.c4
-rw-r--r--src/mthca.h2
-rw-r--r--src/verbs.c10
3 files changed, 15 insertions, 1 deletions
diff --git a/src/mthca.c b/src/mthca.c
index 1bf6d1b..1501558 100644
--- a/src/mthca.c
+++ b/src/mthca.c
@@ -109,7 +109,9 @@ static struct ibv_context_ops mthca_ctx_ops = {
.modify_qp = mthca_modify_qp,
.destroy_qp = mthca_destroy_qp,
.create_ah = mthca_create_ah,
- .destroy_ah = mthca_destroy_ah
+ .destroy_ah = mthca_destroy_ah,
+ .attach_mcast = mthca_attach_mcast,
+ .detach_mcast = mthca_detach_mcast
};
static struct ibv_context *mthca_alloc_context(struct ibv_device *ibdev,
diff --git a/src/mthca.h b/src/mthca.h
index d98e58d..35eb176 100644
--- a/src/mthca.h
+++ b/src/mthca.h
@@ -298,5 +298,7 @@ extern int mthca_destroy_ah(struct ibv_ah *ah);
extern int mthca_alloc_av(struct mthca_pd *pd, struct ibv_ah_attr *attr,
struct mthca_ah *ah);
extern void mthca_free_av(struct mthca_ah *ah);
+extern int mthca_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid);
+extern int mthca_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid);
#endif /* MTHCA_H */
diff --git a/src/verbs.c b/src/verbs.c
index 420db5c..7a33c0e 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -422,3 +422,13 @@ int mthca_destroy_ah(struct ibv_ah *ah)
free(ah);
return 0;
}
+
+int mthca_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid)
+{
+ return ibv_cmd_attach_mcast(qp, gid, lid);
+}
+
+int mthca_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid)
+{
+ return ibv_cmd_detach_mcast(qp, gid, lid);
+}