[PATCH v2] net/mlx5: fix indirect age action handling

Raslan Darawsheh rasland at nvidia.com
Sun Aug 31 16:51:11 CEST 2025


Hi,


On 19/08/2025 2:27 PM, Dariusz Sosnowski wrote:
> Indirect AGE flow actions can be created either through synchronous
> or asynchronous flow API.
> mlx5 PMD stores the queue used to create that action to support
> strict queueing. When action is created through synchronous API
> invalid queue index is stored instead.
> 
> Whenever a flow rule is created with indirect AGE and
> direct COUNT flow actions, PMD allocates a HW counter for ageing
> that flow rule during rule creation.
> During allocation of the counter a queue index is needed
> to select a proper counter pool cache.
> 
> In case when indirect AGE action created through synchronous API
> was used in that case, the associated queue index was used
> to select pool cache. Since queue index was invalid, PMD crashed.
> 
> Counter can be allocated using the index of currently used queue and
> it does not have to match the queue used to create AGE action.
> 
> This patch fixes the crash by using the index of currently used queue
> for counter allocation.
> 
> This patch also adds missing validation for synchronous
> and asynchronous AGE flow action creation:
> 
> - If strict queueing is disabled, only synchronous creation is allowed.
> - If strict queueing is enabled, only asynchronous creation is allowed.
> 
> PMD documentation is updated accordingly.
> 
> It also updates validation of synchronous query
> of aged flow rules in regards to strict queueing.
> When strict queueing is enabled, synchronous query is rejected.
> This aligns PMD behavior with API description.
> 
> Fixes: 04a4de756e14 ("net/mlx5: support flow age action with HWS")
> Cc: michaelba at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Bing Zhao <bingz at nvidia.com>
> Acked-by: Raslan Darawsheh <rasland at nvidia.com>

Patch applied to next-net-mlx,


Kindest regards
Raslan Darawsheh



More information about the dev mailing list