[PATCH v3] net/mlx5: fix refcount on detached indirect action
Slava Ovsiienko
viacheslavo at nvidia.com
Tue Nov 23 14:26:29 CET 2021
> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Sent: Monday, November 22, 2021 19:10
> To: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Cc: Raslan Darawsheh <rasland at nvidia.com>; dev at dpdk.org;
> stable at 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: dkozlyuk at nvidia.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
More information about the dev
mailing list