From 89f170c0da1b9debbc962f6b68afdda09e4465bb Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Tue, 27 Oct 2020 06:43:25 +0000 Subject: [PATCH] net/mlx5: fix Tx queue start The Tx queue stop\start operations update the HW state of the Tx queue object. The stop API should update the state from ready to reset in order to stop any queue traffic and the start API should update the state from reset to ready in order to open the traffic path. The start API wrongly tried to change the state from ready to ready what caused a failure in FW on the current state validation. Replace ready to ready command by reset to ready command in the Tx start API. Fixes: 161d103b231c ("net/mlx5: add queue start and stop") Cc: stable@dpdk.org Signed-off-by: Matan Azrad Acked-by: Viacheslav Ovsiienko Acked-by: Asaf Penso --- drivers/net/mlx5/mlx5.h | 1 - drivers/net/mlx5/mlx5_txq.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index c69353f905..88bbd316f0 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -787,7 +787,6 @@ enum mlx5_rxq_modify_type { }; enum mlx5_txq_modify_type { - MLX5_TXQ_MOD_RDY2RDY, /* modify state from ready to ready. */ MLX5_TXQ_MOD_RST2RDY, /* modify state from reset to ready. */ MLX5_TXQ_MOD_RDY2RST, /* modify state from ready to reset. */ MLX5_TXQ_MOD_ERR2RDY, /* modify state from error to ready. */ diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index e0e39637d9..cd7b42a0b2 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -253,7 +253,7 @@ mlx5_tx_queue_start_primary(struct rte_eth_dev *dev, uint16_t idx) MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY); ret = priv->obj_ops.txq_obj_modify(txq_ctrl->obj, - MLX5_TXQ_MOD_RDY2RDY, + MLX5_TXQ_MOD_RST2RDY, (uint8_t)priv->dev_port); if (ret) return ret; -- 2.20.1