From: Roland Dreier Date: Mon, 11 Jun 2007 21:55:23 +0000 (-0700) Subject: Make sure RQs have max_recv_sge >= 1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8804cbd650b0cfc685a7cd19dc0cdce552746c90;p=~shefty%2Flibmlx4.git Make sure RQs have max_recv_sge >= 1 When creating a QP that does have a receive queue, make sure that max_recv_sge is >= 1. Signed-off-by: Roland Dreier --- diff --git a/src/verbs.c b/src/verbs.c index a3420cc..52ca0c8 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -360,6 +360,8 @@ struct ibv_qp *mlx4_create_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr) if (attr->srq) attr->cap.max_recv_wr = qp->rq.max = 0; + else if (attr->cap.max_recv_sge < 1) + attr->cap.max_recv_sge = 1; if (mlx4_alloc_qp_buf(pd, &attr->cap, attr->qp_type, qp)) goto err;