aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-10-30 17:45:12 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 11:35:58 -0800
commit1497ebe17877c350166fc61d87a1b3d8458dfcef (patch)
tree8f47c4fd186a0c50a15aee59524d8b363bd6426e
parent0117bb412dc74ade769736134f8e810c295364f7 (diff)
downloadlibibverbs-1497ebe17877c350166fc61d87a1b3d8458dfcef.tar.gz
Fix CQ overrun in SRQ pingpong example
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog6
-rw-r--r--examples/srq_pingpong.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 057d558..b38c257 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-30 Roland Dreier <roland@cisco.com>
+
+ * examples/srq_pingpong.c (pp_init_ctx): Create CQ with rx_depth +
+ num_qp entries, instead of just rx_depth + 1 entries, because
+ there can be one send completion pending for each QP.
+
2005-10-25 Roland Dreier <roland@cisco.com>
* Release version 1.0-rc4.
diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c
index f8f7a3e..f922be9 100644
--- a/examples/srq_pingpong.c
+++ b/examples/srq_pingpong.c
@@ -376,7 +376,7 @@ static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size,
return NULL;
}
- ctx->cq = ibv_create_cq(ctx->context, rx_depth + 1, NULL,
+ ctx->cq = ibv_create_cq(ctx->context, rx_depth + num_qp, NULL,
ctx->channel, 0);
if (!ctx->cq) {
fprintf(stderr, "Couldn't create CQ\n");