Page MenuHomeFreeBSD

nvme: Add constants for the PSDT field in cdw0.
ClosedPublic

Authored by jhb on Mar 20 2024, 11:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 14, 12:46 PM
Unknown Object (File)
May 17 2024, 8:45 PM
Unknown Object (File)
May 8 2024, 7:03 PM
Unknown Object (File)
May 1 2024, 2:15 AM
Unknown Object (File)
Apr 8 2024, 1:35 PM
Unknown Object (File)
Apr 8 2024, 6:03 AM
Unknown Object (File)
Mar 26 2024, 8:23 PM
Unknown Object (File)
Mar 23 2024, 1:00 AM
Subscribers

Details

Summary

This is not used in nvme(4) but is used in NVMe over Fabrics
transports which use SGLs to describe buffers instead of PRPs.

While here, adjust the shift value for the FUSE field to be relative
to the 'fuse' member of 'struct nvme_command'.

Diff Detail

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

Event Timeline

sys/dev/nvme/nvme.h
214

Why?
Maybe explain in the commot message?

sys/dev/nvme/nvme.h
214

Hmm, I tried to say that in the last sentence:

While here, adjust the shift value for the FUSE field to be relative
to the 'fuse' member of 'struct nvme_command'.

All of the constants we have are relative to the field in the relevant data structure. In struct nvme_command we have:

struct nvme_command {
	/* dword 0 */
	uint8_t opc;		/* opcode */
	uint8_t fuse;		/* fused operation */
	uint16_t cid;		/* command identifier */

The earlier define seemed to assume that we had a single uint16_t cmd_fuse field that you would use these constants with in NVMEV to extract the fuse value. I also do end checking for fused commands in the CAM ctl(4) controller so need this value correct.

imp added inline comments.
sys/dev/nvme/nvme.h
214

I think that's good

This revision is now accepted and ready to land.Mar 22 2024, 9:19 PM
This revision was automatically updated to reflect the committed changes.