aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2006-08-23 21:50:00 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:07 -0800
commit1ce8eda4f646dd72d85c8f4c380eb0ebeb77e8be (patch)
tree5bb1c24b1d642617f4be95179d5372221044dffb
parent2dd73ae87a90c08b3f968491a2eeb042cf1b3b7a (diff)
downloadlibmthca-1ce8eda4f646dd72d85c8f4c380eb0ebeb77e8be.tar.gz
Handle new ibv_cmd_resize_cq() API
Add support for new libibverbs API, which adds parameters to ibv_cmd_resize_cq(). Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog6
-rw-r--r--src/verbs.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 85863d1..0126186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-23 Roland Dreier <rdreier@cisco.com>
+
+ * src/verbs.c (mthca_resize_cq): Add a test for
+ IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS to make libmthca work with newer
+ libibverbs libraries that add two parameters to ibv_cmd_resize_cq().
+
2006-08-09 Michael S. Tsirkin <mst@mellanox.co.il>
* src/qp.c (mthca_tavor_post_send, mthca_arbel_post_send): Fence
diff --git a/src/verbs.c b/src/verbs.c
index 753adc2..4924df0 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -297,7 +297,15 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe)
old_cqe = ibcq->cqe;
cmd.lkey = mr->lkey;
+#ifdef IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS
+ {
+ struct ibv_resize_cq_resp resp;
+ ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd,
+ &resp, sizeof resp);
+ }
+#else
ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd);
+#endif
if (ret) {
mthca_dereg_mr(mr);
mthca_free_buf(&buf);