mlx5: simplify EQ interrupt polling logic
authorCaleb Sander Mateos <csander@purestorage.com>
Wed, 23 Oct 2024 20:51:12 +0000 (14:51 -0600)
committerJakub Kicinski <kuba@kernel.org>
Tue, 29 Oct 2024 23:20:00 +0000 (16:20 -0700)
commit77693e6c140aff6957d1046475fe69f45fdb1583
tree1a9271242a922c55f30249c6eecf2a49d6074c61
parent5713f9831fe2e8455c791bcb4a03482983db8bbe
mlx5: simplify EQ interrupt polling logic

Use a while loop in mlx5_eq_comp_int() and mlx5_eq_async_int() to
clarify the EQE polling logic. This consolidates the next_eqe_sw() calls
for the first and subequent iterations. It also avoids a goto. Turn the
num_eqes < MLX5_EQ_POLLING_BUDGET check into a break condition.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241023205113.255866-1-csander@purestorage.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eq.c