From 8804cbd650b0cfc685a7cd19dc0cdce552746c90 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 11 Jun 2007 14:55:23 -0700 Subject: [PATCH] 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 --- src/verbs.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.46.0