io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ankit Kumar <ankit.kumar@samsung.com>
To: axboe@kernel.dk
Cc: io-uring@vger.kernel.org, joshi.k@samsung.com,
	Ankit Kumar <ankit.kumar@samsung.com>
Subject: [PATCH liburing v3 0/5] Add basic test for nvme uring passthrough commands
Date: Thu, 28 Jul 2022 15:03:22 +0530	[thread overview]
Message-ID: <20220728093327.32580-1-ankit.kumar@samsung.com> (raw)
In-Reply-To: CGME20220728093902epcas5p40813f72b828e68e192f98819d29b2863@epcas5p4.samsung.com

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

-- 
2.17.1


       reply	other threads:[~2022-07-28 12:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220728093902epcas5p40813f72b828e68e192f98819d29b2863@epcas5p4.samsung.com>
2022-07-28  9:33 ` Ankit Kumar [this message]
     [not found]   ` <CGME20220728093904epcas5p4eed789c1eda441c223795dd026dc5d3f@epcas5p4.samsung.com>
2022-07-28  9:33     ` [PATCH liburing v3 1/5] configure: check for nvme uring command support Ankit Kumar
     [not found]   ` <CGME20220728093905epcas5p22963dd2dadb73bdabfaffc55cb2edef5@epcas5p2.samsung.com>
2022-07-28  9:33     ` [PATCH liburing v3 2/5] io_uring.h: sync sqe entry with 5.20 io_uring Ankit Kumar
     [not found]   ` <CGME20220728093906epcas5p3fb607ddd16054ca7e6cbf26b53306062@epcas5p3.samsung.com>
2022-07-28  9:33     ` [PATCH liburing v3 3/5] nvme: add nvme opcodes, structures and helper functions Ankit Kumar
     [not found]   ` <CGME20220728093907epcas5p353489ffcc9bed6f3a5c64b4679ad11ee@epcas5p3.samsung.com>
2022-07-28  9:33     ` [PATCH liburing v3 4/5] test: add io_uring passthrough test Ankit Kumar
     [not found]   ` <CGME20220728093908epcas5p4d6318b0f037f0ccf9e5422b6b63f217c@epcas5p4.samsung.com>
2022-07-28  9:33     ` [PATCH liburing v3 5/5] test/io_uring_passthrough: add test case for poll IO Ankit Kumar
2022-07-28 12:36   ` [PATCH liburing v3 0/5] Add basic test for nvme uring passthrough commands Jens Axboe
2022-07-28 13:01     ` Ankit Kumar
2022-07-28 13:10       ` Jens Axboe
2022-07-28 13:10   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220728093327.32580-1-ankit.kumar@samsung.com \
    --to=ankit.kumar@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=joshi.k@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).