RDMA/irdma: Make resource distribution algorithm more QP oriented
authorNayan Kumar <nayan.kumar@intel.com>
Tue, 5 Jul 2022 23:08:12 +0000 (18:08 -0500)
committerLeon Romanovsky <leonro@nvidia.com>
Mon, 18 Jul 2022 07:39:50 +0000 (10:39 +0300)
commitc8c7c0758101b393017614352b6f07be6b8e6396
tree957592d5c8d3ae936981e34dc03e54484899c473
parent36a26d123919997c113ac0182f926b21ccc85855
RDMA/irdma: Make resource distribution algorithm more QP oriented

Adapt the resource distribution algorithm in irdma_cfg_fpm_val to be more
QP oriented. If the configuration is too big for the available memory,
trim the MR and PBLE's first before trimming the QPs. This also avoids
having to double QPs requested as input to algorithm for GEN1 devices.

Link: https://lore.kernel.org/r/20220705230815.265-5-shiraz.saleem@intel.com
Signed-off-by: Nayan Kumar <nayan.kumar@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/irdma/ctrl.c
drivers/infiniband/hw/irdma/hw.c