[ewg] [PATCH] IB/perftest: increase CQ size to avoid overflow
Ralph Campbell
ralph.campbell at qlogic.com
Thu Oct 29 12:08:38 PDT 2009
When running the ib_send_bw test bidirectional, there can be
ctx->rx_depth + ctx->tx_depth/2 number of outstanding posted work
queue entries but the (shared) completion queue is only size
ctx->rx_depth. This can lead to completions being lost and the test
hanging. Since memory isn't limited in the microbenchmark test and
I think the ctx->tx_depth/2 send limit should probably be ctx->tx_depth,
make the CQ size be ctx->rx_depth + ctx->tx_depth.
Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
diff --git a/send_bw.c b/send_bw.c
index f842fb9..9624cfe 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -489,7 +489,8 @@ static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev,
}
}
- ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth, NULL, ctx->channel, 0);
+ ctx->cq = ibv_create_cq(ctx->context, ctx->rx_depth + ctx->tx_depth,
+ NULL, ctx->channel, 0);
if (!ctx->cq) {
fprintf(stderr, "Couldn't create CQ\n");
return NULL;
More information about the ewg
mailing list