diff options
author | Roland Dreier <rolandd@cisco.com> | 2007-06-11 14:55:23 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-06-11 14:55:23 -0700 |
commit | 8804cbd650b0cfc685a7cd19dc0cdce552746c90 (patch) | |
tree | 94cbf3c0650bf02138ca5963c1830a2547e406d6 | |
parent | c77ead01ac476ded29f9b4e1e0fbabf4c2fa7156 (diff) | |
download | libmlx4-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.c | 2 |
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; |