aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_tx.c
diff options
context:
space:
mode:
authorYuval Atias <yuvala@mellanox.com>2014-05-14 05:15:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-14 15:40:32 -0400
commit2eacc23c422b4553030168f315cb49522fa1b1f6 (patch)
tree8733ae07b5752215afc6510a68f6ad7645297872 /drivers/net/ethernet/mellanox/mlx4/en_tx.c
parent3763e7ef17143f5e9ae044638e65d2b0c0305fcf (diff)
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_tx.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_tx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 89585c6311c3..cb964056d710 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -474,9 +474,15 @@ int mlx4_en_poll_tx_cq(struct napi_struct *napi, int budget)
474 /* If we used up all the quota - we're probably not done yet... */ 474 /* If we used up all the quota - we're probably not done yet... */
475 if (done < budget) { 475 if (done < budget) {
476 /* Done for now */ 476 /* Done for now */
477 cq->mcq.irq_affinity_change = false;
477 napi_complete(napi); 478 napi_complete(napi);
478 mlx4_en_arm_cq(priv, cq); 479 mlx4_en_arm_cq(priv, cq);
479 return done; 480 return done;
481 } else if (unlikely(cq->mcq.irq_affinity_change)) {
482 cq->mcq.irq_affinity_change = false;
483 napi_complete(napi);
484 mlx4_en_arm_cq(priv, cq);
485 return 0;
480 } 486 }
481 return budget; 487 return budget;
482} 488}