Hi,

> -----Original Message-----
> From: Shun Hao <sh...@nvidia.com>
> Sent: Tuesday, November 1, 2022 12:07 PM
> To: Slava Ovsiienko <viachesl...@nvidia.com>; Matan Azrad
> <ma...@nvidia.com>; Ori Kam <or...@nvidia.com>; Bing Zhao
> <bi...@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>;
> sta...@dpdk.org
> Subject: [PATCH v1] net/mlx5: fix action flag data type
> 
> MLX5_FLOW_ACTION flags are used as uint64_t now, but some old flags
> are not defined as 64 bits. So if they are type casted to uint64 after
> bitwise operations, the high 32-bit data might be incorrect.
> 
> E.g. Currently MLX5_FLOW_ACTION_DROP is defined as 0x1u, when it is
> used
> like:
>       (action_flags & ~MLX5_FLOW_ACTION_DROP)
> action_flags is uint64_t so (~MLX5_FLOW_ACTION_DROP) will be casted to
> uint64_t as well, but its high 32 bits will be all 0s. This will make the
> result not as expected.
> 
> This patch fixes this by making all action flags definition as 64-bit
> data type.
> 
> Fixes: 4b7bf3ff ("net/mlx5: support yellow in meter policy validation")
> Cc: sta...@dpdk.org

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

Reply via email to