net/mlx5: fix Tx queue release debug log timing
authorAlexander Kozyrev <akozyrev@mellanox.com>
Wed, 6 May 2020 18:10:59 +0000 (18:10 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 20:27:39 +0000 (22:27 +0200)
commit776aec28fc47dbf29466555b34cd79ab9cf7a7bc
treea78bd454e53961b497b8f80295c908b426825357
parent6f155c0b9de5a58b5653d3e81c553564984f3c36
net/mlx5: fix Tx queue release debug log timing

Program received signal SIGSEGV, Segmentation fault.
0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
drivers/net/mlx5/mlx5_txq.c:302
301 mlx5_txq_release(ETH_DEV(priv), i);
302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
303         PORT_ID(priv), txq->idx);
The problem is txq is freed inside the mlx5_txq_release() function
and no longer valid in the debug log right after this invocation.
Move the debug log before the mlx5_txq_release() function to fix this.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_txq.c