提交 75c1c825 编写于 作者: C Changli Gao 提交者: David S. Miller

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.
Signed-off-by: NChangli Gao <xiaosuo@gmail.com>
Signed-off-by: NJamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b1afde60
...@@ -104,6 +104,8 @@ static void ri_tasklet(unsigned long dev) ...@@ -104,6 +104,8 @@ static void ri_tasklet(unsigned long dev)
rcu_read_unlock(); rcu_read_unlock();
dev_kfree_skb(skb); dev_kfree_skb(skb);
stats->tx_dropped++; stats->tx_dropped++;
if (skb_queue_len(&dp->tq) != 0)
goto resched;
break; break;
} }
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册