Re: [PATCH RFC 50/77] mlx5: Update MSI/MSI-X interrupts enablement code

2013-10-10 Thread Eli Cohen
On Thu, Oct 03, 2013 at 09:48:39PM +0200, Alexander Gordeev wrote: > > pci_enable_msix() may fail, but it can not return a positive number. > That is true according to the current logic but the comment on top of pci_enable_msix() still says: "A return of < 0 indicates a failure. Or a return of >

Re: [PATCH RFC 50/77] mlx5: Update MSI/MSI-X interrupts enablement code

2013-10-03 Thread Alexander Gordeev
On Thu, Oct 03, 2013 at 10:14:33AM +0300, Eli Cohen wrote: > On Wed, Oct 02, 2013 at 12:49:06PM +0200, Alexander Gordeev wrote: > > > > + err = pci_msix_table_size(dev->pdev); > > + if (err < 0) > > + return err; > > + > > nvec = dev->caps.num_ports * num_online_cpus() + MLX5_EQ

Re: [PATCH RFC 50/77] mlx5: Update MSI/MSI-X interrupts enablement code

2013-10-03 Thread Eli Cohen
On Wed, Oct 02, 2013 at 12:49:06PM +0200, Alexander Gordeev wrote: > > + err = pci_msix_table_size(dev->pdev); > + if (err < 0) > + return err; > + > nvec = dev->caps.num_ports * num_online_cpus() + MLX5_EQ_VEC_COMP_BASE; > nvec = min_t(int, nvec, num_eqs); > +

[PATCH RFC 50/77] mlx5: Update MSI/MSI-X interrupts enablement code

2013-10-02 Thread Alexander Gordeev
As result of recent re-design of the MSI/MSI-X interrupts enabling pattern this driver has to be updated to use the new technique to obtain a optimal number of MSI/MSI-X interrupts required. Signed-off-by: Alexander Gordeev --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 18 +-