Skip to content

Commit

Permalink
nfp: allow non-equal distribution of IRQs
Browse files Browse the repository at this point in the history
Thus far the code assumed all vNICs will request similar number of IRQs.
This will be no longer true with control vNICs (where 1 IRQ will suffice).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Jun 7, 2017
1 parent 6d4b0d8 commit 2c7e41c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/netronome/nfp/nfp_net_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ static int nfp_net_pf_alloc_irqs(struct nfp_pf *pf)
list_for_each_entry(nn, &pf->vnics, vnic_list) {
unsigned int n;

n = DIV_ROUND_UP(irqs_left, vnics_left);
n = min(NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs,
DIV_ROUND_UP(irqs_left, vnics_left));
nfp_net_irqs_assign(nn, &pf->irq_entries[num_irqs - irqs_left],
n);
irqs_left -= n;
Expand Down

0 comments on commit 2c7e41c

Please sign in to comment.