engines/xnvme: user space vfio based backend
authorAnkit Kumar <ankit.kumar@samsung.com>
Thu, 22 Dec 2022 04:39:49 +0000 (10:09 +0530)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 22 Dec 2022 13:50:03 +0000 (08:50 -0500)
Add an option to use user-space VFIO-based backend,
implemented using libvfn.
Update xnvme engine options for missing backends.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
HOWTO.rst
engines/xnvme.c
fio.1

index 97fe53504d90b3d52a7db466541212289cb0e6ce..aba6c9b3b9d78ede27e1bd3b9cf89d82b1441775 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -2845,6 +2845,9 @@ with the caveat that when used on the command line, they must come after the
        **posix**
                Use the posix asynchronous I/O interface to perform one or
                more I/O operations asynchronously.
+       **vfio**
+               Use the user-space VFIO-based backend, implemented using
+               libvfn instead of SPDK.
        **nil**
                Do not transfer any data; just pretend to. This is mainly used
                for introspective performance evaluation.
@@ -2875,7 +2878,7 @@ with the caveat that when used on the command line, they must come after the
 
 .. option:: xnvme_dev_nsid=int : [xnvme]
 
-       xnvme namespace identifier for userspace NVMe driver, such as SPDK.
+       xnvme namespace identifier for userspace NVMe driver, SPDK or vfio.
 
 .. option:: xnvme_iovec=int : [xnvme]
 
index dcc54998b05b062c532b6d0e6cfe101b14bc15ea..ee6b67c1223075a9001ca1209da0e5b420758345 100644 (file)
@@ -113,7 +113,8 @@ static struct fio_option options[] = {
                .lname = "xNVMe Asynchronous command-interface",
                .type = FIO_OPT_STR_STORE,
                .off1 = offsetof(struct xnvme_fioe_options, xnvme_async),
-               .help = "Select xNVMe async. interface: [emu,thrpool,io_uring,libaio,posix,nil]",
+               .help = "Select xNVMe async. interface: "
+                       "[emu,thrpool,io_uring,io_uring_cmd,libaio,posix,vfio,nil]",
                .category = FIO_OPT_C_ENGINE,
                .group = FIO_OPT_G_XNVME,
        },
@@ -122,7 +123,7 @@ static struct fio_option options[] = {
                .lname = "xNVMe Synchronous. command-interface",
                .type = FIO_OPT_STR_STORE,
                .off1 = offsetof(struct xnvme_fioe_options, xnvme_sync),
-               .help = "Select xNVMe sync. interface: [nvme,psync]",
+               .help = "Select xNVMe sync. interface: [nvme,psync,block]",
                .category = FIO_OPT_C_ENGINE,
                .group = FIO_OPT_G_XNVME,
        },
@@ -131,7 +132,7 @@ static struct fio_option options[] = {
                .lname = "xNVMe Admin command-interface",
                .type = FIO_OPT_STR_STORE,
                .off1 = offsetof(struct xnvme_fioe_options, xnvme_admin),
-               .help = "Select xNVMe admin. cmd-interface: [nvme,block,file_as_ns]",
+               .help = "Select xNVMe admin. cmd-interface: [nvme,block]",
                .category = FIO_OPT_C_ENGINE,
                .group = FIO_OPT_G_XNVME,
        },
diff --git a/fio.1 b/fio.1
index 1074b52a384bce643f5d4e6ddc797de13cbceb6f..004d3ba0ea5bc8df81b64900382338dbfbb806f6 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -2584,6 +2584,10 @@ Use Linux aio for Asynchronous I/O
 Use the posix asynchronous I/O interface to perform one or more I/O operations
 asynchronously.
 .TP
+.BI vfio
+Use the user-space VFIO-based backend, implemented using libvfn instead of
+SPDK.
+.TP
 .BI nil
 Do not transfer any data; just pretend to. This is mainly used for
 introspective performance evaluation.
@@ -2621,7 +2625,7 @@ Use Linux Block Layer ioctl() and sysfs for admin commands.
 .RE
 .TP
 .BI (xnvme)xnvme_dev_nsid\fR=\fPint
-xnvme namespace identifier for userspace NVMe driver such as SPDK.
+xnvme namespace identifier for userspace NVMe driver SPDK or vfio.
 .TP
 .BI (xnvme)xnvme_iovec
 If this option is set, xnvme will use vectored read/write commands.