diff options
| author | Kalesh AP <[email protected]> | 2024-11-06 08:44:36 +0000 |
|---|---|---|
| committer | Leon Romanovsky <[email protected]> | 2024-11-12 08:04:04 +0000 |
| commit | cdb21c12adcb9eaf97ac085fd0d1382f9830224b (patch) | |
| tree | 2ad349d2730e68fde1e92a97098503d0d2ca74f2 /drivers/infiniband/hw/bnxt_re/main.c | |
| parent | RDMA/bnxt_re: Enhance RoCE SRIOV resource configuration design (diff) | |
| download | kernel-cdb21c12adcb9eaf97ac085fd0d1382f9830224b.tar.gz kernel-cdb21c12adcb9eaf97ac085fd0d1382f9830224b.zip | |
RDMA/bnxt_re: Add set_func_resources support for P5/P7 adapters
Enable set_func_resources for P5 and P7 adapters to handle
VF resource distribution. Remove setting max resources per VF
during PF initialization. This change is required for firmwares
which does not support RoCE VF resource management by NIC driver.
The code is same for all adapters now.
Reviewed-by: Stephen Shi <[email protected]>
Reviewed-by: Rukhsana Ansari <[email protected]>
Signed-off-by: Kalesh AP <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/main.c')
| -rw-r--r-- | drivers/infiniband/hw/bnxt_re/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index dd528dd63d53..cb61941672f6 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -291,11 +291,12 @@ static void bnxt_re_vf_res_config(struct bnxt_re_dev *rdev) * available at this point. */ rdev->num_vfs = pci_sriov_get_totalvfs(rdev->en_dev->pdev); - if (!bnxt_qplib_is_chip_gen_p5_p7(rdev->chip_ctx)) { - bnxt_re_set_resource_limits(rdev); - bnxt_qplib_set_func_resources(&rdev->qplib_res, &rdev->rcfw, - &rdev->qplib_ctx); - } + if (!rdev->num_vfs) + return; + + bnxt_re_set_resource_limits(rdev); + bnxt_qplib_set_func_resources(&rdev->qplib_res, &rdev->rcfw, + &rdev->qplib_ctx); } static void bnxt_re_shutdown(struct auxiliary_device *adev) |
