Hi, > -----Original Message----- > From: Dariusz Sosnowski <dsosnow...@nvidia.com> > Sent: Tuesday, November 23, 2021 5:38 PM > To: Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko > <viachesl...@nvidia.com>; Dmitry Kozlyuk <dkozl...@nvidia.com> > Cc: dev@dpdk.org; Raslan Darawsheh <rasl...@nvidia.com>; > sta...@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: dkozl...@nvidia.com > Cc: sta...@dpdk.org > > Signed-off-by: Dariusz Sosnowski <dsosnow...@nvidia.com> > Acked-by: Matan Azrad <ma...@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