Skip to content

dma-buf backed NVMe passthrough I/O

Anuj Gupta fuse-devel io-uring linux-block linux-nvme linux-scsi 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v25 patches 6 repliesSuperseded
  3. v11 patch 5 repliesSuperseded

Changes in v3 from the cover letter

- return -EOPNOTSUPP when the controller has no dma-buf support (Pavel)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5io_uring/rsrc: pass import flags to io_import_reg_buf()io_uring/net.c io_uring/rsrc.c io_uring/rsrc.h +2 more+13 -190 replies
2/5io_uring/uring_cmd: add import flags to io_uring_cmd_import_fixed()drivers/nvme/host/ioctl.c drivers/scsi/scsi_bsg.c fs/fuse/dev_uring.c +2 more+10 -60 replies
3/5io_uring/uring_cmd: support dma-buf registered buffersinclude/linux/io_uring/cmd.h io_uring/uring_cmd.c+35 -20 replies
4/5block: map dma-buf iterators in blk_rq_map_user_iov()block/blk-map.c+14 -10 replies
5/5nvme: support dma-buf registered buffers for passthroughdrivers/nvme/host/core.c drivers/nvme/host/ioctl.c+19 -20 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchPavel BegunkovChristoph Hellwig
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] dma-buf backed NVMe passthrough I/O

This series adds support for dma-buf registered buffers in NVMe uring_cmd passthrough.

Patches 1-2 add import flags to the fixed buffer import helpers, so uring_cmd users have to opt in to dma-buf. Patch 3 adds the io_uring side, patch 4 lets the block layer map dma-buf iterators for passthrough, and patch 5 enables it for the NVMe namespace character device.

Tested with this liburing test:
https://github.com/anuj7781/liburing/tree/rw-dmabuf-pt

Changes since v2:
- return -EOPNOTSUPP when the controller has no dma-buf support (Pavel)

v2: https://lore.kernel.org/linux-block/[email protected]/

Changes since v1:
- split into io_uring, block and nvme patches (Christoph)
- pass import flags to io_import_reg_buf() and io_uring_cmd_import_fixed(), and make callers opt in to dma-buf (Christoph, Pavel)
- add io_uring_cmd_hw_done(), so nvme no longer handles the dma-buf map (Pavel)
- warn if task_work is queued with a dma-buf map attached (Pavel)
- make the -EREMOTEIO conversion explicit and comment it (Christoph)
- refuse dma-bufs larger than 4GiB on the character device

v1: https://lore.kernel.org/linux-nvme/[email protected]/

Anuj Gupta (5):
io_uring/rsrc: pass import flags to io_import_reg_buf() io_uring/uring_cmd: add import flags to io_uring_cmd_import_fixed() io_uring/uring_cmd: support dma-buf registered buffers
block: map dma-buf iterators in blk_rq_map_user_iov()
nvme: support dma-buf registered buffers for passthrough

 block/blk-map.c              | 15 ++++++++++++++-
 drivers/nvme/host/core.c     | 16 ++++++++++++++++
 drivers/nvme/host/ioctl.c    |  5 +++--
 drivers/scsi/scsi_bsg.c      |  2 +-
 fs/fuse/dev_uring.c          |  2 +-
 include/linux/io_uring/cmd.h | 14 ++++++++++++--
 io_uring/net.c               |  6 +++---
 io_uring/rsrc.c              |  6 +++---
 io_uring/rsrc.h              | 13 +++----------
 io_uring/rw.c                |  5 +++--
 io_uring/uring_cmd.c         | 31 +++++++++++++++++++++++++++++--
 11 files changed, 88 insertions(+), 27 deletions(-)

base-commit: 70866cfa169d5ee149364267289e71d50f9a7ae9

Signature · 1 line
2.43.0