nfp: avoid rearming the interrupts when in busy poll
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 8 Mar 2017 16:57:06 +0000 (08:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 00:39:58 +0000 (16:39 -0800)
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>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c

index 397d9e8..119775d 100644 (file)
@@ -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;
 }