]> git.openfabrics.org - ~shefty/libmlx4.git/commitdiff
Fix CQ size sanity check
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 19 Apr 2007 08:53:16 +0000 (11:53 +0300)
committerRoland Dreier <rolandd@cisco.com>
Thu, 19 Apr 2007 14:04:50 +0000 (07:04 -0700)
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 <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/verbs.c

index a74161f7ebb0b798469b0df6572eccd765b9bc65..1c56f082b3633e2db4b1f2fa7a9e5b824db99e9e 100644 (file)
@@ -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);