net/mlx5: HWS, make sure the uplink is the last destination
authorVlad Dogaru <vdogaru@nvidia.com>
Tue, 10 Jun 2025 15:15:11 +0000 (18:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Jun 2025 21:41:09 +0000 (14:41 -0700)
commitb8335829518ec5988294280e37d735799209d70d
tree6341aa03a0405f816b280ae2deb09ff6cf38ae83
parentb5e3c76f35ee7e814c2469c73406c5bbf110d89c
net/mlx5: HWS, make sure the uplink is the last destination

When there are more than one destinations, we create a FW flow
table and provide it with all the destinations. FW requires to
have wire as the last destination in the list (if it exists),
otherwise the operation fails with FW syndrome.

This patch fixes the destination array action creation: if it
contains a wire destination, it is moved to the end.

Fixes: 504e536d9010 ("net/mlx5: HWS, added actions handling")
Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250610151514.1094735-7-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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/mlx5hws.h