aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 47e731528315..b60c26b7d31c 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -322,6 +322,7 @@ enum
322{ 322{
323 NAPI_STATE_SCHED, /* Poll is scheduled */ 323 NAPI_STATE_SCHED, /* Poll is scheduled */
324 NAPI_STATE_DISABLE, /* Disable pending */ 324 NAPI_STATE_DISABLE, /* Disable pending */
325 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
325}; 326};
326 327
327extern void __napi_schedule(struct napi_struct *n); 328extern void __napi_schedule(struct napi_struct *n);
@@ -1622,6 +1623,12 @@ static inline void netif_rx_complete(struct net_device *dev,
1622{ 1623{
1623 unsigned long flags; 1624 unsigned long flags;
1624 1625
1626 /*
1627 * don't let napi dequeue from the cpu poll list
1628 * just in case its running on a different cpu
1629 */
1630 if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state)))
1631 return;
1625 local_irq_save(flags); 1632 local_irq_save(flags);
1626 __netif_rx_complete(dev, napi); 1633 __netif_rx_complete(dev, napi);
1627 local_irq_restore(flags); 1634 local_irq_restore(flags);