From: Ankit Kumar <ankit.kumar@samsung.com>
To: axboe@kernel.dk
Cc: fio@vger.kernel.org, vincentfu@gmail.com,
Ankit Kumar <ankit.kumar@samsung.com>
Subject: [PATCH] engines/xnvme: fix fdp support for userspace drivers
Date: Thu, 2 Nov 2023 19:29:28 +0530 [thread overview]
Message-ID: <20231102135928.195372-1-ankit.kumar@samsung.com> (raw)
In-Reply-To: CGME20231102084106epcas5p21fea8b9fb34faef6c9783d020e57a2f5@epcas5p2.samsung.com
The xNVMe backend supports FDP commands for userspace drivers
such as SPDK. Enable support in the xnvme ioengine.
Update the xnvme fdp example file accordingly.
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
---
engines/xnvme.c | 2 +-
examples/xnvme-fdp.fio | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/engines/xnvme.c b/engines/xnvme.c
index ce7b2bdd..b7824013 100644
--- a/engines/xnvme.c
+++ b/engines/xnvme.c
@@ -964,7 +964,7 @@ static int xnvme_fioe_fetch_ruhs(struct thread_data *td, struct fio_file *f,
uint32_t nsid;
int err = 0, err_lock;
- if (f->filetype != FIO_TYPE_CHAR) {
+ if (f->filetype != FIO_TYPE_CHAR && f->filetype != FIO_TYPE_FILE) {
log_err("ioeng->fdp_ruhs(): ignoring filetype: %d\n", f->filetype);
return -EINVAL;
}
diff --git a/examples/xnvme-fdp.fio b/examples/xnvme-fdp.fio
index 86fbe0d3..c50959f1 100644
--- a/examples/xnvme-fdp.fio
+++ b/examples/xnvme-fdp.fio
@@ -16,6 +16,26 @@
; --xnvme_sync=nvme \
; --filename=/dev/ng0n1
;
+; # Use the xNVMe io-engine engine with SPDK backend, note that you have to set the Namespace-id
+; fio examples/xnvme-fdp.fio \
+; --section=default \
+; --ioengine=xnvme \
+; --xnvme_dev_nsid=1 \
+; --filename=0000\\:01\\:00.0
+;
+; NOTE: The URI encoded in the filename above, the ":" must be escaped.
+;
+; On the command-line using two "\\":
+;
+; --filename=0000\\:01\\:00.0
+;
+; Within a fio-script using a single "\":
+;
+; filename=0000\:01\:00.0
+;
+; NOTE: If you want to override the default bs, iodepth, and workload, then
+; invoke it as:
+;
; FIO_BS="512" FIO_RW="read" FIO_IODEPTH=16 fio examples/xnvme-fdp.fio \
; --section=override --ioengine=xnvme --xnvme_sync=nvme --filename=/dev/ng0n1
;
--
2.25.1
next parent reply other threads:[~2023-11-02 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231102084106epcas5p21fea8b9fb34faef6c9783d020e57a2f5@epcas5p2.samsung.com>
2023-11-02 13:59 ` Ankit Kumar [this message]
2023-11-02 12:09 ` [PATCH] engines/xnvme: fix fdp support for userspace drivers 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=20231102135928.195372-1-ankit.kumar@samsung.com \
--to=ankit.kumar@samsung.com \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=vincentfu@gmail.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 read-only IMAP folder(s) and NNTP newsgroup(s).