All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kalderon <mkalderon@marvell.com>
To: Gal Pressman <galpress@amazon.com>
Cc: Ariel Elior <aelior@marvell.com>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"bmt@zurich.ibm.com" <bmt@zurich.ibm.com>,
	"sleybo@amazon.com" <sleybo@amazon.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: RE: [PATCH v9 rdma-next 3/7] RDMA/efa: Use the common mmap_xa helpers
Date: Wed, 4 Sep 2019 06:48:12 +0000	[thread overview]
Message-ID: <MN2PR18MB3182F29E8F63A963BD088A3CA1B80@MN2PR18MB3182.namprd18.prod.outlook.com> (raw)
In-Reply-To: <47b5d22f-e208-0ed2-19d3-b1beb22cf806@amazon.com>

> From: Gal Pressman <galpress@amazon.com>
> Sent: Tuesday, September 3, 2019 6:07 PM
> 
> On 03/09/2019 12:31, Michal Kalderon wrote:
> >> From: linux-rdma-owner@vger.kernel.org <linux-rdma-
> >> owner@vger.kernel.org> On Behalf Of Gal Pressman
> >>
> >> On 02/09/2019 19:23, Michal Kalderon wrote:
> >>>  int efa_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)  {
> >>> +	struct efa_ucontext *ucontext =
> >> rdma_udata_to_drv_context(udata,
> >>> +		struct efa_ucontext, ibucontext);
> >>>  	struct efa_dev *dev = to_edev(ibqp->pd->device);
> >>>  	struct efa_qp *qp = to_eqp(ibqp);
> >>>  	int err;
> >>>
> >>>  	ibdev_dbg(&dev->ibdev, "Destroy qp[%u]\n", ibqp->qp_num);
> >>> +
> >>> +	efa_qp_user_mmap_entries_remove(ucontext, qp);
> >>> +
> >>>  	err = efa_destroy_qp_handle(dev, qp->qp_handle);
> >>>  	if (err)
> >>>  		return err;
> >>> @@ -509,57 +412,114 @@ int efa_destroy_qp(struct ib_qp *ibqp, struct
> >> ib_udata *udata)
> >>>  	return 0;
> >>>  }
> >>>
> >>>  void efa_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata)  {
> >>> +	struct efa_ucontext *ucontext =
> >> rdma_udata_to_drv_context(udata,
> >>> +			struct efa_ucontext, ibucontext);
> >>> +
> >>>  	struct efa_dev *dev = to_edev(ibcq->device);
> >>>  	struct efa_cq *cq = to_ecq(ibcq);
> >>>
> >>> @@ -897,17 +862,28 @@ void efa_destroy_cq(struct ib_cq *ibcq, struct
> >> ib_udata *udata)
> >>>  	efa_destroy_cq_idx(dev, cq->cq_idx);
> >>>  	dma_unmap_single(&dev->pdev->dev, cq->dma_addr, cq->size,
> >>>  			 DMA_FROM_DEVICE);
> >>> +	rdma_user_mmap_entry_remove(&ucontext->ibucontext,
> >>> +				    cq->mmap_key);
> >>
> >> How come in destroy_qp we do entry removal first, but in destroy_cq
> >> it's last?
> >> Shouldn't it be the same?
> > Yes, you're right, it should be done after memory is unmapped, I'll
> > move it down In the destroy qp flow. Is this the only comment on this
> series ?
> 
> Other than that the patch looks good to me,
> Acked-by: Gal Pressman <galpress@amazon.com>
> 
> A few nits (feel free to ignore):
> * The rdma_user_mmap_entry is always referred to as rdma_entry except in
> efa_mmap_free declaration and to_emmap.
> * efa_qp_user_mmap_entries_remove isn't really in reverse insertion order
> but OK :).
> * In case of length mismatch in __efa_mmap two error messages are
> printed, consider keeping the "Couldn't mmap address ..." print in the if (not
> part of the goto label).
> 
Thanks, as I'm already sending another series I'll fix the nits 😊 

> Thanks for doing this!

  reply	other threads:[~2019-09-04  6:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 16:23 [PATCH v9 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 1/7] RDMA/core: Move core content from ib_uverbs to ib_core Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 2/7] RDMA/core: Create mmap database and cookie helper functions Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 3/7] RDMA/efa: Use the common mmap_xa helpers Michal Kalderon
2019-09-03  8:47   ` Gal Pressman
2019-09-03  9:31     ` Michal Kalderon
2019-09-03 15:07       ` Gal Pressman
2019-09-04  6:48         ` Michal Kalderon [this message]
2019-09-02 16:23 ` [PATCH v9 rdma-next 4/7] RDMA/siw: " Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 5/7] RDMA/qedr: Use the common mmap API Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 6/7] RDMA/qedr: Add doorbell overflow recovery support Michal Kalderon
2019-09-02 16:23 ` [PATCH v9 rdma-next 7/7] RDMA/qedr: Add iWARP doorbell " Michal Kalderon
2019-09-03 11:37 ` [PATCH v9 rdma-next 0/7] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Bernard Metzler
2019-09-03 12:50   ` [EXT] " Michal Kalderon
2019-09-03 13:39   ` Bernard Metzler
2019-09-03 14:15 ` [PATCH v9 rdma-next 4/7] RDMA/siw: Use the common mmap_xa helpers Bernard Metzler
2019-09-04  6:50   ` [EXT] " Michal Kalderon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR18MB3182F29E8F63A963BD088A3CA1B80@MN2PR18MB3182.namprd18.prod.outlook.com \
    --to=mkalderon@marvell.com \
    --cc=aelior@marvell.com \
    --cc=bmt@zurich.ibm.com \
    --cc=dledford@redhat.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sleybo@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.