• Jakub Kicinski's avatar
    nfp: set driver VF limit · 651e1f2f
    Jakub Kicinski authored
    PCI subsystem has support for drivers limiting the number of VFs
    available below what the IOV capability claims.  Make use of it.
    
    While at it remove the #ifdef/#endif on CONFIG_PCI_IOV, it was
    there to avoid unnecessary warnings in case device read failed
    but kernel doesn't have SR-IOV support anyway.  Device reads
    should not fail.
    
    Note that we still need the driver-internal check for the case
    where max VFs is 0 since PCI subsystem treats 0 as limit not set.
    Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    651e1f2f
nfp_main.c 11.7 KB