From: akpm@osdl.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@osdl.org, jeremy@goop.org, mpm@selenic.com
Subject: [patch 2/6] netpoll: don't spin forever sending to stopped queues
Date: Sun, 25 Jun 2006 01:47:29 -0700 [thread overview]
Message-ID: <200606250847.k5P8lThc020900@shell0.pdx.osdl.net> (raw)
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 */
_
next reply other threads:[~2006-06-25 8:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-25 8:47 akpm [this message]
2006-06-26 7:03 ` [patch 2/6] netpoll: don't spin forever sending to stopped queues David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606250847.k5P8lThc020900@shell0.pdx.osdl.net \
--to=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=jeremy@goop.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox