提交 2e1af7d7 编写于 作者: E Eric Dumazet 提交者: David S. Miller

mlx4: restore conditional call to napi_complete_done()

After commit 1a288172 ("mlx4: use napi_complete_done()") we ended up
calling napi_complete_done() in the case NAPI poll consumed all its
budget.

This added extra interrupt pressure, this patch restores proper
behavior.
Signed-off-by: NEric Dumazet <edumazet@google.com>
Fixes: 1a288172 ("mlx4: use napi_complete_done()")
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d21385fa
...@@ -910,13 +910,14 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget) ...@@ -910,13 +910,14 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget)
cpu_curr = smp_processor_id(); cpu_curr = smp_processor_id();
aff = irq_desc_get_irq_data(cq->irq_desc)->affinity; aff = irq_desc_get_irq_data(cq->irq_desc)->affinity;
if (unlikely(!cpumask_test_cpu(cpu_curr, aff))) { if (likely(cpumask_test_cpu(cpu_curr, aff)))
/* Current cpu is not according to smp_irq_affinity - return budget;
* probably affinity changed. need to stop this NAPI
* poll, and restart it on the right CPU /* Current cpu is not according to smp_irq_affinity -
*/ * probably affinity changed. need to stop this NAPI
done = 0; * poll, and restart it on the right CPU
} */
done = 0;
} }
/* Done for now */ /* Done for now */
napi_complete_done(napi, done); napi_complete_done(napi, done);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册