Re: [PATCH net-next 02/12] nfp: set driver VF limit

2017-05-28 Thread Jakub Kicinski
On Sun, 28 May 2017 14:49:58 +, Mintz, Yuval wrote: > > pf->limit_vfs = nfp_rtsym_read_le(pf->cpp, "nfd_vf_cfg_max_vfs", > > &err); > > if (!err) > > - return; > > + return pci_sriov_set_totalvfs(pf->pdev, pf->limit_vfs); > > While you're at it, If you're going to

RE: [PATCH net-next 02/12] nfp: set driver VF limit

2017-05-28 Thread Mintz, Yuval
> pf->limit_vfs = nfp_rtsym_read_le(pf->cpp, "nfd_vf_cfg_max_vfs", > &err); > if (!err) > - return; > + return pci_sriov_set_totalvfs(pf->pdev, pf->limit_vfs); While you're at it, If you're going to enforce the limit at the PCI level, shouldn't you retire 'limit

[PATCH net-next 02/12] nfp: set driver VF limit

2017-05-27 Thread 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 any