Skip to contentSkip to conversation

engines/xnvme: fix fdp support for userspace drivers

PATCH Applied Ankit Kumar 2 participants 2 messages Nov 2, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20231102084106epcas5p21fea8b9fb34faef6c9783d020e57a2f5@epcas5p2.samsung.com

#1 lore raw

PATCH 1/1 engines/xnvme: fix fdp support for userspace drivers

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.

---
 engines/xnvme.c        |  2 +-
 examples/xnvme-fdp.fio | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
engines/xnvme.c +1 -1
index ce7b2bdd..b7824013 100644
@@ -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;
 	}
examples/xnvme-fdp.fio +20 -0
index 86fbe0d3..c50959f1 100644
@@ -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
 ;
Signature · 1 line
2.25.1
Applied
#2 lore raw
Quoted 5 lines · Ankit Kumar

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.

Applied, thanks!

[1/1] engines/xnvme: fix fdp support for userspace drivers

      commit: 48cf0c63e5b867c8953f25deaa02466bf94a2eed

Best regards,

Signature · 1 line
Jens Axboe