]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlx4_core: Update minimum size for log_num_qp to 18
authorMoshe Lazer <moshel@swl078.lab.mtl.com>
Sun, 4 Nov 2012 07:08:46 +0000 (09:08 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:06 +0000 (14:45 -0700)
The minimum number of QPs must exceed the number of
reserved QPs. The reserved QPs can be divided to 2 categories
reserved_from_bot and reserved_from_top.

reserved_from_bot is normally less than 2K QPs and can't
exceed 2^16 QPs.

reserved_from_top is the sum of reserved QPs for REGION_ETH_ADDR,
REGION_FC_ADDR and REGION_FC_EXCH.

reserved QPs for REGION_FC_EXCH is 2^16 and for REGION_FC_ADDR and
REGION_ETH_ADDR it can't exceed 2^15.

Therefore:
reserved_from_top <= 2^16 + 2*(2^15) = 2^17
Reserved QPs = reserved_from_bot + reserved_from_top
                                             <= 2^16 + 2^17 < 2^18

To make it simpler I set the minimum qp number to 2^18 even
though 2^17 is acceptable when log_num_mac module parameter
is set to 6 (or lower).

Signed-off-by: Moshe Lazer <moshel@mellanox.co.il>
Reviewed-by: Eli Cohen <eli@mellanox.co.il>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/main.c

index d09a77170e994ccd5592efb80fbd23523908c7ab..fcb26f2b246ab72153fa323db6377c129f481e59 100644 (file)
@@ -3795,7 +3795,7 @@ static int __init mlx4_verify_params(void)
                return -1;
        }
 
-       if (mod_param_profile.num_qp < 12 || mod_param_profile.num_qp > 23) {
+       if (mod_param_profile.num_qp < 18 || mod_param_profile.num_qp > 23) {
                pr_warning("mlx4_core: bad log_num_qp: %d\n",
                           mod_param_profile.num_qp);
                return -1;