net/mlx5: fix doorbell release on Rx queue release
authorDekel Peled <dekelp@mellanox.com>
Wed, 24 Jul 2019 09:05:10 +0000 (12:05 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 24 Jul 2019 16:05:07 +0000 (18:05 +0200)
commita88209b04c774b2c72bfb6f288dff4bc01fc9a8b
tree1b78ab846ceeae1ccb9f24148d768ec6d19ee26e
parent94f00800d78b41c119f213a27ad4a8e1e3c78922
net/mlx5: fix doorbell release on Rx queue release

Function mlx5_rxq_release() calls mlx5_release_dbr() to release the
doorbell allocated for this Rx queue.
This call is relevant only for Rx queue objects created using
DevX API.

This patch adds the required check, to call mlx5_release_dbr()
only when relevant.
It also updates mlx5_release_dbr() to use the input offset correctly.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_rxtx.h