[openib-general] ib_post_recv buffer re-use
Andrei Petrov
andrei.petrov at veritas.com
Mon Jun 20 14:50:05 PDT 2005
On Mon, Jun 20, 2005 at 02:19:34PM -0700, Roland Dreier wrote:
> Andrei> Application I'm working on needs to receive and process
> Andrei> messages from RQ, so I dma_map and ib_post_recv pool of
> Andrei> buffers. Then after I receive a message I plan to reuse
> Andrei> already mapped buffer for consequent ib_post_recv. Is that
> Andrei> safe? Should I worry about dma syncronisation?
>
> In general it's not safe for the CPU to touch DMA buffers without
> unmapping them first. However you could look at the dma_sync_xxx API
> to see if that fits what you're trying to do.
>
Oh, I see, as infiniband layer doesn't control how app sets up dma then
it's up to app to handle it accordingly. Yes, dma_sync_xxx should do then.
Thanks,
More information about the general
mailing list