diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9d77b1d7dca8..e26f54952892 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -319,6 +319,7 @@ enum | |||
319 | { | 319 | { |
320 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 320 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
321 | NAPI_STATE_DISABLE, /* Disable pending */ | 321 | NAPI_STATE_DISABLE, /* Disable pending */ |
322 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | ||
322 | }; | 323 | }; |
323 | 324 | ||
324 | extern void __napi_schedule(struct napi_struct *n); | 325 | extern void __napi_schedule(struct napi_struct *n); |
@@ -1497,6 +1498,12 @@ static inline void netif_rx_complete(struct net_device *dev, | |||
1497 | { | 1498 | { |
1498 | unsigned long flags; | 1499 | unsigned long flags; |
1499 | 1500 | ||
1501 | /* | ||
1502 | * don't let napi dequeue from the cpu poll list | ||
1503 | * just in case its running on a different cpu | ||
1504 | */ | ||
1505 | if (unlikely(test_bit(NAPI_STATE_NPSVC, &napi->state))) | ||
1506 | return; | ||
1500 | local_irq_save(flags); | 1507 | local_irq_save(flags); |
1501 | __netif_rx_complete(dev, napi); | 1508 | __netif_rx_complete(dev, napi); |
1502 | local_irq_restore(flags); | 1509 | local_irq_restore(flags); |