engines/xnvme: fix fdp support for userspace drivers
authorAnkit Kumar <ankit.kumar@samsung.com>
Thu, 2 Nov 2023 13:59:28 +0000 (19:29 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Nov 2023 12:08:13 +0000 (06:08 -0600)
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>
Link: https://lore.kernel.org/r/20231102135928.195372-1-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/xnvme.c
examples/xnvme-fdp.fio

index ce7b2bdd4bc6aee56cf6cb327b915668adee00c0..b782401363c39f3f04e3446269797452192bba55 100644 (file)
@@ -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;
        }
index 86fbe0d31a75a43455fc869547b87cb46390bcd4..c50959f1f3419e0c15e2f884f80a3f0811aed00c 100644 (file)
 ;   --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
 ;