diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-03-08 17:57:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-10 01:39:58 +0100 |
commit | 7de5f115e1fd8a6df7aa89078cb70700e725173d (patch) | |
tree | bf998c61012f35bcce0cad0372489bfa500a9ef9 /drivers | |
parent | nfp: store device pointer for the fastpath (diff) | |
download | linux-7de5f115e1fd8a6df7aa89078cb70700e725173d.tar.xz linux-7de5f115e1fd8a6df7aa89078cb70700e725173d.zip |
nfp: avoid rearming the interrupts when in busy poll
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 397d9e82ed0e..119775d4097e 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -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; } |