[PATCH 2/4] net/mlx5/hws: use union in the wqe-data struct

Ori Kam orika at nvidia.com
Wed Jun 14 19:00:19 CEST 2023



> -----Original Message-----
> From: Alexander Kozyrev <akozyrev at nvidia.com>
> Sent: Monday, June 12, 2023 11:06 PM
> 
> From: Erez Shitrit <erezsh at nvidia.com>
> 
> To be clear about which field we are going to set.
> 
> Signed-off-by: Erez Shitrit <erezsh at nvidia.com>
> Reviewed-by: Alex Vesker <valex at nvidia.com>
> ---
>  drivers/net/mlx5/hws/mlx5dr_send.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c
> b/drivers/net/mlx5/hws/mlx5dr_send.c
> index d650c55124..e58fdeb117 100644
> --- a/drivers/net/mlx5/hws/mlx5dr_send.c
> +++ b/drivers/net/mlx5/hws/mlx5dr_send.c
> @@ -110,7 +110,7 @@ mlx5dr_send_wqe_set_tag(struct
> mlx5dr_wqe_gta_data_seg_ste *wqe_data,
>  	if (is_jumbo) {
>  		/* Clear previous possibly dirty control */
>  		memset(wqe_data, 0, MLX5DR_STE_CTRL_SZ);
> -		memcpy(wqe_data->action, tag->jumbo,
> MLX5DR_JUMBO_TAG_SZ);
> +		memcpy(wqe_data->jumbo, tag->jumbo,
> MLX5DR_JUMBO_TAG_SZ);
>  	} else {
>  		/* Clear previous possibly dirty control and actions */
>  		memset(wqe_data, 0, MLX5DR_STE_CTRL_SZ +
> MLX5DR_ACTIONS_SZ);
> --
> 2.18.2

Acked-by: Ori Kam <orika at nvidia.com>
Best,
Ori



More information about the dev mailing list