]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: fix NQ resource accounting during vf creation on 57500 chips
authorVikas Gupta <vikas.gupta@broadcom.com>
Mon, 22 Aug 2022 15:06:53 +0000 (11:06 -0400)
committerJakub Kicinski <kuba@kernel.org>
Tue, 23 Aug 2022 22:32:17 +0000 (15:32 -0700)
commit855d6e1887f70e9ce7101780d7dbd658b47d066c
treed991abd9aaa892e4bf9e92df9b1809b2b1ece4cf
parent4a832a3c7db5438be29f15b69a64e8d14354c346
bnxt_en: fix NQ resource accounting during vf creation on 57500 chips

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: 80a95d000dbf ("bnxt_en: Add SR-IOV support for 57500 chips.")
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c