diff options
author | Yuval Atias <yuvala@mellanox.com> | 2014-05-14 12:15:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-14 15:40:32 -0400 |
commit | 2eacc23c422b4553030168f315cb49522fa1b1f6 (patch) | |
tree | 8733ae07b5752215afc6510a68f6ad7645297872 /drivers/net/ethernet/mellanox/mlx4/en_rx.c | |
parent | 3763e7ef17143f5e9ae044638e65d2b0c0305fcf (diff) | |
download | op-kernel-dev-2eacc23c422b4553030168f315cb49522fa1b1f6.zip op-kernel-dev-2eacc23c422b4553030168f315cb49522fa1b1f6.tar.gz |
net/mlx4_core: Enforce irq affinity changes immediatly
During heavy traffic, napi is constatntly polling the complition queue
and no interrupt is fired. Because of that, changes to irq affinity are
ignored until traffic is stopped and resumed.
By registering to the irq notifier mechanism, and forcing interrupt when
affinity is changed, irq affinity changes will be immediatly enforced.
Signed-off-by: Yuval Atias <yuvala@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_rx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index a151245..e8c0d2b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -895,10 +895,17 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget) mlx4_en_cq_unlock_napi(cq); /* If we used up all the quota - we're probably not done yet... */ - if (done == budget) + if (done == budget) { INC_PERF_COUNTER(priv->pstats.napi_quota); - else { + if (unlikely(cq->mcq.irq_affinity_change)) { + cq->mcq.irq_affinity_change = false; + napi_complete(napi); + mlx4_en_arm_cq(priv, cq); + return 0; + } + } else { /* Done for now */ + cq->mcq.irq_affinity_change = false; napi_complete(napi); mlx4_en_arm_cq(priv, cq); } |