Page MenuHomeFreeBSD

ctl: Support NVMe requests in debug trace functions
ClosedPublic

Authored by jhb on Apr 9 2024, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 27, 2:11 AM
Unknown Object (File)
Fri, May 3, 11:23 PM
Unknown Object (File)
Apr 26 2024, 9:58 AM
Unknown Object (File)
Apr 26 2024, 4:59 AM
Unknown Object (File)
Apr 25 2024, 1:00 PM
Unknown Object (File)
Apr 18 2024, 9:21 PM
Unknown Object (File)
Apr 12 2024, 6:23 PM
Unknown Object (File)
Apr 11 2024, 9:59 PM

Details

Summary

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:04 PM

Looks like the copyright text is missing.

sys/cam/ctl/ctl_nvme_all.c
8

Where is the actual copyright text?

sys/cam/ctl/ctl_nvme_all.h
5

Where is the actual copyright text?

imp added inline comments.
sys/cam/ctl/ctl_nvme_all.c
23

There are many places that duplicate this data.

sys/cam/ctl/ctl_nvme_all.h
5

Spdx means you don't need it

This revision is now accepted and ready to land.Apr 15 2024, 3:59 PM

If you have SPDX tags and no license text, then it's incorporated by reference and isn't needed. The actual copyright notices are still needed and are present.

sys/cam/ctl/ctl_nvme_all.c
23

Yeah. I'm not sure I want a single .c file to handle all these since different places want to do different things with opcodes (and it gets all kind of weird with sys/conf/files, etc.), but one thing I've thought about is adding some table macros in nvme.h along the lines of:

/* M is a caller-supplied macro */
#define NVME_ADMIN_OPCODES(M) \
       M(DELETE_IO_SQ) \
       M(CREATE_IO_SQ) \
....

Then you would do something like:

#define OPC_ENTRY(x)    [NVME_OPC_ ## x]  = #x11 

static const char *admin_opcodes[256] = {
      NVME_ADMIN_OPCODES(OPC_ENTRY)
};
sys/cam/ctl/ctl_nvme_all.c
23

Yes indeed. I have a need for it for the dtrace based camdump that I have been working on, but not in 'C' format...
So not sure how to make it better.

chuck added inline comments.
usr.sbin/bhyve/Makefile
30

Apologies for being dense. Why does bhyve need this? This review doesn't seem to modify bhyve to use these commands.

jhb added inline comments.
usr.sbin/bhyve/Makefile
30

Because bhyve uses ctl_util.c from the kernel which needs it.

usr.sbin/bhyve/Makefile
30

Oh, that's right. I'd forgotten that CTL gets pulled into bhyve for SCSI emulation.