Skip to content

Commit

Permalink
[NET] netpoll: don't spin forever sending to stopped queues
Browse files Browse the repository at this point in the history
When transmitting a skb in netpoll_send_skb(), only retry a limited number
of times if the device queue is stopped.

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Acked-by: Matt Mackall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jsgf authored and davem330 committed Jun 26, 2006
1 parent d83561a commit 8834807
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,10 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
* network drivers do not expect to be called if the queue is
* stopped.
*/
if (netif_queue_stopped(np->dev)) {
netif_tx_unlock(np->dev);
netpoll_poll(np);
udelay(50);
continue;
}
status = NETDEV_TX_BUSY;
if (!netif_queue_stopped(np->dev))
status = np->dev->hard_start_xmit(skb, np->dev);

status = np->dev->hard_start_xmit(skb, np->dev);
netif_tx_unlock(np->dev);

/* success */
Expand Down

0 comments on commit 8834807

Please sign in to comment.