netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6] ifb: goto resched directly if error happens and dp->tq isn't empty
@ 2010-12-05  0:09 Changli Gao
  2010-12-05 14:25 ` jamal
  0 siblings, 1 reply; 3+ messages in thread
From: Changli Gao @ 2010-12-05  0:09 UTC (permalink / raw)
  To: David S. Miller; +Cc: Jarek Poplawski, jamal, netdev, Changli Gao

If we break the loop when there are still skbs in tq and no skb in
rq, the skbs will be left in txq until new skbs are enqueued into rq.
In rare cases, no new skb is queued, then these skbs will stay in rq
forever.

After this patch, if tq isn't empty when we break the loop, we goto
resched directly.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 drivers/net/ifb.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index ab9f675..fe337bd 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -104,6 +104,8 @@ static void ri_tasklet(unsigned long dev)
 			rcu_read_unlock();
 			dev_kfree_skb(skb);
 			stats->tx_dropped++;
+			if (skb_queue_len(&dp->tq) != 0)
+				goto resched;
 			break;
 		}
 		rcu_read_unlock();

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

end of thread, other threads:[~2010-12-08 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05  0:09 [PATCH net-2.6] ifb: goto resched directly if error happens and dp->tq isn't empty Changli Gao
2010-12-05 14:25 ` jamal
2010-12-08 17:45   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).