net/mlx5: fix index handling for Tx ring
net/mlx5: fix index handling for Tx ring

In case of resource deficiency on Tx, mlx5_tx_burst() breaks the loop
without rolling back consumed resources (txq->wqes[] and txq->elts[]). This
can make application crash because unposted mbufs can be freed while
processing completions. Other Tx functions don't have this issue.

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Fixes: f04f1d51564b ("net/mlx5: fix Tx WQE corruption caused by starvation")
Cc: stable@dpdk.org

Reported-by: Hanoch Haim <1f34741bfa88280155d5053f5e8f4b89d8aa79bf@cisco.com>
Signed-off-by: Yongseok Koh <76b37c91816d73ef9cf709e3e83a68f2d162f1e2@mellanox.com>
Acked-by: Adrien Mazarguil <9d39ea493ca46c560334f650ac5d4b5ffbcb5cf0@6wind.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk