Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321975
b: refs/heads/master
c: 6bdb7fe
h: refs/heads/master
i:
  321973: ac05aad
  321971: 8f955e3
  321967: 4e7346c
v: v3
  • Loading branch information
Amerigo Wang authored and David S. Miller committed Aug 14, 2012
1 parent f3c4f73 commit 44eb6a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 689971b44613883ee74ae9c1b31a864aaa3a8e17
refs/heads/master: 6bdb7fe31046ac50b47e83c35cd6c6b6160a475d
10 changes: 9 additions & 1 deletion trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,24 @@ static void poll_napi(struct net_device *dev)
struct napi_struct *napi;
int budget = 16;

WARN_ON_ONCE(!irqs_disabled());

list_for_each_entry(napi, &dev->napi_list, dev_list) {
local_irq_enable();
if (napi->poll_owner != smp_processor_id() &&
spin_trylock(&napi->poll_lock)) {
rcu_read_lock_bh();
budget = poll_one_napi(rcu_dereference_bh(dev->npinfo),
napi, budget);
rcu_read_unlock_bh();
spin_unlock(&napi->poll_lock);

if (!budget)
if (!budget) {
local_irq_disable();
break;
}
}
local_irq_disable();
}
}

Expand Down

0 comments on commit 44eb6a8

Please sign in to comment.