From: Gal Pressman <galpress@amazon.com>
To: Jason Gunthorpe <jgg@ziepe.ca>,
Michal Kalderon <michal.kalderon@marvell.com>
Cc: <ariel.elior@marvell.com>, <dledford@redhat.com>,
<yishaih@mellanox.com>, <bmt@zurich.ibm.com>,
<linux-rdma@vger.kernel.org>, <sleybo@amazon.com>
Subject: Re: [PATCH v12 rdma-next 4/8] RDMA/efa: Use the common mmap_xa helpers
Date: Wed, 6 Nov 2019 10:20:30 +0200 [thread overview]
Message-ID: <a27c98c0-1d18-3090-01cb-3175d2a8f116@amazon.com> (raw)
In-Reply-To: <20191105195459.GA19938@ziepe.ca>
On 05/11/2019 21:54, Jason Gunthorpe wrote:
>> static int qp_mmap_entries_setup(struct efa_qp *qp,
>> struct efa_dev *dev,
>> struct efa_ucontext *ucontext,
>> struct efa_com_create_qp_params *params,
>> struct efa_ibv_create_qp_resp *resp)
>> {
>> - /*
>> - * Once an entry is inserted it might be mmapped, hence cannot be
>> - * cleaned up until dealloc_ucontext.
>> - */
>> - resp->sq_db_mmap_key =
>> - mmap_entry_insert(dev, ucontext, qp,
>> - dev->db_bar_addr + resp->sq_db_offset,
>> - PAGE_SIZE, EFA_MMAP_IO_NC);
>> - if (resp->sq_db_mmap_key == EFA_MMAP_INVALID)
>> + size_t length;
>> + u64 address;
>> +
>> + address = dev->db_bar_addr + resp->sq_db_offset;
>> + qp->sq_db_mmap_entry =
>> + efa_user_mmap_entry_insert(&ucontext->ibucontext,
>> + address,
>> + PAGE_SIZE, EFA_MMAP_IO_NC,
>> + &resp->sq_db_mmap_key);
>
> I'm still confused how this is OK for the lifetime, 'sq_db_offset'
> comes from the device, does the device prevent re-use of the same
> db_offset until the ucontext is closed? If so that deserves a comment
> in here.
The device prevents reuse of the DB offset until the UAR is deallocated (during
ucontext close). Same applies for the RQ DB and LLQ offset.
next prev parent reply other threads:[~2019-11-06 8:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 9:44 [PATCH v12 rdma-next 0/8] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Michal Kalderon
2019-10-30 9:44 ` [PATCH v12 rdma-next 1/8] RDMA/core: Move core content from ib_uverbs to ib_core Michal Kalderon
2019-10-30 9:44 ` [PATCH v12 rdma-next 2/8] RDMA/core: Create mmap database and cookie helper functions Michal Kalderon
2019-10-31 12:35 ` Yishai Hadas
2019-11-01 10:19 ` [EXT] " Michal Kalderon
2019-11-05 19:44 ` Jason Gunthorpe
2019-10-30 9:44 ` [PATCH v12 rdma-next 3/8] RDMA: Connect between the mmap entry and the umap_priv structure Michal Kalderon
2019-11-05 19:47 ` Jason Gunthorpe
2019-10-30 9:44 ` [PATCH v12 rdma-next 4/8] RDMA/efa: Use the common mmap_xa helpers Michal Kalderon
2019-11-05 19:54 ` Jason Gunthorpe
2019-11-06 8:20 ` Gal Pressman [this message]
2019-10-30 9:44 ` [PATCH v12 rdma-next 5/8] RDMA/siw: " Michal Kalderon
2019-10-30 9:44 ` [PATCH v12 rdma-next 6/8] RDMA/qedr: Use the common mmap API Michal Kalderon
2019-10-30 9:44 ` [PATCH v12 rdma-next 7/8] RDMA/qedr: Add doorbell overflow recovery support Michal Kalderon
2019-10-30 9:44 ` [PATCH v12 rdma-next 8/8] RDMA/qedr: Add iWARP doorbell " Michal Kalderon
2019-10-30 15:33 ` [PATCH v12 rdma-next 5/8] RDMA/siw: Use the common mmap_xa helpers Bernard Metzler
2019-11-05 20:41 ` [PATCH v12 rdma-next 0/8] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA Jason Gunthorpe
2019-11-06 13:04 ` Michal Kalderon
2019-11-06 15:10 ` Jason Gunthorpe
2019-11-06 17:09 ` Jason Gunthorpe
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=a27c98c0-1d18-3090-01cb-3175d2a8f116@amazon.com \
--to=galpress@amazon.com \
--cc=ariel.elior@marvell.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=sleybo@amazon.com \
--cc=yishaih@mellanox.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).