Skip to content

Add basic test for nvme uring passthrough commands

Ankit Kumar io-uring 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 4 repliesApplied
  2. v25 patches 4 repliesSuperseded
  3. v15 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Skip test if argument is not nvme device and remove prints, as suggested by Jens.
- change nvme helper function name, as pointed by Jens.
- Remove wrong comment about command size, as per Kanchan's review

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5configure: check for nvme uring command supportconfigure+20 -00 replies
2/5io_uring.h: sync sqe entry with 5.20 io_uringsrc/include/liburing/io_uring.h+15 -20 replies
3/5nvme: add nvme opcodes, structures and helper functionstest/nvme.h+168 -00 replies
4/5test: add io_uring passthrough testtest/Makefile test/io_uring_passthrough.c+315 -00 replies
5/5test/io_uring_passthrough: add test case for poll IOtest/io_uring_passthrough.c+76 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchKanchan Joshi
1/5
2/5
3/5
4/5T-b
5/5T-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 liburing v3 0/5] Add basic test for nvme uring passthrough commands

This patchset adds a way to test NVMe uring passthrough commands with nvme-ns character device. The uring passthrough was introduced with 5.19 io_uring.

To send nvme uring passthrough commands we require helpers to fetch NVMe char device (/dev/ngXnY) specific fields such as namespace id, lba size etc.

How to run:
./test/io_uring_passthrough.t /dev/ng0n1

It requires argument to be NVMe device, if not the test will be skipped.

The test covers write/read with verify for sqthread poll, vectored / nonvectored and fixed IO buffers, which can be extended in future. As of now iopoll is not supported for passthrough commands, there is a test for such case.

Changes from v2 to v3
- Skip test if argument is not nvme device and remove prints, as suggested by Jens.
- change nvme helper function name, as pointed by Jens.
- Remove wrong comment about command size, as per Kanchan's review

Ankit Kumar (5):
configure: check for nvme uring command support io_uring.h: sync sqe entry with 5.20 io_uring
nvme: add nvme opcodes, structures and helper functions
test: add io_uring passthrough test test/io_uring_passthrough: add test case for poll IO

 configure                       |  20 ++
 src/include/liburing/io_uring.h |  17 +-
 test/Makefile                   |   1 +
 test/io_uring_passthrough.c     | 390 ++++++++++++++++++++++++++++++++
 test/nvme.h                     | 168 ++++++++++++++
 5 files changed, 594 insertions(+), 2 deletions(-)
 create mode 100644 test/io_uring_passthrough.c
 create mode 100644 test/nvme.h
Signature · 1 line
2.17.1