When ib_send_bw is run in bi-directional mode (-b), it doesn't
create enough completion queue entries for both the send *and*
the receive completions. Thus, CQ entries are lost due to the
queue being full and the test can hang.

Signed-off-by: Ralph Campbell <[email protected]>

diff --git a/send_bw.c b/send_bw.c
index f842fb9..d5c4e63 100755
--- 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->tx_depth + ctx->rx_depth,
+                               NULL, ctx->channel, 0);
        if (!ctx->cq) {
                fprintf(stderr, "Couldn't create CQ\n");
                return NULL;


_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to