]> git.openfabrics.org - ~shefty/libmlx4.git/commitdiff
Make sure RQs have max_recv_sge >= 1
authorRoland Dreier <rolandd@cisco.com>
Mon, 11 Jun 2007 21:55:23 +0000 (14:55 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 11 Jun 2007 21:55:23 +0000 (14:55 -0700)
When creating a QP that does have a receive queue, make sure that
max_recv_sge is >= 1.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/verbs.c

index a3420cc97189a7cdd82e066e009edf0445461397..52ca0c83f91bc297926678b99a812acc5c4c9ad0 100644 (file)
@@ -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;