bnxt_en: Update VNIC resource calculation for VFs
authorVikas Gupta <vikas.gupta@broadcom.com>
Wed, 27 Sep 2023 03:57:34 +0000 (20:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Oct 2023 10:23:01 +0000 (11:23 +0100)
commitcbdbf0aa41ba696269ca41def7aa5fc54ede5dca
tree7cc99e434e17b338503be0b6df8d5b6d45c7f6d0
parente76d44fe722761f5480b908e38c5ce1a2c2cb6d6
bnxt_en: Update VNIC resource calculation for VFs

Newer versions of firmware will pre-reserve 1 VNIC for every possible
PF and VF function.  Update the driver logic to take this into account
when assigning VNICs to the VFs.  These pre-reserved VNICs for the
inactive VFs should be subtracted from the global pool before
assigning them to the active VFs.

Not doing so may cause discrepancies that ultimately may cause some VFs to
have insufficient VNICs to support features such as aRFS.

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