]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: set driver VF limit
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 29 May 2017 00:52:54 +0000 (17:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 15:27:04 +0000 (11:27 -0400)
commit30a3dd2b545758fb2cdf7442ba6074fcf6ba233d
tree7d8bd14e0c868325c018e18cb2df1d14af1cbe7e
parentc9f09be139e666ffc6a139426c324433440e79bc
nfp: set driver VF limit

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: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_main.c