Page MenuHomeFreeBSD

nvmfdd: A simple userspace NVMe over Fabrics host
ClosedPublic

Authored by jhb on Apr 9 2024, 11:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 10:30 AM
Unknown Object (File)
Fri, Apr 26, 5:00 AM
Unknown Object (File)
Apr 12 2024, 7:14 PM
Subscribers
None

Details

Summary

This program uses libnvmf to connect to a remote Fabrics controller
and perform a single read or write operation. The write command reads
data from stdin to construct one or more NVM Write commands sent to
the remote namespace. The read command uses one or more NVM Read
commands to read blocks frmo a remote namespace writing the data to
stdout.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Apr 9 2024, 11:05 PM
jhb created this revision.

I used this to test my initial libnvmf code against a Linux target before then implementing the in-kernel host. I also used this as the first client to test the userspace and later kernel controllers.

s/frmo/from/ typo in the commit log I will fix before merging

A quick review didn't see any glaring problems.
But I have little nvmf clue, so I Don't know if the details are right.

This revision is now accepted and ready to land.Apr 13 2024, 5:49 PM

Handful of nits, but overall, LGTM!

tools/tools/nvmf/nvmfdd/nvmfdd.c
155

FWIW, there are a couple of edge cases around transitioning cc.en with respect to csts.rdy. Typically this only matters when hardware gets "grumpy", so the extra complexity might not be worth it here.

222

The other NSID check for I/O commands would be against nsid != 0

331

Might be worth checking the return value and bailing on NULL.

492

Should this error block free the association too?

Update TCP digest command line options to match nvme(1) on Linux

This revision now requires review to proceed.Wed, May 1, 9:13 PM
jhb marked an inline comment as done.Wed, May 1, 10:21 PM
jhb added inline comments.
tools/tools/nvmf/nvmfdd/nvmfdd.c
155

In this case csts.rdy is known to be zero when you first connect and we are going to wait for it to transition to 1 in the loop below after setting cc.en.

222

That is handled down in main after the getopt loop:

	if (nsid == 0 || nsid >= 0xffffffff)
		errx(1, "Invalid namespace ID %u", nsid);
492

Yes, good catch

jhb marked an inline comment as done.

Add missing nvmf_free_association

Switch to SPDX-only license blocks for C files

This revision was not accepted when it landed; it landed in state Needs Review.Fri, May 3, 12:17 AM
This revision was automatically updated to reflect the committed changes.