From 6b35f704989d882fd5d1d42171962363ebebe554 Mon Sep 17 00:00:00 2001 From: Jack Morgenstein Date: Thu, 19 Apr 2007 11:53:16 +0300 Subject: [PATCH] Fix CQ size sanity check The maximum permissible number of CQEs per CQ for Hermon is 0x3fffff, so we need to fix the sanity check in mlx4_create_cq() accordingly. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- src/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/verbs.c b/src/verbs.c index a74161f..1c56f08 100644 --- a/src/verbs.c +++ b/src/verbs.c @@ -170,7 +170,7 @@ struct ibv_cq *mlx4_create_cq(struct ibv_context *context, int cqe, int ret; /* Sanity check CQ size before proceeding */ - if (cqe > 131072) + if (cqe > 0x3fffff) return NULL; cq = malloc(sizeof *cq); -- 2.46.0