aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDotan Barak <dotanb@mellanox.co.il>2006-02-14 01:15:51 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:05 -0800
commit069b8fb3832972e224e15e18782a9c324042801f (patch)
tree479ae2a08207ac512a7a8d39c3fa963baa63d2cd
parentd818c858076fab595be9541c124d60f52d229189 (diff)
downloadlibmthca-069b8fb3832972e224e15e18782a9c324042801f.tar.gz
libmthca implementation of query QP and query SRQ
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog5
-rw-r--r--src/mthca.c2
-rw-r--r--src/mthca.h5
-rw-r--r--src/verbs.c17
4 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f0a04d..a416204 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-13 Dotan Barak <dotanb@mellanox.co.il>
+
+ * src/verbs.c (mthca_query_qp, mthca_query_srq): Add query QP and
+ query SRQ verbs.
+
2006-01-31 Roland Dreier <rdreier@cisco.com>
* src/mthca.h: Remove useless "extern" from function declarations.
diff --git a/src/mthca.c b/src/mthca.c
index 26c0d85..3507c8e 100644
--- a/src/mthca.c
+++ b/src/mthca.c
@@ -110,8 +110,10 @@ static struct ibv_context_ops mthca_ctx_ops = {
.destroy_cq = mthca_destroy_cq,
.create_srq = mthca_create_srq,
.modify_srq = mthca_modify_srq,
+ .query_srq = mthca_query_srq,
.destroy_srq = mthca_destroy_srq,
.create_qp = mthca_create_qp,
+ .query_qp = mthca_query_qp,
.modify_qp = mthca_modify_qp,
.destroy_qp = mthca_destroy_qp,
.create_ah = mthca_create_ah,
diff --git a/src/mthca.h b/src/mthca.h
index 326b3f3..e579ce1 100644
--- a/src/mthca.h
+++ b/src/mthca.h
@@ -297,6 +297,8 @@ struct ibv_srq *mthca_create_srq(struct ibv_pd *pd,
int mthca_modify_srq(struct ibv_srq *srq,
struct ibv_srq_attr *attr,
enum ibv_srq_attr_mask mask);
+int mthca_query_srq(struct ibv_srq *srq,
+ struct ibv_srq_attr *attr);
int mthca_destroy_srq(struct ibv_srq *srq);
int mthca_alloc_srq_buf(struct ibv_pd *pd, struct ibv_srq_attr *attr,
struct mthca_srq *srq);
@@ -309,6 +311,9 @@ int mthca_arbel_post_srq_recv(struct ibv_srq *ibsrq,
struct ibv_recv_wr **bad_wr);
struct ibv_qp *mthca_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr);
+int mthca_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
+ enum ibv_qp_attr_mask attr_mask,
+ struct ibv_qp_init_attr *init_attr);
int mthca_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
enum ibv_qp_attr_mask attr_mask);
int mthca_destroy_qp(struct ibv_qp *qp);
diff --git a/src/verbs.c b/src/verbs.c
index 95f7d6b..405a801 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -439,6 +439,14 @@ int mthca_modify_srq(struct ibv_srq *srq,
return ibv_cmd_modify_srq(srq, attr, attr_mask, &cmd, sizeof cmd);
}
+int mthca_query_srq(struct ibv_srq *srq,
+ struct ibv_srq_attr *attr)
+{
+ struct ibv_query_srq cmd;
+
+ return ibv_cmd_query_srq(srq, attr, &cmd, sizeof cmd);
+}
+
int mthca_destroy_srq(struct ibv_srq *srq)
{
int ret;
@@ -564,6 +572,15 @@ err:
return NULL;
}
+int mthca_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
+ enum ibv_qp_attr_mask attr_mask,
+ struct ibv_qp_init_attr *init_attr)
+{
+ struct ibv_query_qp cmd;
+
+ return ibv_cmd_query_qp(qp, attr, attr_mask, init_attr, &cmd, sizeof cmd);
+}
+
int mthca_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
enum ibv_qp_attr_mask attr_mask)
{