[PATCH v1] net/mlx5: fix action flag data type
Raslan Darawsheh
rasland at nvidia.com
Thu Nov 3 12:41:16 CET 2022
Hi,
> -----Original Message-----
> From: Shun Hao <shunh at nvidia.com>
> Sent: Tuesday, November 1, 2022 12:07 PM
> To: Slava Ovsiienko <viacheslavo at nvidia.com>; Matan Azrad
> <matan at nvidia.com>; Ori Kam <orika at nvidia.com>; Bing Zhao
> <bingz at nvidia.com>
> Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>;
> stable at 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: stable at dpdk.org
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list