Re: [PATCH net-next 2/4] net/mlx5: HWS, make sure the uplink is the last destination

From: Yevgeny Kliteynik
Date: Mon May 26 2025 - 19:12:19 EST


On 26-May-25 09:39, Paolo Abeni wrote:
On 5/25/25 1:15 PM, Tariq Toukan wrote:
@@ -1429,6 +1426,14 @@ mlx5hws_action_create_dest_array(struct mlx5hws_context *ctx,
}
}
+ if (last_dest_idx != -1) {
+ struct mlx5hws_cmd_set_fte_dest tmp;
+
+ tmp = dest_list[last_dest_idx];
+ dest_list[last_dest_idx] = dest_list[num_dest - 1];
+ dest_list[num_dest - 1] = tmp;

Here you can use swap()

Indeed, thanks.

-- YK

/P