net/mlx5: HWS, register reformat actions with fw
authorVlad Dogaru <vdogaru@nvidia.com>
Tue, 20 May 2025 18:46:40 +0000 (21:46 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 22 May 2025 03:44:21 +0000 (20:44 -0700)
commitb206d9ec19dfc2db706883ff6b46b259831a033d
tree01bd68e5348a5131f095d47b21b59404082a362a
parentca7690dae1269f454572c163ed5271feed060af5
net/mlx5: HWS, register reformat actions with fw

Hardware steering handles actions differently from firmware, but for
termination rules that use encapsulation the firmware needs to be aware
of the action.

Fix this by registering reformat actions with the firmware the first
time this is needed. To do this, add a third possible owner for an
action, and also a lock to protect against registration of the same
action from different threads.

Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1747766802-958178-3-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.h
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h