ifb: goto resched directly if error happens and dp->tq isn't empty
Subsystems (2)
PATCH 1/1 ifb: goto resched directly if error happens and dp->tq isn't empty
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.
--- drivers/net/ifb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ifb.c +2 -0
@@ -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 ();
Quoted 9 lines · 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 <[email protected]>
Dave, this goes to stable as well.
cheers,
jamal
David Miller
maintainerFrom: jamal <[email protected]>
Date: Sun, 05 Dec 2010 09:25:44 -0500
Quoted 6 lines · Changli Gao
Quoted 5 lines
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.
Quoted 8 lines
Quoted 4 lines
After this patch, if tq isn't empty when we break the loop, we goto resched directly.
Signed-off-by Changli Gao <[email protected]>Signed-off-by Jamal Hadi Salim <[email protected]>Dave, this goes to stable as well.
Applied and queued up for -stable, thanks.