]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Introduce EQ polling budget
authorYuval Avnery <yuvalav@mellanox.com>
Mon, 10 Jun 2019 23:38:21 +0000 (23:38 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Jun 2019 17:59:49 +0000 (10:59 -0700)
commit97536b5bdae0fb20c0cfa3788dfec14c1c2577fc
tree2ea49cd7702d9910aea78e0ac0d0a495cc29eee2
parent22d3ce5d159deb80a0cae1d74d39cb52ce18011b
net/mlx5: Introduce EQ polling budget

Multiple EQs may share the same irq in subsequent patches.
To avoid starvation, a budget is set per EQ's interrupt handler.

Because of this change, it is no longer required to check that
MLX5_NUM_SPARE_EQE eqes were polled (to detect that arm is required).
It is guaranteed that MLX5_NUM_SPARE_EQE > budget, therefore the
handler will arm and exit the handler before all the entries in the
eq are polled.

In the scenario where the handler is out of budget and there are more
EQEs to poll, arming the EQ guarantees that the HW will send another
interrupt and the handler will be called again.

Signed-off-by: Yuval Avnery <yuvalav@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eq.c