Patch "bnxt_en: fix NQ resource accounting during vf creation on 57500 chips" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bnxt_en: fix NQ resource accounting during vf creation on 57500 chips

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bnxt_en-fix-nq-resource-accounting-during-vf-creatio.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit eba0b38ebfad187629d14e68f63f0ad9f70992b3
Author: Vikas Gupta <vikas.gupta@xxxxxxxxxxxx>
Date:   Mon Aug 22 11:06:53 2022 -0400

    bnxt_en: fix NQ resource accounting during vf creation on 57500 chips
    
    [ Upstream commit 09a89cc59ad67794a11e1d3dd13c5b3172adcc51 ]
    
    There are 2 issues:
    
    1. We should decrement hw_resc->max_nqs instead of hw_resc->max_irqs
       with the number of NQs assigned to the VFs.  The IRQs are fixed
       on each function and cannot be re-assigned.  Only the NQs are being
       assigned to the VFs.
    
    2. vf_msix is the total number of NQs to be assigned to the VFs.  So
       we should decrement vf_msix from hw_resc->max_nqs.
    
    Fixes: b16b68918674 ("bnxt_en: Add SR-IOV support for 57500 chips.")
    Signed-off-by: Vikas Gupta <vikas.gupta@xxxxxxxxxxxx>
    Signed-off-by: Michael Chan <michael.chan@xxxxxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
index 70d8ca3039dcb..78763f5027d10 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
@@ -623,7 +623,7 @@ static int bnxt_hwrm_func_vf_resc_cfg(struct bnxt *bp, int num_vfs, bool reset)
 		hw_resc->max_stat_ctxs -= le16_to_cpu(req->min_stat_ctx) * n;
 		hw_resc->max_vnics -= le16_to_cpu(req->min_vnics) * n;
 		if (bp->flags & BNXT_FLAG_CHIP_P5)
-			hw_resc->max_irqs -= vf_msix * n;
+			hw_resc->max_nqs -= vf_msix;
 
 		rc = pf->active_vfs;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux