From patchwork Tue Oct 27 06:43:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matan Azrad X-Patchwork-Id: 82274 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2BA4A04B5; Tue, 27 Oct 2020 07:43:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AF8312BAA; Tue, 27 Oct 2020 07:43:34 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 9610E29C6 for ; Tue, 27 Oct 2020 07:43:33 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from matan@nvidia.com) with SMTP; 27 Oct 2020 08:43:27 +0200 Received: from nvidia.com (pegasus25.mtr.labs.mlnx [10.210.16.10]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09R6hRSi032010; Tue, 27 Oct 2020 08:43:27 +0200 From: Matan Azrad To: Viacheslav Ovsiienko Cc: dev@dpdk.org, stable@dpdk.org Date: Tue, 27 Oct 2020 06:43:25 +0000 Message-Id: <1603781005-21080-1-git-send-email-matan@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix Tx queue start X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 7429811..0902628 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -788,7 +788,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 dca9c05..605cbfc 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -253,7 +253,7 @@ 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;