linux/include/rdma
Roland Dreier f7c6a7b5d5 IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules
Export ib_umem_get()/ib_umem_release() and put low-level drivers in
control of when to call ib_umem_get() to pin and DMA map userspace,
rather than always calling it in ib_uverbs_reg_mr() before calling the
low-level driver's reg_user_mr method.

Also move these functions to be in the ib_core module instead of
ib_uverbs, so that driver modules using them do not depend on
ib_uverbs.

This has a number of advantages:
 - It is better design from the standpoint of making generic code a
   library that can be used or overridden by device-specific code as
   the details of specific devices dictate.
 - Drivers that do not need to pin userspace memory regions do not
   need to take the performance hit of calling ib_mem_get().  For
   example, although I have not tried to implement it in this patch,
   the ipath driver should be able to avoid pinning memory and just
   use copy_{to,from}_user() to access userspace memory regions.
 - Buffers that need special mapping treatment can be identified by
   the low-level driver.  For example, it may be possible to solve
   some Altix-specific memory ordering issues with mthca CQs in
   userspace by mapping CQ buffers with extra flags.
 - Drivers that need to pin and DMA map userspace memory for things
   other than memory regions can use ib_umem_get() directly, instead
   of hacks using extra parameters to their reg_phys_mr method.  For
   example, the mlx4 driver that is pending being merged needs to pin
   and DMA map QP and CQ buffers, but it does not need to create a
   memory key for these buffers.  So the cleanest solution is for mlx4
   to call ib_umem_get() in the create_qp and create_cq methods.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-08 18:00:37 -07:00
..
ib_addr.h IB/sa: Track multicast join/leave requests 2007-02-16 14:20:02 -08:00
ib_cache.h IB: Add caching of ports' LMC 2006-06-17 20:37:34 -07:00
ib_cm.h IB/cm: Fix automatic path migration support 2006-11-29 15:33:10 -08:00
ib_fmr_pool.h [PATCH] fmr pool: remove unnecessary pointer dereference 2006-07-14 21:53:51 -07:00
ib_mad.h PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
ib_marshall.h RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
ib_pack.h [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
ib_sa.h IB/sa: Track multicast join/leave requests 2007-02-16 14:20:02 -08:00
ib_smi.h IB: Move struct port_info from ipath to <rdma/ib_smi.h> 2006-06-17 20:37:36 -07:00
ib_umem.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
ib_user_cm.h IB/cm: Fix automatic path migration support 2006-11-29 15:33:10 -08:00
ib_user_mad.h IB: Make sure struct ib_user_mad.data is aligned 2007-02-04 14:11:56 -08:00
ib_user_sa.h IB: common handling for marshalling parameters to/from userspace 2006-06-17 20:37:27 -07:00
ib_user_verbs.h IB/uverbs: Return sq_draining value in query_qp response 2006-10-30 21:19:35 -08:00
ib_verbs.h IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
iw_cm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00
rdma_cm_ib.h RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rdma_cm.h RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rdma_user_cm.h RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00