diff options
author | Eric Dumazet <edumazet@google.com> | 2017-02-04 15:25:02 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-05 16:11:57 -0500 |
commit | 02c1602ee7b3e3d062c3eacd374d6a6e3a2ebb73 (patch) | |
tree | 393a469e499e95a0fbc8eb22d6f1707bbb7053cb /net/core | |
parent | 32e19300a4f6705e79354cdadac3b2ef3cd0c309 (diff) | |
download | linux-stable-02c1602ee7b3e3d062c3eacd374d6a6e3a2ebb73.tar.gz linux-stable-02c1602ee7b3e3d062c3eacd374d6a6e3a2ebb73.tar.bz2 linux-stable-02c1602ee7b3e3d062c3eacd374d6a6e3a2ebb73.zip |
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: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 42ba0379575a..404d2e6d5d32 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4883,23 +4883,6 @@ void __napi_schedule_irqoff(struct napi_struct *n) } 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) { unsigned long flags; @@ -4926,14 +4909,13 @@ bool napi_complete_done(struct napi_struct *n, int work_done) else napi_gro_flush(n, false); } - if (likely(list_empty(&n->poll_list))) { - WARN_ON_ONCE(!test_and_clear_bit(NAPI_STATE_SCHED, &n->state)); - } else { + if (unlikely(!list_empty(&n->poll_list))) { /* If n->poll_list is not empty, we need to mask irqs */ local_irq_save(flags); - __napi_complete(n); + list_del_init(&n->poll_list); local_irq_restore(flags); } + WARN_ON_ONCE(!test_and_clear_bit(NAPI_STATE_SCHED, &n->state)); return true; } EXPORT_SYMBOL(napi_complete_done); |