Re: [PATCH net-next 2/4] net/mlx5: HWS, make sure the uplink is the last destination
From: Paolo Abeni
Date: Mon May 26 2025 - 02:39:25 EST
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()
/P