public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core] mlx5: Return pointer to CQ doorbell
@ 2017-08-17 13:36 Yishai Hadas
       [not found] ` <1502976998-20906-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Yishai Hadas @ 2017-08-17 13:36 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: yishaih-VPRAkNaXOzVWk0Htik3J/w, leonro-VPRAkNaXOzVWk0Htik3J/w,
	majd-VPRAkNaXOzVWk0Htik3J/w

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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 <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---

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;
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-08-24 20:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 13:36 [PATCH rdma-core] mlx5: Return pointer to CQ doorbell Yishai Hadas
     [not found] ` <1502976998-20906-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-08-17 17:33   ` Jason Gunthorpe
     [not found]     ` <20170817173320.GB22792-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-17 17:39       ` Leon Romanovsky
     [not found]         ` <20170817173932.GJ23648-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-17 18:03           ` Jason Gunthorpe
     [not found]             ` <20170817180349.GD24735-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-21  9:06               ` Yishai Hadas
     [not found]                 ` <99bc8f57-6a58-d309-7142-74cc498f7feb-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-08-21 15:22                   ` Jason Gunthorpe
     [not found]                     ` <20170821152237.GA3400-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-22  8:36                       ` Yishai Hadas
     [not found]                         ` <912a3e5b-7dbc-061a-53f5-b3cf3bce9d9e-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-08-22 16:30                           ` Jason Gunthorpe
     [not found]                             ` <20170822163007.GB4922-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-23 12:13                               ` Yishai Hadas
     [not found]                                 ` <1b7e41dc-4873-7c0a-6cdb-bc499af70af2-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-08-23 14:06                                   ` Jason Gunthorpe
2017-08-23 16:08                                   ` Jason Gunthorpe
     [not found]                                     ` <20170823160816.GA11188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-23 16:45                                       ` Leon Romanovsky
     [not found]                                         ` <20170823164555.GV1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-23 16:52                                           ` Jason Gunthorpe
     [not found]                                             ` <20170823165221.GB23928-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-24  5:27                                               ` Leon Romanovsky
     [not found]                                                 ` <20170824052716.GD1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-24 15:00                                                   ` Jason Gunthorpe
     [not found]                                                     ` <20170824150045.GA23110-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-24 15:50                                                       ` Leon Romanovsky
     [not found]                                                         ` <20170824155036.GN1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-24 16:40                                                           ` Jason Gunthorpe
2017-08-24 20:30                                                           ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox