From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C01011B74E for ; Tue, 17 Oct 2017 09:45:59 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 17 Oct 2017 09:45:54 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v9H7jrwi011009; Tue, 17 Oct 2017 10:45:54 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id v9H7jqsC080292; Tue, 17 Oct 2017 15:45:52 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id v9H7jpqO080290; Tue, 17 Oct 2017 15:45:51 +0800 From: Xueming Li To: Nelio Laranjeiro Cc: Xueming Li , dev@dpdk.org Date: Tue, 17 Oct 2017 15:45:35 +0800 Message-Id: <20171017074535.80245-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] net/mlx5: fix secondary process TX error 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: , X-List-Received-Date: Tue, 17 Oct 2017 07:46:00 -0000 Uninitialized UAR mmap offset caused secondary tx doorbell mapped to wrong address. This patch restores missing UAR mmap offset init code overridden by wrong merge. Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue ...") Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_txq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 9deaa7ea3..290e614dc 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -303,7 +303,7 @@ mlx5_priv_txq_ibv_new(struct priv *priv, uint16_t idx) struct ibv_cq_ex cq_attr; } attr; unsigned int cqe_n; - struct mlx5dv_qp qp; + struct mlx5dv_qp qp = {.comp_mask = MLX5DV_QP_MASK_UAR_MMAP_OFFSET}; struct mlx5dv_cq cq_info; struct mlx5dv_obj obj; const int desc = 1 << txq_data->elts_n; @@ -429,6 +429,12 @@ mlx5_priv_txq_ibv_new(struct priv *priv, uint16_t idx) txq_ibv->qp = tmpl.qp; txq_ibv->cq = tmpl.cq; rte_atomic32_inc(&txq_ibv->refcnt); + if (qp.comp_mask | MLX5DV_QP_MASK_UAR_MMAP_OFFSET) { + txq_ctrl->uar_mmap_offset = qp.uar_mmap_offset; + } else { + ERROR("Failed to retrieve UAR info, invalid libmlx5.so version"); + goto error; + } DEBUG("%p: Verbs Tx queue %p: refcnt %d", (void *)priv, (void *)txq_ibv, rte_atomic32_read(&txq_ibv->refcnt)); LIST_INSERT_HEAD(&priv->txqsibv, txq_ibv, next); -- 2.13.3