Netdev List
 help / color / mirror / Atom feed
* [patch 2/6] netpoll: don't spin forever sending to stopped queues
@ 2006-06-25  8:47 akpm
  2006-06-26  7:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2006-06-25  8:47 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, jeremy, mpm


From: Jeremy Fitzhardinge <jeremy@goop.org>

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>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 net/core/netpoll.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff -puN net/core/netpoll.c~netpoll-dont-spin-forever-sending-to-blocked-queues net/core/netpoll.c
--- a/net/core/netpoll.c~netpoll-dont-spin-forever-sending-to-blocked-queues
+++ a/net/core/netpoll.c
@@ -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 = 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 */
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-26  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-25  8:47 [patch 2/6] netpoll: don't spin forever sending to stopped queues akpm
2006-06-26  7:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox