Commit 02c1602e authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: remove __napi_complete()

All __napi_complete() callers have been converted to
use the more standard napi_complete_done(),
we can now remove this NAPI method for good.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 32e19300
...@@ -463,7 +463,6 @@ static inline bool napi_reschedule(struct napi_struct *napi) ...@@ -463,7 +463,6 @@ static inline bool napi_reschedule(struct napi_struct *napi)
return false; return false;
} }
bool __napi_complete(struct napi_struct *n);
bool napi_complete_done(struct napi_struct *n, int work_done); bool napi_complete_done(struct napi_struct *n, int work_done);
/** /**
* napi_complete - NAPI processing complete * napi_complete - NAPI processing complete
......
...@@ -4883,23 +4883,6 @@ void __napi_schedule_irqoff(struct napi_struct *n) ...@@ -4883,23 +4883,6 @@ void __napi_schedule_irqoff(struct napi_struct *n)
} }
EXPORT_SYMBOL(__napi_schedule_irqoff); EXPORT_SYMBOL(__napi_schedule_irqoff);
bool __napi_complete(struct napi_struct *n)
{
BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state));
/* Some drivers call us directly, instead of calling
* napi_complete_done().
*/
if (unlikely(test_bit(NAPI_STATE_IN_BUSY_POLL, &n->state)))
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);
bool napi_complete_done(struct napi_struct *n, int work_done) bool napi_complete_done(struct napi_struct *n, int work_done)
{ {
unsigned long flags; unsigned long flags;
...@@ -4926,14 +4909,13 @@ bool napi_complete_done(struct napi_struct *n, int work_done) ...@@ -4926,14 +4909,13 @@ bool napi_complete_done(struct napi_struct *n, int work_done)
else else
napi_gro_flush(n, false); napi_gro_flush(n, false);
} }
if (likely(list_empty(&n->poll_list))) { if (unlikely(!list_empty(&n->poll_list))) {
WARN_ON_ONCE(!test_and_clear_bit(NAPI_STATE_SCHED, &n->state));
} else {
/* If n->poll_list is not empty, we need to mask irqs */ /* If n->poll_list is not empty, we need to mask irqs */
local_irq_save(flags); local_irq_save(flags);
__napi_complete(n); list_del_init(&n->poll_list);
local_irq_restore(flags); local_irq_restore(flags);
} }
WARN_ON_ONCE(!test_and_clear_bit(NAPI_STATE_SCHED, &n->state));
return true; return true;
} }
EXPORT_SYMBOL(napi_complete_done); EXPORT_SYMBOL(napi_complete_done);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment