net/mlx5: fix WQE counter assert in free completion queue
authorAlexander Kozyrev <akozyrev@nvidia.com>
Mon, 16 Nov 2020 19:48:15 +0000 (19:48 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:05 +0000 (21:10 +0100)
commitaf01eeb755b48209fa7e17266afa920d53387572
treedd77773c86ec730a205f5213b6dfba824c6378a8
parentaaf34de5d801d44b983dbe97c10d1cd8a5bcca01
net/mlx5: fix WQE counter assert in free completion queue

The following assertion fails in case RTE_ENABLE_ASSERT is enabled:
PANIC in mlx5_tx_handle_completion():
assert "(txq->fcqs[txq->cq_ci & txq->cqe_m] >> 16)
== cqe->wqe_counter" failed

The free completion queue only contains an expected WQE counter if
RTE_LIBRTE_MLX5_DEBUG is enabled as well. Thus enabling
RTE_ENABLE_ASSERT alone causes the assert to fail.

Compile the assert conditionally only if RTE_ENABLE_ASSERT is enabled.

Fixes: 0afacb04f506 ("common/mlx5: remove NDEBUG")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_rxtx.c