]> 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)
commit81e791207dea3ab3bb798fcfeceb6ed190bc8d5b
tree2ea49cd7702d9910aea78e0ac0d0a495cc29eee2
parentbba2160c24a50c3d06b279a89716199935cef07f
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