diff mbox

CQ overrun with ib_send_bw

Message ID 1282071547.2313.100.camel@chromite.mv.qlogic.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ralph Campbell Aug. 17, 2010, 6:59 p.m. UTC
None
diff mbox

Patch

diff --git a/send_bw.c b/send_bw.c
index ddd2b73..e3f644a 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -746,6 +746,8 @@  static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev,
 	if (user_parm->use_mcg && !user_parm->servername) {
 		cq_rx_depth *= user_parm->num_of_clients_mcg;
 	}
+	if (user_parm->duplex)
+		cq_rx_depth += ctx->tx_depth;
 	ctx->cq = ibv_create_cq(ctx->context,cq_rx_depth, NULL, ctx->channel, 0);
 	if (!ctx->cq) {
 		fprintf(stderr, "Couldn't create CQ\n");