]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
commit689dd302bd0607311d2f21815cdb570e8b17f86b
tree2a6e0f6aa6ecdeb3da3f9c82ddd97cb84d98d042
parent08ca04b471141b5afc3388eb12c95061fdbf2a83
mlx4_core: Update minimum size for log_num_qp to 18

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