Page MenuHomeFreeBSD

nvme: Move opcode and status code tables from base CAM to nvme_util.c
ClosedPublic

Authored by jhb on Jun 4 2025, 4:32 PM.
Tags
None
Referenced Files
F139391816: D50685.diff
Thu, Dec 11, 3:05 PM
Unknown Object (File)
Wed, Dec 3, 8:02 AM
Unknown Object (File)
Nov 9 2025, 5:44 AM
Unknown Object (File)
Oct 9 2025, 6:41 AM
Unknown Object (File)
Oct 9 2025, 2:40 AM
Unknown Object (File)
Sep 26 2025, 2:26 PM
Unknown Object (File)
Aug 30 2025, 10:27 PM
Unknown Object (File)
Aug 29 2025, 4:25 PM
Subscribers

Details

Summary

This makes it possible to share these tables with the nvme(4) driver
in custom kernels that do not include any CAM support, only nvd(4).

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.Jun 4 2025, 4:32 PM

Include nvme_util.c in CAM kernels without nvme

imp added inline comments.
sys/dev/nvme/nvme_util.c
40

Still a dupe?

This revision is now accepted and ready to land.Jun 4 2025, 4:39 PM

cam.ko already includes nvme_util.c. (Which means that today it is present in both cam.ko and nvme.ko. Not sure how that works out if you try to kldload both of them in a MINIMAL kernel. I would probably vote for taking it out of nvme.ko since nvme.ko already depends on cam.ko unconditionally.)

sys/dev/nvme/nvme_util.c
40

I trim this comment in the followup change that removes the tables from nvme_qpair.c.