From: Gal Pressman <galpress@amazon.com>
To: Michal Kalderon <michal.kalderon@marvell.com>
Cc: <mkalderon@marvell.com>, <aelior@marvell.com>, <jgg@ziepe.ca>,
<dledford@redhat.com>, <bmt@zurich.ibm.com>,
<galpress@amazon.com>, <sleybo@amazon.com>, <leon@kernel.org>,
<linux-rdma@vger.kernel.org>,
"Ariel Elior" <ariel.elior@marvell.com>
Subject: Re: [PATCH v9 rdma-next 3/7] RDMA/efa: Use the common mmap_xa helpers
Date: Tue, 3 Sep 2019 11:47:44 +0300 [thread overview]
Message-ID: <c6a758ce-3b9e-5e95-5a44-d8add311d976@amazon.com> (raw)
In-Reply-To: <20190902162314.17508-4-michal.kalderon@marvell.com>
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?
next prev parent reply other threads:[~2019-09-03 8: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 [this message]
2019-09-03 9:31 ` Michal Kalderon
2019-09-03 15:07 ` Gal Pressman
2019-09-04 6:48 ` Michal Kalderon
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=c6a758ce-3b9e-5e95-5a44-d8add311d976@amazon.com \
--to=galpress@amazon.com \
--cc=aelior@marvell.com \
--cc=ariel.elior@marvell.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=mkalderon@marvell.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).