• J
    nfp: set driver VF limit · 651e1f2f
    Jakub Kicinski 提交于
    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: NJakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    651e1f2f
nfp_main.c 11.7 KB