dect
/
linux-2.6
Archived
13
0
Fork 0

[NET]: Stop polling when napi_disable() is pending.

This finally adds the code in net_rx_action() to break out of the
->poll()'ing loop when a napi_disable() is found to be pending.

Now, even if a device is being flooded with packets it can be cleanly
brought down.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2008-01-07 21:00:40 -08:00
parent d1d08d1265
commit fed17f3094
1 changed files with 6 additions and 2 deletions

View File

@ -2207,8 +2207,12 @@ static void net_rx_action(struct softirq_action *h)
* still "owns" the NAPI instance and therefore can
* move the instance around on the list at-will.
*/
if (unlikely(work == weight))
list_move_tail(&n->poll_list, list);
if (unlikely(work == weight)) {
if (unlikely(napi_disable_pending(n)))
__napi_complete(n);
else
list_move_tail(&n->poll_list, list);
}
netpoll_poll_unlock(have);
}