bnxt_en: Improve resource accounting for SRIOV.
authorMichael Chan <michael.chan@broadcom.com>
Sat, 31 Mar 2018 17:54:14 +0000 (13:54 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Apr 2018 03:24:19 +0000 (23:24 -0400)
commit596f9d55feebdf31c03172fcc82cdec62bb969ea
tree20475056b1eacdd610583e3ac709fff97f1a7708
parentdb4723b3cd2d836ae44382d16e6a4418ae8929dc
bnxt_en: Improve resource accounting for SRIOV.

When VFs are created, the current code subtracts the maximum VF
resources from the PF's pool.  This under-estimates the resources
remaining in the PF pool.  Instead, we should subtract the minimum
VF resources.  The VF minimum resources are guaranteed to the VFs
and only these should be subtracted from the PF's pool.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c