From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A66E8A04BA; Thu, 1 Oct 2020 16:10:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FB1A1DB82; Thu, 1 Oct 2020 16:10:25 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3A3C81DB7C for ; Thu, 1 Oct 2020 16:10:23 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from michaelba@nvidia.com) with SMTP; 1 Oct 2020 17:10:17 +0300 Received: from nvidia.com (pegasus07.mtr.labs.mlnx [10.210.16.112]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 091EAAEH012743; Thu, 1 Oct 2020 17:10:17 +0300 From: Michael Baum To: dev@dpdk.org Cc: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , stable@dpdk.org Date: Thu, 1 Oct 2020 14:09:12 +0000 Message-Id: <1601561366-1821-2-git-send-email-michaelba@nvidia.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1601561366-1821-1-git-send-email-michaelba@nvidia.com> References: <1601561366-1821-1-git-send-email-michaelba@nvidia.com> Subject: [dpdk-dev] [PATCH v1 01/15] net/mlx5: fix send queue doorbell typo 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" As part of SQ creation for Tx queue objects, a HW doorbell memory should be allocated and mapped to the HW. The SQ doorbell handler was wrongly saved on the CQ fields what caused wrong doorbell release in the Tx queue object destroy flow. Save the SQ doorbell handler in the SQ fields. Fixes: 3a87b964edd3 ("net/mlx5: create Tx queues with DevX") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_txq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 1bb667d..fc730fa 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -1050,8 +1050,8 @@ dev->data->port_id, txq_data->idx); goto error; } - /* Allocate doorbell record for completion queue. */ - txq_obj->cq_dbrec_offset = mlx5_get_dbr(sh->ctx, + /* Allocate doorbell record for send queue. */ + txq_obj->sq_dbrec_offset = mlx5_get_dbr(sh->ctx, &priv->dbrpgs, &txq_obj->sq_dbrec_page); if (txq_obj->sq_dbrec_offset < 0) @@ -1076,9 +1076,9 @@ sq_attr.wq_attr.log_wq_stride = rte_log2_u32(MLX5_WQE_SIZE); sq_attr.wq_attr.log_wq_sz = txq_data->wqe_n; sq_attr.wq_attr.dbr_umem_valid = 1; - sq_attr.wq_attr.dbr_addr = txq_obj->cq_dbrec_offset; + sq_attr.wq_attr.dbr_addr = txq_obj->sq_dbrec_offset; sq_attr.wq_attr.dbr_umem_id = - mlx5_os_get_umem_id(txq_obj->cq_dbrec_page->umem); + mlx5_os_get_umem_id(txq_obj->sq_dbrec_page->umem); sq_attr.wq_attr.wq_umem_valid = 1; sq_attr.wq_attr.wq_umem_id = mlx5_os_get_umem_id(txq_obj->sq_umem); sq_attr.wq_attr.wq_umem_offset = (uintptr_t)txq_obj->sq_buf % page_size; -- 1.8.3.1