Skip to content

Commit

Permalink
nfp: avoid rearming the interrupts when in busy poll
Browse files Browse the repository at this point in the history
Make use of return code from napi_complete_done() to avoid rearming
interrupts when busy polling is on.

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 Mar 10, 2017
1 parent fa43d2a commit 7de5f11
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/netronome/nfp/nfp_net_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1705,10 +1705,9 @@ static int nfp_net_poll(struct napi_struct *napi, int budget)
nfp_net_xdp_complete(r_vec->xdp_ring);
}

if (pkts_polled < budget) {
napi_complete_done(napi, pkts_polled);
nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry);
}
if (pkts_polled < budget)
if (napi_complete_done(napi, pkts_polled))
nfp_net_irq_unmask(r_vec->nfp_net, r_vec->irq_entry);

return pkts_polled;
}
Expand Down

0 comments on commit 7de5f11

Please sign in to comment.