net/mlx5: fix shared RSS destruction
authorDmitry Kozlyuk <dkozlyuk@nvidia.com>
Wed, 1 Sep 2021 08:07:52 +0000 (11:07 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 21 Sep 2021 08:06:11 +0000 (10:06 +0200)
commitf2f5879efb733460933dacf691887b22dfe9aa08
tree502299e6890a7bd71b14d218a027208453a5ca4d
parentb09c65fa4f8bb55880b6b36c849e4ed1bb815227
net/mlx5: fix shared RSS destruction

Shared RSS resources were released before checking that the shared RSS
has no more references. If it had, the destruction was aborted, leaving
the shared RSS in an invalid state where it could no longer be used.
Move reference counter check before resource release.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c