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)
Sun, Nov 10, 3:12 AM
Unknown Object (File)
Thu, Nov 7, 8:03 AM
Unknown Object (File)
Thu, Oct 17, 1:34 AM
Unknown Object (File)
Tue, Oct 15, 1:06 PM
Unknown Object (File)
Tue, Oct 15, 1:06 PM
Unknown Object (File)
Oct 14 2024, 9:13 PM
Unknown Object (File)
Oct 14 2024, 1:12 AM
Unknown Object (File)
Oct 13 2024, 5:22 AM
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.May 1 2024, 9:13 PM
jhb marked an inline comment as done.May 1 2024, 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.May 3 2024, 12:17 AM
This revision was automatically updated to reflect the committed changes.