net/mlx5e: aRFS, Prevent repeated kernel rule migrations requests
authorAdham Faris <afaris@nvidia.com>
Wed, 8 Mar 2023 09:59:36 +0000 (11:59 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 21 Aug 2023 17:55:14 +0000 (10:55 -0700)
commit7a73cf0bf7f96cd2b9f2ea890bf1e981730d8d6c
tree2fc8c19fb257281d3afb9d2bb4fdb024f03ce341
parentcb39c35783f26892bb1a72b1115c94fa2e77f4c5
net/mlx5e: aRFS, Prevent repeated kernel rule migrations requests

aRFS rule movement requests from one Rx ring to other Rx ring arrive
from the kernel to ensure that packets are steered to the right Rx ring.
In the time interval until satisfying such a request, several more
requests might follow, for the same flow.

This patch detects and prevents repeated aRFS rules movement requests.

In mlx5e_rx_flow_steer() ndo, after finding the aRFS rule that have been
requested to move by the kernel, check if it's already requested to move
by calling work_busy(&arfs_rule->arfs_work) handler. IOW, if this
request is pending to be executed (in the work queue) or it's executing
now but hasn't finished yet, return current filter ID and don't issue a
new transition work.

Signed-off-by: Adham Faris <afaris@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c