summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/irdma/hw.c
diff options
context:
space:
mode:
authorNayan Kumar <nayan.kumar@intel.com>2022-07-06 01:08:12 +0200
committerLeon Romanovsky <leonro@nvidia.com>2022-07-18 09:39:50 +0200
commitc8c7c0758101b393017614352b6f07be6b8e6396 (patch)
tree957592d5c8d3ae936981e34dc03e54484899c473 /drivers/infiniband/hw/irdma/hw.c
parentRDMA/irdma: Make CQP invalid state error non-critical (diff)
downloadlinux-c8c7c0758101b393017614352b6f07be6b8e6396.tar.xz
linux-c8c7c0758101b393017614352b6f07be6b8e6396.zip
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>
Diffstat (limited to 'drivers/infiniband/hw/irdma/hw.c')
-rw-r--r--drivers/infiniband/hw/irdma/hw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c
index bb60431f9877..8abbd50fe833 100644
--- a/drivers/infiniband/hw/irdma/hw.c
+++ b/drivers/infiniband/hw/irdma/hw.c
@@ -1512,10 +1512,7 @@ static int irdma_hmc_setup(struct irdma_pci_f *rf)
int status;
u32 qpcnt;
- if (rf->rdma_ver == IRDMA_GEN_1)
- qpcnt = rsrc_limits_table[rf->limits_sel].qplimit * 2;
- else
- qpcnt = rsrc_limits_table[rf->limits_sel].qplimit;
+ qpcnt = rsrc_limits_table[rf->limits_sel].qplimit;
rf->sd_type = IRDMA_SD_TYPE_DIRECT;
status = irdma_cfg_fpm_val(&rf->sc_dev, qpcnt);