> -----Original Message-----
> From: Dariusz Sosnowski <dsosnow...@nvidia.com>
> Sent: Monday, November 22, 2021 19:10
> To: Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko
> <viachesl...@nvidia.com>; Dmitry Kozlyuk <dkozl...@nvidia.com>
> Cc: Raslan Darawsheh <rasl...@nvidia.com>; dev@dpdk.org;
> sta...@dpdk.org
> Subject: [PATCH v3] 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: dkozl...@nvidia.com
> Cc: sta...@dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnow...@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>