All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] RDMA: Add dma-buf support
@ 2020-04-16 17:09 Jianxin Xiong
  2020-04-16 17:09 ` [RFC PATCH 1/3] RDMA/umem: Support importing dma-buf as user memory region Jianxin Xiong
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Jianxin Xiong @ 2020-04-16 17:09 UTC (permalink / raw)
  To: linux-rdma
  Cc: Jianxin Xiong, Doug Ledford, Jason Gunthorpe, Sumit Semwal,
	Leon Romanovsky

This patch set adds dma-buf importer role to the RDMA driver and thus
provides a non-proprietary approach for supporting RDMA to/from buffers
allocated from device local memory (e.g. GPU VRAM). 

Dma-buf is a standard mechanism in Linux kernel for sharing buffers
among different device drivers. It is supported by mainstream GPU
drivers. By using ioctl calls over the devices under /dev/dri/, user
space applications can allocate and export GPU buffers as dma-buf
objetcs with associated file descriptors.

In order to use the exported GPU buffer for RDMA operations, the RDMA
driver needs to be able to import dma-buf objects. This happens at the
time of memory registration. A GPU buffer is registered as a special
type of user space memory region with the dma-buf file descriptor as
an extra parameter. The uverbs API needs to be extended to allow the
extra parameter be passed from user space to kernel.

Vendor RDMA drivers need to be modified in order to take advantage of
the new feature. A patch for the mlx5 driver is provided as an example.

Related user space RDMA library changes will be provided as a separate
patch set.

Jianxin Xiong (3):
  RDMA/umem: Support importing dma-buf as user memory region
  RDMA/uverbs: Add uverbs commands for fd-based MR registration
  RDMA/mlx5: Support new uverbs commands for registering fd-based MR

 drivers/infiniband/Kconfig            |  10 ++
 drivers/infiniband/core/Makefile      |   1 +
 drivers/infiniband/core/device.c      |   2 +
 drivers/infiniband/core/umem.c        |   3 +
 drivers/infiniband/core/umem_dmabuf.c | 100 +++++++++++++++++++
 drivers/infiniband/core/uverbs_cmd.c  | 179 +++++++++++++++++++++++++++++++++-
 drivers/infiniband/hw/mlx5/main.c     |   6 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h  |   7 ++
 drivers/infiniband/hw/mlx5/mr.c       |  85 ++++++++++++++--
 include/rdma/ib_umem.h                |   5 +
 include/rdma/ib_umem_dmabuf.h         |  50 ++++++++++
 include/rdma/ib_verbs.h               |   8 ++
 include/uapi/rdma/ib_user_verbs.h     |  28 ++++++
 13 files changed, 472 insertions(+), 12 deletions(-)
 create mode 100644 drivers/infiniband/core/umem_dmabuf.c
 create mode 100644 include/rdma/ib_umem_dmabuf.h

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-04-17 16:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 17:09 [RFC PATCH 0/3] RDMA: Add dma-buf support Jianxin Xiong
2020-04-16 17:09 ` [RFC PATCH 1/3] RDMA/umem: Support importing dma-buf as user memory region Jianxin Xiong
2020-04-16 18:01   ` Jason Gunthorpe
2020-04-16 19:41     ` Xiong, Jianxin
2020-04-17 12:31       ` Jason Gunthorpe
2020-04-17 15:49         ` Xiong, Jianxin
2020-04-16 18:02   ` Leon Romanovsky
2020-04-16 18:04     ` Jason Gunthorpe
2020-04-16 18:30       ` Leon Romanovsky
2020-04-16 21:08     ` Xiong, Jianxin
2020-04-16 17:09 ` [RFC PATCH 2/3] RDMA/uverbs: Add uverbs commands for fd-based MR registration Jianxin Xiong
2020-04-16 17:47   ` Jason Gunthorpe
2020-04-16 18:32     ` Xiong, Jianxin
2020-04-17 12:35       ` Jason Gunthorpe
2020-04-16 17:09 ` [RFC PATCH 3/3] RDMA/mlx5: Support new uverbs commands for registering fd-based MR Jianxin Xiong
2020-04-16 17:54 ` [RFC PATCH 0/3] RDMA: Add dma-buf support Jason Gunthorpe
2020-04-16 19:08   ` Xiong, Jianxin
2020-04-16 19:34     ` Jason Gunthorpe
2020-04-16 21:02       ` Xiong, Jianxin
2020-04-17 12:35         ` Jason Gunthorpe
2020-04-17 16:49           ` Xiong, Jianxin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.