* [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
* Re: [PATCH net-2.6] ifb: goto resched directly if error happens and dp->tq isn't empty
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
0 siblings, 1 reply; 3+ messages in thread
From: jamal @ 2010-12-05 14:25 UTC (permalink / raw)
To: Changli Gao; +Cc: David S. Miller, Jarek Poplawski, netdev
On Sun, 2010-12-05 at 08:09 +0800, Changli Gao wrote:
> 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>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Dave, this goes to stable as well.
cheers,
jamal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-2.6] ifb: goto resched directly if error happens and dp->tq isn't empty
2010-12-05 14:25 ` jamal
@ 2010-12-08 17:45 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2010-12-08 17:45 UTC (permalink / raw)
To: hadi; +Cc: xiaosuo, jarkao2, netdev
From: jamal <hadi@cyberus.ca>
Date: Sun, 05 Dec 2010 09:25:44 -0500
> On Sun, 2010-12-05 at 08:09 +0800, Changli Gao wrote:
>> 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>
>
> Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
>
> Dave, this goes to stable as well.
Applied and queued up for -stable, thanks.
^ permalink raw reply [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).