|
@@ -4898,7 +4898,7 @@ void __napi_schedule_irqoff(struct napi_struct *n)
|
|
|
}
|
|
|
EXPORT_SYMBOL(__napi_schedule_irqoff);
|
|
|
|
|
|
-void __napi_complete(struct napi_struct *n)
|
|
|
+bool __napi_complete(struct napi_struct *n)
|
|
|
{
|
|
|
BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
|
|
|
|
|
@@ -4906,15 +4906,16 @@ void __napi_complete(struct napi_struct *n)
|
|
|
* napi_complete_done().
|
|
|
*/
|
|
|
if (unlikely(test_bit(NAPI_STATE_IN_BUSY_POLL, &n->state)))
|
|
|
- return;
|
|
|
+ return false;
|
|
|
|
|
|
list_del_init(&n->poll_list);
|
|
|
smp_mb__before_atomic();
|
|
|
clear_bit(NAPI_STATE_SCHED, &n->state);
|
|
|
+ return true;
|
|
|
}
|
|
|
EXPORT_SYMBOL(__napi_complete);
|
|
|
|
|
|
-void napi_complete_done(struct napi_struct *n, int work_done)
|
|
|
+bool napi_complete_done(struct napi_struct *n, int work_done)
|
|
|
{
|
|
|
unsigned long flags;
|
|
|
|
|
@@ -4926,7 +4927,7 @@ void napi_complete_done(struct napi_struct *n, int work_done)
|
|
|
*/
|
|
|
if (unlikely(n->state & (NAPIF_STATE_NPSVC |
|
|
|
NAPIF_STATE_IN_BUSY_POLL)))
|
|
|
- return;
|
|
|
+ return false;
|
|
|
|
|
|
if (n->gro_list) {
|
|
|
unsigned long timeout = 0;
|
|
@@ -4948,6 +4949,7 @@ void napi_complete_done(struct napi_struct *n, int work_done)
|
|
|
__napi_complete(n);
|
|
|
local_irq_restore(flags);
|
|
|
}
|
|
|
+ return true;
|
|
|
}
|
|
|
EXPORT_SYMBOL(napi_complete_done);
|
|
|
|