2006-05-15 23:40:46

by Caitlin Bestler

[permalink] [raw]
Subject: RE: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt

[email protected] wrote:
> Grant> Aren't remote addresses handled differently than local
> Grant> ones? ULP has to map local addresses. We can't map remote
> Grant> ones (remote host maps it). The ULP must know the
> Grant> difference and can tell the lower level driver which is
> Grant> which.
>
> The problem is that RDMA requests have to be handled by the
> low-level driver (or hardware) without any ULP involvement.
> So every device has to handle getting messages like "send me
> XXX bytes of data from address YYY in the memory region
> corresponding to R_Key ZZZ."
>

True, but how does that constrain the local interfaces by which
the driver is informed of the set of pages that back a given
memory region? The driver must still ultimately provide dma
accessible addresses to the device. RDMA just changes the
timing of the steps, albeit radically, but not what the
steps are.


2006-05-15 23:50:24

by Roland Dreier

[permalink] [raw]
Subject: Re: [openib-general] Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt

Caitlin> True, but how does that constrain the local interfaces by
Caitlin> which the driver is informed of the set of pages that
Caitlin> back a given memory region? The driver must still
Caitlin> ultimately provide dma accessible addresses to the
Caitlin> device. RDMA just changes the timing of the steps, albeit
Caitlin> radically, but not what the steps are.

It's only a problem for "reserved L_Key" types of things, where the
device is supposed to just use the address given in a work request
without translating it. No translation means that work requests have
to contain "bus addresses" -- addresses that are what the device would
put on the bus to access memory. But if a device needs to simulate
DMA in software, then it really needs a kernel virtual address, not a
bus address. But it's pretty ugly to have to put that knowledge in
every consumer.

- R.