]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Fix CQ overrun in SRQ pingpong example
authorRoland Dreier <rolandd@cisco.com>
Sun, 30 Oct 2005 17:45:12 +0000 (17:45 +0000)
committerRoland Dreier <rolandd@cisco.com>
Thu, 9 Nov 2006 19:35:58 +0000 (11:35 -0800)
Signed-off-by: Roland Dreier <rolandd@cisco.com>
ChangeLog
examples/srq_pingpong.c

index 057d558e06cedbf7c870f15007bb05ff7effea21..b38c257641e748dead5915799fd8994ae3757cd8 100644 (file)
--- 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.
index f8f7a3ec89ea14a02991396279fa6b97c4e3a88f..f922be94980e31b847700efa4ad294c0ef4cdb94 100644 (file)
@@ -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");