提交 082297e6 编写于 作者: A Antoine Tenart 提交者: David S. Miller

net: mvpp2: do not call txq_done from the Tx path when Tx irqs are used

When Tx IRQs are used, txq_bufs_free() can be called from both the Tx
path and from NAPI poll(). This led to CPU stalls as if these two tasks
(Tx and Poll) are scheduled on two CPUs at the same time, DMA unmapping
operations are done on the same txq buffers.

This patch adds a check not to call txq_done() from the Tx path if Tx
interrupts are used as it does not make sense to do so.

Fixes: edc660fa ("net: mvpp2: replace TX coalescing interrupts with hrtimer")
Signed-off-by: NAntoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 20920267
...@@ -6499,7 +6499,7 @@ static int mvpp2_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -6499,7 +6499,7 @@ static int mvpp2_tx(struct sk_buff *skb, struct net_device *dev)
} }
/* Finalize TX processing */ /* Finalize TX processing */
if (txq_pcpu->count >= txq->done_pkts_coal) if (!port->has_tx_irqs && txq_pcpu->count >= txq->done_pkts_coal)
mvpp2_txq_done(port, txq, txq_pcpu); mvpp2_txq_done(port, txq, txq_pcpu);
/* Set the timer in case not all frags were processed */ /* Set the timer in case not all frags were processed */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册