[PATCH v4] net/mlx5: fix refcount on detached indirect action

Raslan Darawsheh rasland at nvidia.com
Tue Nov 23 21:35:26 CET 2021


Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Sent: Tuesday, November 23, 2021 5:38 PM
> To: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Cc: dev at dpdk.org; Raslan Darawsheh <rasland at nvidia.com>;
> stable at dpdk.org
> Subject: [PATCH v4] net/mlx5: fix refcount on detached indirect action
> 
> This patch fixes segfault which was triggered when port, with indirect actions
> created, was closed. Segfault was occurring only when
> RTE_LIBRTE_MLX5_DEBUG was defined. It was caused by redundant
> decrement of RX queues refcount:
> 
> - refcount was decremented when port was stopped and indirect actions
> were detached from RX queues (port stop),
> - refcount was decremented when indirect actions objects were destroyed
> (port close or destroying of indirect action).
> 
> This patch fixes behavior. Dereferencing RX queues is done if and only if
> indirect action is explicitly destroyed by the user or detached on port stop.
> Dereferencing RX queues on action destroy operation depends on an
> argument to the wrapper of indirect action destroy operation, introduced in
> this patch.
> 
> Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart")
> Cc: dkozlyuk at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Matan Azrad <matan at nvidia.com>
> ---
> v4:
> * Simplify dev_started checking.
> * Remove redundant passes of deref_rxqs argument.
> 
> v3:
> * Fix handling action destroy in between port start and stop.
> * Revert moving contents of mlx5_action_handle_destroy
> 
> v2:
> * Introduce wrapper over action action destroy operation.
> * Fix typos in commit message.
> 

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the stable mailing list