> -----Original Message-----
> From: Dariusz Sosnowski <[email protected]>
> Sent: Monday, November 22, 2021 19:10
> To: Matan Azrad <[email protected]>; Slava Ovsiienko
> <[email protected]>; Dmitry Kozlyuk <[email protected]>
> Cc: Raslan Darawsheh <[email protected]>; [email protected];
> [email protected]
> 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: [email protected]
> Cc: [email protected]
>
> Signed-off-by: Dariusz Sosnowski <[email protected]>
Acked-by: Viacheslav Ovsiienko <[email protected]>