* [PATCH 2/5] netpoll: revert queue stopped change
@ 2004-08-26 19:59 Matt Mackall
0 siblings, 0 replies; only message in thread
From: Matt Mackall @ 2004-08-26 19:59 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Jeff Moyer
From: Jeff Moyer <jmoyer@redhat.com>
Here's the first of the broken out patch set. This puts the check for
netif_queue_stopped back into netpoll_send_skb. Network drivers are not
designed to have their hard_start_xmit routines called when the queue is
stopped.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
--- linux-2.6.7/net/core/netpoll.c.orig 2004-08-16 11:57:46.890322256 -0400
+++ linux-2.6.7/net/core/netpoll.c 2004-08-16 12:17:34.477781520 -0400
@@ -168,6 +168,18 @@ repeat:
spin_lock(&np->dev->xmit_lock);
np->dev->xmit_lock_owner = smp_processor_id();
+ /*
+ * network drivers do not expect to be called if the queue is
+ * stopped.
+ */
+ if (netif_queue_stopped(np->dev)) {
+ np->dev->xmit_lock_owner = -1;
+ spin_unlock(&np->dev->xmit_lock);
+
+ netpoll_poll(np);
+ goto repeat;
+ }
+
status = np->dev->hard_start_xmit(skb, np->dev);
np->dev->xmit_lock_owner = -1;
spin_unlock(&np->dev->xmit_lock);
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-26 20:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-26 19:59 [PATCH 2/5] netpoll: revert queue stopped change Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®