From: "J.L. Burr" <jlburr-vna1KIf7WgpBDgjK7y7TUQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey
Date: Tue, 28 Jul 2015 16:58:29 -0400 [thread overview]
Message-ID: <mp8qgu$nt0$1@ger.gmane.org> (raw)
In-Reply-To: 20150728182356.GA1712@obsidianresearch.com
"Jason Gunthorpe"
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote in
message news:20150728182356.GA1712-ePGOBjL8dl3ta4EC/59zMK2raWmgRF17@public.gmane.org
> On Tue, Jul 28, 2015 at 11:01:12AM -0400, J.L. Burr wrote:
>
>> We use ib_get_dma_mr with IB_ACCESS_REMOTE_* flags in an embedded
>> device environment (in a custom out-of-tree device driver). Not to
>> allow remote access to CPU memory but to allow remote access to PCIe
>> device memory (the IB card makes peer accesses directly to other
>> PCIe devices).
>
> Why can't you create a proper MR that only exposes the PCI device's
> BAR?
On the embedded side, the QPs and MRs are all in kernel space. That's
because the PCIe device BARs are huge (2**39 is the typical size, but it
can be as large as 2**47). This is much too large to map into the
embedded processor's address space.
In an earlier implementation, I modified ib_reg_phys_mr so that it would
return a no-translation MR and could also specify the physical address
range I wanted it to define. But I haven't used that in a long time.
Plus you guys are removing ib_reg_phys_mr anyway! :-)
My current scheme, with ib_get_dma_mr, results in a MR which maps the
entire 64-bit physical space (which isn't ideal; would indeed be better
if the MR was limited to a single PCIe device BAR space) but does have
the advantage (to me) of not requiring any modifications to Linux, the
kernel IB stack, or IB hardware drivers.
I'm admittedly (way) out of date. Our embedded system is running CentOS
6.6 so the kernel level (2.6.32) is ancient by upstream standards.
Is there some way now (in upstream kernels) to create a MR with an
arbitrary (and large) physical address range? That would be great! I
didn't see a way to do that when I started on this journey (about 4
years ago).
Thanks.
John
--
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
next prev parent reply other threads:[~2015-07-28 20:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 23:34 [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 01/10] IB/core: Guarantee that a local_dma_lkey is available Jason Gunthorpe
2015-07-23 10:47 ` Sagi Grimberg
2015-07-23 18:36 ` Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 04/10] IB/mlx4: Remove ib_get_dma_mr calls Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 05/10] IB/mlx5: " Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 06/10] IB/iser: Use pd->local_dma_lkey Jason Gunthorpe
2015-07-23 10:49 ` Sagi Grimberg
[not found] ` <1437608083-22898-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-22 23:34 ` [PATCH 02/10] IB/mad: Remove ib_get_dma_mr calls Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 03/10] IB/ipoib: " Jason Gunthorpe
2015-07-22 23:34 ` [PATCH 07/10] iser-target: " Jason Gunthorpe
2015-07-23 10:49 ` Sagi Grimberg
2015-07-22 23:34 ` [PATCH 08/10] IB/srp: Use pd->local_dma_lkey Jason Gunthorpe
[not found] ` <1437608083-22898-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-23 10:50 ` Sagi Grimberg
2015-07-22 23:34 ` [PATCH 09/10] ib_srpt: Remove ib_get_dma_mr calls Jason Gunthorpe
2015-07-23 10:51 ` Sagi Grimberg
2015-07-22 23:34 ` [PATCH 10/10] net/9p: " Jason Gunthorpe
2015-07-23 7:46 ` Dominique Martinet
2015-07-23 10:56 ` [PATCH 00/10] IB: Replace safe uses for ib_get_dma_mr with pd->local_dma_lkey Sagi Grimberg
2015-07-23 13:47 ` Bart Van Assche
2015-07-23 18:30 ` Jason Gunthorpe
[not found] ` <20150723183044.GA1868-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-23 18:42 ` Bart Van Assche
[not found] ` <55B13583.5010208-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2015-07-23 18:47 ` Jason Gunthorpe
2015-07-26 8:45 ` Sagi Grimberg
2015-07-29 16:39 ` Doug Ledford
2015-07-25 6:27 ` Christoph Hellwig
2015-07-28 15:01 ` J.L. Burr
2015-07-28 18:23 ` Jason Gunthorpe
2015-07-28 20:58 ` J.L. Burr [this message]
2015-07-28 22:10 ` Jason Gunthorpe
2015-07-28 23:56 ` J.L. Burr
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='mp8qgu$nt0$1@ger.gmane.org' \
--to=jlburr-vna1kif7wgpbdgjk7y7tuq@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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