From patchwork Thu Aug 17 13:36:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yishai Hadas X-Patchwork-Id: 9906335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7FA756024A for ; Thu, 17 Aug 2017 13:37:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 709CB2889E for ; Thu, 17 Aug 2017 13:37:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6509628AA1; Thu, 17 Aug 2017 13:37:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE9772889E for ; Thu, 17 Aug 2017 13:37:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbdHQNhJ (ORCPT ); Thu, 17 Aug 2017 09:37:09 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:48182 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750988AbdHQNhJ (ORCPT ); Thu, 17 Aug 2017 09:37:09 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yishaih@mellanox.com) with ESMTPS (AES256-SHA encrypted); 17 Aug 2017 16:37:02 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [10.7.2.17]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v7HDb2jQ011879; Thu, 17 Aug 2017 16:37:02 +0300 Received: from vnc17.mtl.labs.mlnx (vnc17.mtl.labs.mlnx [127.0.0.1]) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8) with ESMTP id v7HDb2BF020999; Thu, 17 Aug 2017 16:37:02 +0300 Received: (from yishaih@localhost) by vnc17.mtl.labs.mlnx (8.13.8/8.13.8/Submit) id v7HDaxA0020986; Thu, 17 Aug 2017 16:36:59 +0300 From: Yishai Hadas To: linux-rdma@vger.kernel.org Cc: yishaih@mellanox.com, leonro@mellanox.com, majd@mellanox.com Subject: [PATCH rdma-core] mlx5: Return pointer to CQ doorbell Date: Thu, 17 Aug 2017 16:36:38 +0300 Message-Id: <1502976998-20906-1-git-send-email-yishaih@mellanox.com> X-Mailer: git-send-email 1.8.2.3 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky The returned UAR pointer is actually void ** and points to whole UAR database. Because user is not supposed to access it and expected to use the CQ doorbell, we will return uar[0] (CQ doorbell) directly and eliminate the following logic in the applications: uint64_t cq_db_reg = (uint64_t *)(((uint64_t)(uint64_t *)rxq->cq_uar) + MLX5_CQ_DOORBELL; Signed-off-by: Leon Romanovsky Reviewed-by: Yishai Hadas --- Pull request was sent: https://github.com/linux-rdma/rdma-core/pull/184 providers/mlx5/mlx5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/mlx5/mlx5.c b/providers/mlx5/mlx5.c index ede91cb..c7a6efb 100644 --- a/providers/mlx5/mlx5.c +++ b/providers/mlx5/mlx5.c @@ -678,7 +678,7 @@ static int mlx5dv_get_cq(struct ibv_cq *cq_in, cq_out->cqe_size = mcq->cqe_sz; cq_out->buf = mcq->active_buf->buf; cq_out->dbrec = mcq->dbrec; - cq_out->uar = mctx->uar; + cq_out->uar = mctx->uar[0]; mcq->flags |= MLX5_CQ_FLAGS_DV_OWNED;