diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-30 17:45:12 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 11:35:58 -0800 |
commit | 1497ebe17877c350166fc61d87a1b3d8458dfcef (patch) | |
tree | 8f47c4fd186a0c50a15aee59524d8b363bd6426e | |
parent | 0117bb412dc74ade769736134f8e810c295364f7 (diff) | |
download | libibverbs-1497ebe17877c350166fc61d87a1b3d8458dfcef.tar.gz |
Fix CQ overrun in SRQ pingpong example
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | examples/srq_pingpong.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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"); |