aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-06-11 14:55:23 -0700
committerRoland Dreier <rolandd@cisco.com>2007-06-11 14:55:23 -0700
commit8804cbd650b0cfc685a7cd19dc0cdce552746c90 (patch)
tree94cbf3c0650bf02138ca5963c1830a2547e406d6
parentc77ead01ac476ded29f9b4e1e0fbabf4c2fa7156 (diff)
downloadlibmlx4-8804cbd650b0cfc685a7cd19dc0cdce552746c90.tar.gz
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 <rolandd@cisco.com>
-rw-r--r--src/verbs.c2
1 files changed, 2 insertions, 0 deletions
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;