[PATCH v3] net/mlx5: fix age checking crash
Raslan Darawsheh
rasland at nvidia.com
Thu Oct 16 14:17:31 CEST 2025
Hi,
On 09/10/2025 12:18 PM, Rongwei Liu wrote:
> When aging is configured, there is a background thread
> which queries all the counters in the pool.
>
> Meantime, per queue flow insertion/deletion/update changes
> the counter pool too. It introduces a race condition between
> resetting counters's in_used and age_idx fields during flow deletion
> and reading them in the background thread.
>
> To resolve it, all key members of counter's struct
> are placed in a single uint32_t and they are accessed atomically.
>
> To avoid the occasional timestamp equalization with age_idx,
> query_gen_when_free is moved out of the union. The total memory
> size is kept the same.
>
> Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")
> Cc: michaelba at nvidia.com
> Cc: stable at dpdk.org
> Signed-off-by: Rongwei Liu <rongweil at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
>
> v3: fix windows compilation error.
> v2: fix clang compilation error.
> ---
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list