Messages in this thread Patch in this message | | | Date | Mon, 12 Jun 2006 14:20:21 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: [PATCH RFC] netpoll: don't spin forever sending to stopped queues |
| |
Matt Mackall wrote: > Ahh, right. I forgot that I'd done that. Can you resend? > I just respun it against 2.6.17-rc6-mm2.
J
--
Subject: netpoll: don't spin forever sending to blocked queues
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 <jeremy@goop.org>
diff -r 0b8d3d4ee182 net/core/netpoll.c --- a/net/core/netpoll.c Mon Jun 12 13:46:23 2006 -0700 +++ b/net/core/netpoll.c Mon Jun 12 13:48:34 2006 -0700 @@ -279,14 +279,10 @@ static void netpoll_send_skb(struct netp * 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 = np->dev->hard_start_xmit(skb, np->dev); + status = NETDEV_TX_BUSY; + if (!netif_queue_stopped(np->dev)) + status = np->dev->hard_start_xmit(skb, np->dev); + netif_tx_unlock(np->dev); /* success */
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |