net/mlx5: fix Tx queue reference count check
authorMatan Azrad <matan@nvidia.com>
Tue, 3 Nov 2020 06:47:44 +0000 (06:47 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 15:26:54 +0000 (16:26 +0100)
commit95940894f36a87dde7e9ffea5ee37a1324191d05
tree191725741565c155f226e6f1717539c6bddaa833
parent992e6df3dafebf0625a59a51136a5e07a361000f
net/mlx5: fix Tx queue reference count check

The Txq refcnt 1 value means that there is no real reference to the
queue and only the control configurations are saved in the struct.

The patch below wrongly didn't consider it and caused a leak in the Txq
object resource.

Revert the specific update in the refcnt.

Fixes: b5c8b3e70cdf ("net/mlx5: use C11 atomics for RxQ/TxQ refcounts")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_txq.c