HomeFreeBSD

Fix number of the enabled VFs in VNIC

Description

Fix number of the enabled VFs in VNIC

nic->num_vf_en is set based on the number of the enabled LMACs.
This number should not be overwritten later by any routine.
Instead it should fail PCI_IOV_ADD_VF() so that available VFs
with the corresponding LMACs will attach whereas other, disabled
VFs will fail with the proper error code.
Error signaling (due to improper number of VFs requested) is also moved
from PCI_IOV_INIT() to PCI_IOV_ADD_VF().

This will be reworked when multiple queue sets are enabled but for
now this is the correct behavior of the driver.

Obtained from: Semihalf
Sponsored by: Cavium

Details

Provenance
zbbAuthored on
Parents
rS297456: We don't support DPLIBS.
Branches
Unknown
Tags
Unknown